MATH529 Lesson 01

Ordinary Differential Equations Review

Basic mathematical concepts

Sets

Sets are collections of objects. The sets of interest within this course are ℕ, ℤ, ℝ, ℂ, the sets of naturals, integers, reals, and complex numbers, respectively. The basic operation arising in set theory in membership, for instance ∈ℤ, stating that the number four is an integer.

4∈Integers

In fact the number 4 is a natural, or a positive integer.

4∈Integers && 4 > 0

If all elements of  are also members of , then A ⊂ .  Since ℕ⊂ℤ⊂ℝ⊂ℂ, the number 4 is also a real.

4∈Reals

The integers are a proper subset of the reals, i.e., there exist reals that are not integers, such as ℼ.

π∈Reals

π∈Integers

Given two sets  the Cartesian product  is defined as the set of all pairs  with ∈, y∈Y. For example ℝ×ℝ contains pairs of reals, identified with the real plane and denoted as (ℝ^2). Similarly (ℝ^3) denotes three-dimensional real space.

Within the real or complex numbers, a neighborhood of  is a set of numbers within some distance, .

Equations

Recall that within the real plane (ℝ^2) the first bisector corresponds to those points in the plane have equal abscissa and ordinate values, .  The set of such points is a subset of (ℝ^2).

1==2

2==2

2==Sqrt[4]

Constants and variables

Within some problem certain quantities are assumed to be fixed as in the parabola relationship , where  is assumed to be a constant, whereas  can take a range of values and are considered to be variables. The distinction between constants and variables is problem dependent. In the parabola definition  can take on any value, and is said to be an independent variable, whereas  results from the parabola definition and is said to be a dependent variable.

x == y

Note that in the above statement, the expression does not evaluate to either True or False, since  are variables. A numeric value for a constant can be specified through a substitution operation.

a /. a-> 2

y== a (x^2) /. a->2

Functions

A function  from set  to set  is a subset of  in which there is no repetition of the first element of the pair , and is denoted as  → Y.

f[x_] = 2 (x^2)

f[2]

Plot[f[x],{x,-2,2}]

Of main interest in this course are real functions ℝ→ℝ, and complex functions w:ℂ→ℂ. A function is continuous if it maps small neighborhoods into small neighborhoods, as the parabola above. Conversely the step function is not continuous since arbitrarily small neighborhoods of zero are mapped into the [0,1] interval

Plot[HeavisideTheta[t],{t,-1,1}]

Differentiation

Real functions that finitely map arbitrarily small neighborhoods into small neighborhoods are differentiable:
f'((Subscript[x, 0]))==(lim_(x->(Subscript[x, 0])))((f(x)-f((Subscript[x, 0])))/(x-(Subscript[x, 0])))

f[x]

D[f[x],x]

f'[x]

For real functions  ℝ→ℝ, the derivative is the slope of the tangent to function graph.

VectorPlot[{1,f'[x]},{x,0,1},{y,0,1}]

Rather than explicitly defining a function such as , the function could be defined in terms of its slope within the real plane, . Starting from some arbitrary point in the (ℝ^2) plane one can reconstruct the function by following the direction of the local slope.

VectorPlot[{1,f'[x]},{x,0,1},{y,0,1},StreamPoints->Medium,StreamScale->Full]

StreamPlot[{1,f'[x]},{x,0,1},{y,0,1},StreamScale->None]

The rate of change of the rate of change is given by the second derivative, e.g.,

D[f[x],{x,2}]

Differential equations

Differential equations are relationships among the rates of change, i.e., derivatives of a function. Various rates of change, i.e., order of differentiation can be specified. The order of a differential equation is the highest order of differentiation that arises

Ordinary differential equations (ODEs)

Differential equations for functions of a single variable are said to be ordinary.

Explicit form

An ordinary differential equation is said to be given in explicit form if the highest-order derivative is a known expression of the lower order derivatives

f[x_,y_]=x+y

sp=StreamPlot[{1,f[x,y]},{x,-1,1},{y,-1,4}]

DSolve[y'[x]==f[x,y[x]],y[x],x]

sol=DSolve[{y'[x]==f[x,y[x]],y[0]==1},y[x],x]

yp=Plot[y[x] /. sol[[1,1]],{x,-1,1}]

Show[{yp,sp}]

Implicit form

Conversely, if the highest order derivative has not been isolated, the ordinary differential equation is said to be given in implicit form

Systems of differential equations

Relationships between rates of change of multiple functions lead to systems of differential equations.

sol=DSolve[{z'[x] == x + y[x], y'[x] == x - z[x],z[0]==1,y[0]==2}, {y[x], z[x]}, x]

Plot[{y[x],z[x]} /. sol[[1]],{x,0,2}]

Linear differential equations

An equation  is linear if  is linear in the dependent variable and its derivatives, e.g., for ,  is linear if  for any reals

Partial differential equations (PDEs)

Specifying rates of change of a function with respect to multiple independent variables leads to a partial differential equation. For PDEs, it is convenient to denote differentiation by subscripts. Of special relevance to study of PDEs are the simplest forms that arise, known as the canonical PDEs.

Canonical PDEs

Heat (diffusion) equa1/2A_0+tion

The diffusion equation  describes the evolution of some concentration  due to unresolved microscopic processes (random motion).

Poisson equation

The Poisson equation  describes the stable equilibrium concentration of some quantity  under the effect of the external forces .

Wave equation

The wave equation  describes the propagation of waves with speed , with  indicating the displacement from equilibrium.

Initial value problem

Development of differential equation theory is guided by analysis of generic cases. The first generic case is that of first-order differential equations given in explicit form with an initial condition, known as the initial value problem (IVP) 
y'=dy/dx=f(x,y), y((Subscript[x, 0]))=(Subscript[y, 0])

A unique solution exists over some interval R=((Subscript[x, 0]),(Subscript[x, 1]))×((Subscript[y, 0]),(Subscript[y, 1])) if f is continuous over ℝ, and the derivative of  f is continuous on ℝ. (a weaker sufficient condition is Lipschitz continuity in dependence of f on y)

An example of an IVP with multiple solutions
y'=dy/dx=x (y^(1/2)), y(0)=0, f(x,y)=x (y^(1/2))
∂f/∂y=x/(2(y^(1/2)))

DSolve[{y'[x]==x (((y[x]))^(1/2)),y[0]==0},y[x],x]

DE = y'[x] == x (((y[x]))^(1/2))

sol=DSolve[{DE,y[0]==0},y[x],x][[1,1]]

dsol = y'[x] -> (x^3)/4

Assuming[x>0,Simplify[DE /. {sol, dsol}]]

{a,b} /.{ a->1, b->2}

Separable first-order equations

The ODE y'=dy/dx=f(x,y) is separable if f(x,y)=g(x)/ h(y), and is solvable by direct integration

∫h(y) d y=∫g(x) d x+C

Example: y'=dy/dx=y/(1+x  )⇒((d y)/y)=((d x)/(1+x))⇒log (y) = log (1+x)+ log (C)⇒ y(x)= C(1+x)

DSolve[y'[x]== y[x]/(1+x),y[x],x]

Implicit solutions

cos x ((e^(2y))-y)((dy)/(dx))=(e^y) sin 2x⇒(((e^(2y))-y)/(e^y))d y=((sin 2x)/(cos x))d x

ysol = Integrate[(Exp[2y]-y)/Exp[y],y]

xsol = Integrate [Sin[2x]/Cos[x],x]

ysol == xsol + c

g[x_,y_] = xsol - ysol

ContourPlot[g[x,y],{x,-3,3},{y,-3,3},ContourShading->None,Contours->Table[c,{c,-10,10}]]

Linear first-order equations

Development of differential equation theory is guided by analysis of generic cases. The first generic case is that of first-order differential equations given in explicit form with an initial condition, known as the initial value problem (IVP) 
y'=dy/dx=f(x,y), y((Subscript[x, 0]))=(Subscript[y, 0])

A unique solution exists over some interval R=((Subscript[x, 0]),(Subscript[x, 1]))×((Subscript[y, 0]),(Subscript[y, 1])) if f is continuous over ℝ, and the derivative of  f is continuous on ℝ. (a weaker sufficient condition is Lipschitz continuity in dependence of f on y)

Basic theory

The first-order differential equation h(x,y,y')=g(x) is linear if h is a linear mapping in , in which case the equation can be written as h(x,y,y')=, with , or

L (y)=[(Subscript[a, 0])(x)(d/(dx))+(Subscript[a, 1])(x)]y=(Subscript[a, 0])(x)((dy)/(dx))+(Subscript[a, 1])(x)y=g(x)

where  is the differential operator associated with the equation.

Recall that, in general, a function F is a linear mapping iff F((Subscript[c, 1]) (Subscript[t, 1])+(Subscript[c, 2]) (Subscript[t, 2]))=(Subscript[c, 1]) F((Subscript[t, 1]))+(Subscript[c, 2]) F((Subscript[t, 2])). For the above,





If  the ODE is said to be homogeneous

A linear first-order ODE can be written in standard form as

Examples

A linear ODE

Q: Is the equation  linear in y?
A: Yes. The function  is linear in y. Verify:

A nonlinear ODE

Q: Is the equation  linear in y?
A: No,  is nonlinear in .

Solution by variation of parameters

The solution to a linear ODE can be written as the solution to the homogeneous equation plus a particular solution to the original DE.

1. Solve the homogeneous equation , and obtain (x).
2. Assume constant of integration becomes a parameter that depends on the independent variable (“variation of parameters”), and find a particular solution.

Example

Solve 
Step 1: Solve homogeneous equation

DE = y'[x]+ x y[x] == (e^x)

solh=DSolve[y'[x]+ x y[x] == 0,y[x],x][[1,1]]

yh[x_] = y[x] /. solh

Step 2.  Assume constant of integration becomes a parameter

yp[x_] = yh[x] /.  (C[1])-> A[x]

DEp =DE /. y->yp

vpsol=DSolve[DEp,A[x],x][[1,1]]

ys[x_]=yp[x] /. vpsol