Sma Ode 2

Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

Ordinary differential equations

Differential equation-An equation containing the derivatives or differentials


of one or more dependent variables, w.r.t one or more independent variables.
Ordinary differential equation-An equation which contains only ordinary
derivatives of one or more dependent variables, w.r.t a single independent vari-
able.
Partial differential equation-An equation involving the partial derivatives of
one or more dependent variables of two or more independent variables.
Order of the equation-The order of the highest derivative in the differential
equation.
A general n-th-order, ordinary differential equation (o.d.e) is often represented
by the symbolism
 dy dn y 
F x, y, , ..., n = 0.
dx dx
A linear differential equation is of the form
dn y dn−1 y dy
an (x) + an−1 (x) + · · · + a1 (x) + a0 (x)y = g(x).
dxn dxn−1 dx
Solution of an equation-Any function f , which when substituted into a dif-
ferential equation reduces the equation to an identity, is said to be a solution of
the equation.

Example
2 dy dy 2
The function y = ex is a solution of dx − 2xy = 0 since dx = 2xex we see that
dy 2 2
x
dx − 2xy = 2xe − 2x(ex ) = 0.

First order differential equations


Separable differential equations-A separable first-order differential equation
0
is an equation F (x, y, y ) = 0 that can be put into the form
dy
h(y) = g(x).
dx
Example
dy
Solve dx = ky, where k is a constant.

Solution
R dy
kdt. By assuming y > 0, lny = kt + c1 therefore y = ekt+c = ec1 ekt ,
R
y =
let c1 = c, hence y = cekt .
Example Solve the given differential equation by separation of variables.
0
1. xy − y = 1,
2. (1 + x2 + y 2 + x2 y 2 )dy = ydx.
Solution

1
1.
0
xy = 1 + y
R dy R 1
= dx
1+y x
ln |1 + y| = ln |x| + ln|A|
1+y = Ax
y = Ax − 1.

2.
(1 + x2 + y 2 + x2 y 2 )dy = ydx
((1 + x2 ) + y 2 (1 + x2 ))dy = ydx
R 1 + y2 R 1
dy = dx
y 1 + x2
1
ln |y| + y 2 = tan−1 x + c.
2
Homogeneous first order differential equations
0
Suppose a first order differential equation F (x, y, y ) = 0 has the differen-
tial form
P (x, y)dx + Q(x, y)dy = 0
and the property that

P (tx, ty) = tn P (x, y) and Q(tx, ty) = tn Q(x, y),


then the equation has homogeneous coefficients, or it is a homogeneous
equation.
N.B. A homogeneous differential equation can always be reduced to a
separable equation through an appropriate algebraic substitution.

Homogeneous function of degree n


f (x, y) is a homogeneous function of degree n if f (tx, ty) = tn f (x, y).

Example
x tx x
f (x, y) = 2y + 4 and f (tx, ty) = 2ty +4= 2y + 4 = t0 f (x, y).
The function is homogeneous of degree zero.

Example
Solve 2x3 ydx + (x4 + y 4 )dy = 0.
Solution

P (x, y) = 2x3 y
P (tx, ty) = 2t3 x3 · ty
P (tx, ty) = t4 P (x, y).

2
The function is homogeneous of degree four.

Q(x, y) = x4 + y 4
Q(tx, ty) = t4 x4 + t4 y 4
Q(tx, ty) = t4 Q(x, y).

The function is homogeneous of degree four. Let x = vy,

2v 3 y 4 (vdy + ydv) + (v 4 y 4 + y 4 )dy = 0


3 5 4 4
2v y dv + y (3v + 1)dy = 0
2v 3 dv dy
4
+ = 0
3v + 1 y
1
ln(3v 4 + 1) + ln |y| = ln |c1 |
6
3x4 y 2 + y 6 = C.

Exact differential
A differential expression,

P (x, y)dx + Q(x, y)dy, (1)

is said to be an exact differential if there exists a function f such that

df = P (x, y)dx + Q(x, y)dy. (2)

Example
Verify that x2 y 3 dx + x3 y 2 dy is an exact differential since it is the total
differential of f (x, y) = 31 x3 y 3 .
Solution
∂f ∂f
dx + dy = x2 y 3 dx + x3 y 2 dy.
∂x ∂y
Theorem
Let P and Q be continuous and have continuous first partial derivatives
in a rectangular region of the xy-plane. Then, (1) is an exact differential
if and only if
∂P ∂Q
= (3)
∂y ∂x
for all (x, y) in the region.

Exact differential equations


The first order differential equation

P (x, y)dx + Q(x, y)dy = 0 (4)

3
is said to be exact when P (x, y)dx + Q(x, y)dy is an exact differential.
When (4) is exact, it is equivalent to df (x, y) = 0. Hence, a family of
solutions of the equation is given implicitly by f (x, y) = C.

Example
Solve (5x + 4y)dx + (4x − 8y 3 )dy = 0.

Solution
∂P ∂Q
∂y = 4 = ∂x . Therefore the equation is exact.

∂f
= 4x − 8y 3
∂y
f (x, y) = 4xy − 2y 4 + h(x)
∂f 0
= 4y + h (x).
∂x
0
But ∂f
∂x = 5x + 4y therefore h (x) = 5x, hence h(x) =
5 2
2x + c1 . Since
df = 0,
 5x2 
d 4xy − 2y 4 + + c1 = 0
2
5x2
4xy − 2y 4 + = C.
2
Linear first order differential equations
A linear first order differential equation is an equation of the form
dy
a1 (x) + a0 (x)y = g(x) (5)
dx
(5) can be written in the form
dy
+ p(x)y = f (x), (6)
dx
provided a1 (x) 6= 0.
We seek solutions of (6) on an interval I for which P and f are continuous.

The method of solution


To solve a linear first order differential equation first rewrite it in the form,
dy
+ p(x)y = f (x). (7)
dy
R
p(x)dx
then multiply the entire equation by the integrating factor e ;
dy
R R R
e p(x)dx + p(x)e p(x)dx y = e p(x)dx f (x)
dx
d
R R
(e p(x)dx y) = e p(x)dx f (x) (8)
dx

4
and finally, integrate both sides to obtain the solution.

Example

dy
Solve dx − 3y = 0.

Solution

R
(−3)dx
e = e−3x
d −3x
(e y) = 0
dx
y = Ce−3x .

Variation of parameters
Consider the linear non-homogeneous first order equation
0
y + p(x)y = f (x) (9)
and 0
y + p(x)y = 0 (10)
the complementary equation.

In order to solve (9); find the solutions of (9) in the form y = uy1 , where
y1 is a nontrivial solution of (10) and u is a parameter (not a constant)
0 0 0
which is to be determined. If y = uy1 , then y = u y1 + uy1 substituting
0
y and y into (9) yields
0 0
u y1 + uy1 + p(x)uy1 = f (x)
0 0
u(y1 + p(x)y1 ) + u y1 = f (x)
0
u y1 = f (x). (11)

Since y1 is a solution of the complementary equation; that is,


0
y1 + p(x)y1 = 0.
0
y1 has no zeros on an interval where p is continuous. Therefore
0 f (x)
u = ,
y1 (x)

integrating and multiplying the result by y1 yields the general solution of


(9).

5
Example
0
Find the general solution of y + 2y = x3 e−2x .

Solution

0
y + 2y = 0
Z Z
dy
= −2dx
y
ln |y| = −2x
y = e−2x .
0 0
Therefore, y1 = e−2x . Let y = ue−2x , thus y = u e−2x − 2ue−2x .
0 0
y + 2y = u e−2x − 2ue−2x + 2ue−2x
0
= u e−2x
= x3 e−2x .

Therefore,
0
u x3 =
x4
u = + c,
4
   4 
x4
and y = c + 4 e−2x or y = e−2x x4 + c .

Definition (Initial condition (s))


Initial condition(s) are a condition or a set of conditions on the solution
that will allow us to determine which solution that we are after. Initial
conditions (often abbreviated i.c.’s) are of the form

y(t0 ) = y0 and/or y k (t0 ) = yk .

That is, initial conditions are values of the solution and/or its derivative(s)
at specific points.

Definition (Initial value problem)


An Initial Value Problem (or IVP) is a differential equation along with an
appropriate number of initial conditions.
00 0 0
(a) 4x2 y + 12xy + 3y = 0 y(4) = 81 , y (4) = − 64
3
.
0
(b) 2ty + 4y = 3 y(1) = −4.
are examples of initial value problems.

Definition (Interval of validity)

6
The interval of validity for an IVP with initial conditions y(t0 ) = y0 and/or
y k (t0 ) = yk is the largest possible interval on which the solution is valid
and contains t0 .

Examples
Solve the following initial value problems and state the interval of validity
for each IVP;
(a) sin(x)dx + ydy = 0, y(0) = 1.
(b) (3x2 + 2xy 2 )dx + 2x2 ydy = 0, y(2) = −3.
 
(c) ydx + 2x + y1 dy = 0, y(−2) = 1.
y
0 y+xe− x
(d) y = x , y(e10 ) = 1.
Solutions

(a)

ydy = − sin(x)dx
Z Z
y 2 dy = − sin(x)dx

y2
= cos(x) + c1
2 p
y = 2 cos(x) + c2 ,

where c2 = 2c1 . Considering y(0) = 1,


1 = 2 + c2
1 = 2 + c2
c2 = −1.
p  
Therefore y = 2 cos(x) − 1 on the interval − π3 , π3 since we need
 
1
cos(x) ≥ 2 and cos ± π3 = 12 .
∂p ∂Q
(b) P (x, y) = 3x2 + 2xy 2 ), Q(x, y) = 2x2 y, and ∂y = 4xy = ∂x ,
therefore the equation is exact.
∂f
= 3x2 + 2xy 2
∂x
f = x3 + x2 y 2 + h(y)
∂f 0
= 2x2 y + h (y)
∂y
= x2 y 2 + g(x).

7
Therefore f = x3 + x2 y 2 + c1 and thus, x3 + x2 y 2 = c. Considering
y(2) = −3, c = 44. Hence

x3 + x2 y 2 = 44
44 − x3
y2 =
√x2
44 − x3
y = ± .
x

44−x3
But with the restriction y(2) = −3, the only solution is y = −
√ √ x
on the interval (− 3 44, 0) ∪ (0, 3 44).
(c)

y 2 dx + (2xy + 1)dy = 0
dx
y2 + 2xy + 1 = 0
dy
dx 2x 1
+ = − 2.
dy y y
R 2
Integrating factor, µ(y) = e y dy = y 2 .

d 2
(y x) = −1
dy
Z
y2 x = − dy

y2 x = −y + c

Considering x = −2, y = 1, c = −1. Thus

xy 2 = −y − 1
2
xy + y + 1 = 0.

−1± 1−4x
From which we obtain, y = 2x , where x 6= 0 and x ≤ 14 . Con-

sidering the initial condition y(−2) = 1 suggests that y = −1−2x1−4x .
Therefore, √
−1 ± 1 − 4x 1
y= , (−∞, 0) ∪ (0, ).
2x 4
Linear second order differential equations
Consider the linear second order equation with real constant
coefficients: 00 0
ay + by + cy = g(x) (12)
and the homogeneous equation
00 0
ay + by + cy = 0 (13)

8
Theorem- Superposition Principle
Let y1 and y2 be solutions of the homogeneous second order differ-
ential equation (13). Then the linear combination

y = c1 y1 (x) + c2 y2 (x), (14)

where c1 and c2 are arbitrary constants, is also a solution of the


equation.
Theorem
Let y1 and y2 be solutions of the differential equation (13) such that
neither function is a constant multiple of the other. Then every
solution of (13) an be obtained from the linear combination

y = c1 y1 (x) + c2 y2 (x)

of linearly independent solutions, is a general solution of (13).

Auxillary equation or characteristic equation of the


differential equation (13).
00 0
ay + by + cy = 0 (15)
Assuming y = emx is a solution of (15) yields the characteristic equa-
tion;
am2 + bm + c = 0 (16)
Case I
If m1 6= m2 , where m1 and m2 are roots of (16), we get two solutions

y1 = em1 x and y2 = em2 x

y = c1 em1 x + c2 em2 x (17)


since y1 and y2 are linearly independent.
Example
00 0
Solve 3y + 10y + 8y = 0
Solution

3m2 + 10m + 8 = 0
(3m + 4)(m + 2) = 0

Therefore, m1 = − 34 or m2 = −2. Hence the general solution is


4
y = c1 e− 3 x + c2 e−2x .
Case II
When m1 = m2 , y1 = em1 x and y2 = xem1 x . Since y1 and y2 are
linearly independent solutions. Hence, the general solution is

y = c1 em1 x + c2 xem1 x (18)

9
Example
00 0
Solve y − 6y + 9y = 0.
Solution

m2 − 6m + 9 = 0
(m − 3)2 = 0
m = 3 twice

Therefore y = c1 e3x + c2 e3x .


Case III
If m1 and m2 are complex, then m1 = α + iβ and m2 = α − iβ for
α, β ∈ < and i2 = −1. Hence the general solution is

y = c1 e(α+iβ)x + c2 e(α−iβ)x . (19)

But eiθ = cos θ + i sin θ (Euler’s formula). Therefore,

eiβx = cos βx + i sin βx and e−iβx = cos βx − i sin βx

y = eαx [c1 eiβx + c2 e−iβx ]


= eαx [c1 {cos βx + i sin βx} + c2 {cos βx − i sin βx}]
= eαx [(c1 + c2 ) cos βx + (c1 i − c2 i) sin βx]

Let C1 = c1 + c2 and C2 = c1 i − c2 i,

y = eαx [c1 cos βx + c2 sin βx] (20)

since eαx cos βx and eαx sin βx are linearly independent solutions of
(13).
Example √
00 0
Solve y + 3y + 3y = 0
Solution


m2 + 3m + 3 = 0
√ q√
− 3 ± ( 3)2 − 4(1)(3)
m =
2(1)

− 3 ± 3i
m =
2
Therefore, √
3x 3x 3x
y = e− 2 [c1 cos( ) + c2 sin( )]
2 2
.

10
Non-homogeneous Linear second order differential equations
00 0
ay + by + cy = g(x) (21)
where a, b and c are constants and g is continuous.

Particular solution of the equation (21) is any function yp , free of ar-


bitrary parameters that satisfies (21).
Example
yp = 2x2 − 6x + 7 is a particular solution of
00 0
y + 3y + 2y = 4x2
0 00
since yp = 4x − 6, yp = 4 and
00 0
yp + 3yp + 2yp = 4 + 3(4x − 6) + 2(2x2 − 6x + 7)
= 4 + 12x − 18 + 4x2 − 12x + 14
= 4x2 .

Theorem
Let yp be a given solution of the non-homogeneous equation (21) and let

yc = c1 y1 (x) + c2 y2 (x)

be the general solution of the associated homogeneous equation, then the


general solution of the non-homogeneous equation is

y = yc (x) + yp (x)

where yc (x) is called the complementary function.

Variation of parameters

00 0
ay + by + cy = g(x), (22)
00 0
y + P y + Qy = f (x). (23)

Consider 00 0
y + P y + Qy = 0. (24)
Let y1 and y2 be linearly independent solutions of (24) the associated
homogeneous form of (23).
Let,
yp = u1 y1 + u2 y2 , (25)
where u1 = u1 (x) and u2 = u2 (x).
0 0 0 0 0
yp = u1 y1 + y1 u1 + u2 y2 + y2 u2 . (26)

11
Let 0 0
y1 u1 + y2 u2 = 0, (27)
then (26) becomes
0 0 0
yp = u1 y1 + u2 y2 .
Hence, 00 00 0 0 00 0 0
yp = u1 y1 + y1 u1 + u2 y2 + y2 u2 ,
and therefore,
00 0 00 0 0 00 0 0 0
yp + P yp + Qyp = u1 y1 + y1 u1 + u2 y2 + y2 u2 + P u1 y1
0
+P u2 y2 + Qu1 y1 + Qu2 y2
00 0 00 0
= u1 [y1 + P y1 1 + Qy1 ] + u2 [y2 + P y2 1 + Qy2 ]
0 0 0 0
+y1 u1 + y2 u2
0 0 0 0
= y1 u1 + y2 u2
= f (x) (28)

(28) and (27) constitute a linear system of equations for the derivatives
0 0
u1 and u2 ;
0 0 0 0
y1 u1 + y2 u2 = 0,
0 0 0 0
y1 u1 + y2 u2 = f (x).

By cramer’s rule we obtain



0 y2 y1 0
0
y 0 f (x)

0
f (x) y2 0
u1 = and u2 = 1 ,
y1 y2 y1 y2
0 0
y0 y0

y y2
1 1 2

y1 y2
where W (x) = 0 0 denotes the Wronskian.
y1 y2
Example
00
Solve 4y + 36y = csc3x.

Solution
00
y + 9y = 41 csc and m2 + 9 = 0 therefore m1 = 3i and m = −3i;
yc = c1 cos
3x + c2 sin 3x
cos 3x sin 3x
W (x) = = 3.
−3 sin 3x 3 cos 3x

12
Therefore yp = u1 cos 3x + u2 sin 3x and
0 0
u1 cos 3x + u2 sin 3x = 0
0 0 1
−3u1 sin 3x + 3u2 cos 3x = csc 3x
4



0 sin 3x
cos 3x 0
1 −3 sin 3x 1
0

4 csc 3x 3 cos 3x 1 0
4 csc 3x
1 cos 3x
u1 = =− and u2 = =− .
3 12 3 12 sin 3x
x 1
Therefore, u1 = − 12 and u2 = 36 ln | sin 3x|. Hence
x 1
yp = −
cos 3x + ln | sin 3x| sin 3x.
12 36
The general solution is thus,

y = yc + yp ,
x 1
= c1 cos 3x + c2 sin 3x − cos 3x + ln | sin 3x| sin 3x.
12 36

13

You might also like