ODEs PartI
ODEs PartI
ODEs PartI
DEs are very important in engineering mathematics because many physical laws and relations
are in this form of equations mathematically. For the rest of this course, we will consider
several physical and geometrical problems that lead to DEs and we will try to explore some of
the important standard methods for solving such equations.
y’’+4x=0
x2y’’’y’+2exy’’=(x2+2)y2
The word ‘ordinary’ means that the unknown function depends on only one variable. That
makes it different than the ‘partial’ DEs where unknown functions depend on 2 or more
variables. So, they are more complex, and will be considered at the end of semester.
DEs can be seen in many engineering problems as mathematical models of several physical
and other systems. The simplest ones can be solved by remembering elementary calculus.
More complicated models need more detailed methods to be solved, which we will discuss
systematically.
We begin to study ODEs and their applications by considering the simplest of these
equations: These are called differential equations of first order. They involve only the first
derivative of the unknown function, and may contain y and given functions of x. So they
could be written as,
g(y)dy=f(x)dx
Such an equation is called ‘separable equation’, because the variables x & y are separated so
that x appears only on the right hand side, and y on the left hand side.
ò g ( y)dy = ò f ( x)dx + C
Examples:
1) 9 yy '+4 x = 0
ò 9 ydy = - ò 4 xdx
y2 x2
9 = -4 +C
2 2
9 y 2 + 4x 2 + C' = 0 C ' = -2C
x2 y2
+ = C' '
9 4 This represents an ellipse
2) dy
= 1- y2
dx
dy
ò 1 - y 2 = ò dx
arctan y = x + C
y = tan( x + C )
3) dy
= ky
dx
dy
ò y = ò kdx
ln y = kx + C
y = e ( kx +C ) = e kx e C = C ' e kx
4) dy
= -2 xy
dx
dy
ò y = -2ò xdx
ln y = - x 2 + C
2
y = C' e -x
3
Some 1st order DEs are not separable, but can be made separable by a simple change of
variable.
y
y' = g ( ) (1) Where g is any given fct of y/x; for example (y/x)3, sin(y/x), etc
x
y/x=u
By manipulating it by x à y=ux
Examples:
1) 2 xyy' = y 2 - x 2
y2 - x2 y2 x2
y' = = -
2 xy 2 xy 2 xy
y x 1æ y xö
y' = - = çç - ÷÷
2x 2 y 2 è x y ø
2) Sometimes the form of a given DE suggest other simple substitutions, as given in the
following example.
(2 x - 4 y + 5) y '+ x - 2 y + 3 = 0
As you should remember from calculus, if a function u(x,y) has continuous partial derivatives,
then its total or “exact” differential is,
¶u ¶u
du = dx + dy
¶x ¶y
If u(x,y)=constant à then, du=0
M(x,y)dx+N(x,y)dy=0 (1)
5
¶u ¶u
du = dx + dy
¶x ¶y (2) of a function u(x,y)
Comparing above equations (1) & (2), we can see that (1) is exact if there is a function such
that:
¶u ¶u
=M and =N (4a and 4b)
¶x ¶y
Suppose that M and N are defined and have continuous 1st partial derivatives
¶M ¶ 2u and ¶N = ¶ u
2
=
¶y ¶y¶x ¶x ¶x¶y
In this integration, y has to be regarded as a constant, and k(y) plays the role of a ‘constant’ of
the integration.
To determine k(y), we derive ¶u / ¶y from (6), use (4b) to get dk/dy, and integrate dk/dy to get
k.
u = ò Ndy + l ( y)
Example:
( x 3 + 3xy 2 )dx + (3x 2 y + y 3 )dy = 0
M = ( x 3 + 3xy 2 ) N = (3x 2 y + y 3 )
¶M ¶N exact
= 6 xy = 6 xy
¶y ¶x
6
To find k(y), differentiate this formula with respect to y and use (4b).
du 3 2 dk
= x 2y + = N = 3x 2 y + y 3
dy 2 dy
dk
= 3x 2 y + y 3 - 3x 2 y = y 3
dy
y4
k= +C
4
x4 3 2 2 y4
u= + x y + +C
4 2 4
Note that the present method gives the solution in ‘implicit’form u(x,y)=c not in
‘explicit’ form y=f(x).
The idea of the method here is quite simple. We somtimes have an equation,
Equation (2) is Mdx+Ndy=0 with M=FP and N=FQ and it is exact by definition of IF.
¶M ¶N ¶ ¶
So the exactness condition is = à ( FP) = ( FQ)
¶y ¶x ¶y ¶x
That is FyP+FPy=FxQ+FQx (3)
Let F = F ( x) Þ Fy = 0, Fx = F '
FPy = F ' Q + FQ x
Devide by FQ and rearrange,
1 dF 1 æ ¶P ¶Q ö (4)
= ç - ÷
F dx Q çè ¶y ¶x ÷ø
R
Theorem: If (1) is such that the right hand side of (4), call it R, depends only on x, then (1)
has an integrating factor F=F(x), which is obtained by integrating (4) and taking exponents on
both sides
ln F ( x) = ò R( x)dx
F ( x) = exp( ò R( x)dx )
1 dF 1 æ ¶Q ¶P ö
= ç - ÷
F dy P çè ¶x ¶y ÷ø
~
R
w
~
F ( y) = exp(ò Rer
( y)dy )
8
¶P ¶ ¶Q ¶
= (2 sin( y 2 )) = 4 y cos( y 2 ) & = ( xy cos( y 2 )) = y cos( y 2 ) Not equal!
¶y ¶y ¶x ¶x
Let F=F(x)
R=
1
Q
( Py - Qx) =
1
2
xy cos( y )
[
4 y cos( y 2 ) - y cos( y 2 ) =
3y 3
=
xy x
]
3
F ( x) = exp ò R( x)dx = exp ò dx = x 3
x
du
= x 4 y cos( y 2 ) + k ' ( y ) = x 4 y cos( y 2 )
dy
k ' ( y ) = 0 Þ k = constant
1 4
Then, u= x sin( y 2 ) + C
2
y '+ p( x) y = r ( x) (1)
y ' = - p ( x) y (2)
dy
= - p( x)dx
y
ln y = - ò p( x)dx + C *
9
y( x) = Ce - ò p ( x ) dx (3)
dy
+ p( x) y = r ( x)
dx
dy + p( x) ydx = r ( x)dx
( p( x) y - r ( x))dx + dy = 0
This is the form of Pdx + Qdy = 0
1 dF é 1 dF 1 æ dP dQ öù
= p( x) ê = çç - ÷÷ú
F dx ë F dx Q è dy dx øû
è F ( x) = e ò p ( x ) dx
Multiplying the ODE with F(x) & applying product differentiation rule
Example: y '- y = e 2 x
y '+ p( x) y = r ( x) p=-1, r=e2x
ò p( x)dx = -ò dx = - x
General solution,
[
y ( x) = e - ò p ( x ) dx ò e ò p ( x ) dx r ( x)dx + C ]
[ ]
y ( x) = e x ò e - x e 2 x dx + C
y ( x) = e [ò e dx + C ]
x x
y ( x ) = e x (e x + C )
y ( x) = Ce x + e 2 x
Bernoulli’s equation:
Certain nonlinear DEs can be reduced to linear form. The practically most famous of these is
the ‘Bernoulli’s equation’.
u ( x) = [ y ( x)]
1- a
Then, let’s set
u ' = (1 - a) y - a y'
u ' = (1 - a) y -a ( gy a - py )
u ' = (1 - a)( g - py1-a )
Where y1-a=u
u '+(1 - a) pu = (1 - a) g (6)
11
Example:
u ' = - y -2 y ' = - y -2 (- By 2 + Ay )
u ' = B - Ay -1
u ' = B - Au
u '+ Au = B
From (4) [
y( x) = e- ò p ( x) dx ò e ò p( x) dx r ( x)dx + C ] with p=A
ò p( x)dx = Ax and r = B
u = e [ò Be dx + C ]
- Ax Ax
éB ù
u = e - Ax ê e Ax + C ú
ëA û
B
u = Ce - Ax +
A
1 1
y= =
u Ce - Ax + B
A
Ricatti’s equation:
y'- P( x) y = Q( x) y 2 + R( x)
If R(x)≠0 à a general solution can be found whenever one specific solution y=u(x) is known.
12
The substitution y=u+1/z will transform the above equation into a linear 1st order equation in
z.
Example:
dy
x - 3 y + y 2 = 4x2 - 4x 2x(2x-2)
dx
y'- P( x) y = Q( x) y 2 + R( x)
It is obvious that y=2x is a particular solution of this ODE.
d (T - T1 ) wtA0U 0
wC p (T - T1 ) + wC p t = (Ts - T )
dt rV0
M N
éæ 1 ö ù ¶u ¶u
dq + êçç1 + ÷÷q - 1ú dh = 0 du = dx + dy
¶x ¶y
ëè h ø û
¶M ¶N 1 Control if it is an exact equation
=0 = 1+
¶h ¶q h Not equal
P=1, Q=p(η)θ-1
¶Q æ 1 ö
R= = ç1 + ÷
¶q çè h ÷ø
[
F = exp ò R(h )dh ]
é æ 1ö ù
F = expê ò çç1 + ÷÷dh ú
ë è hø û
F = exp(h + lnh ) integratin g factor
dq æ 1ö
exp(h + lnh ) + çç1 + ÷÷q exp(h + lnh ) = exp(h + lnh )
dh è hø
Apply product differentiation rule
d (exp(h + lnh )q )
= exp(h + lnh )
dh
Variable conversion,
u= η à du= dη
¶u ¶u ¶u ¶u
Form: du = dx + dy where M = and N =
¶x ¶y ¶x ¶y
¶M ¶N
Should satisfy =
¶y ¶x
Solution: u = ò Mdx + k (y)
15
Form: y '+ p ( x) y = r ( x)
If r(x)=0, the equation is ‘homogeneous’, otherwise it is ‘nonhomogeneous’.
Integrating factor, F ( x) = e ò p ( x ) dx
Solution: [
y( x) = e- ò p( x) dx ò e ò p( x) dx r ( x)dx + C ]
*Reduction to Linear form:
Set u ( x) = [ y ( x)]
1- a
If R(x)=0 à Bernoulli
Substitute y=u+1/z.