1: FIRST ORDER LINEAR DIFFERENTIAL EQUATIONS
1.1: Introduction to Differential Equations
1.1.1: Basic Definition and Terminology
Definition:
An Ordinary Differential Equation (ODE) is an equation that contains one or several derivatives of an unknown function.
Example: 1. = sin x + 3
2. y`` + 2y` - 6y = ex
3. + 2 - - y = 0.
Notation: F(x, y, y`, y``, … ) = 0.
Standard Notations:
If is a function of , then the first order differential equation can be written as
or or
Similarly the second order differential equation can be written as
or or
and in general for differential equation we have
or or
The order of an ordinary differential equation is the order of the highest derivative that appears in the differential equation.
Example: 1. + y tan x = sin 2x. (first order)
2. x2 - 4x + 6y = x-1. (second order)
3. y`` - 4y` + 4y = 5x2 + e-x. (second order)
4. y``` - 3y`` + 3y – y = 0. (third order)
1.1.2 : How to form ODE.
A differential equation could be formed by eliminating an arbitrary constant from a given function.
Example 1. Form ODE from the function y = Ax + x2. (A constant)
Solution:
y = Ax + x2 … (i)
y`= A + 2x … (ii) → x(ii) : xy` = Ax + 2x2
(i) : y = Ax + x2
______
xy` - y = x2 (iii)
xy`- y = x2 . This is a first order differential equation which
derived from y = Ax + x2.
Example 2. Form ODE from the function y = x2 + .
Solution:
y = x2 + . Multiply with x, then
yx = x3 + A. Differenciate with respect to x,
→ y + x = 3x2 is the first order ODE.
Example 3. Form ODE from the function: y = Ax2 + Bx5.
Solution:
y = Ax2 + Bx5 …. (i)
y`= 2Ax + 5Bx4…. (ii)
y``= 2A + 20Bx3…. (iii)
x(ii): xy`= 2Ax2 + 5Bx5
2(i) : 2y = 2Ax2 + 2Bx5
______-
xy`-2y = 3Bx5 …… (iv)
x(iii): xy`` = 2Ax + 20 Bx4
(ii): y` = 2Ax + 5Bx4
_______
xy``- y`= 15 Bx4 ….. (v)
x(v): x2y``- xy` = 15Bx5
5(iv): 5xy` - 10y = 15Bx5
______
x2y``- 6 xy`+ 10y = 0 (second order ODE )
Example 4. Form ODE from the function y = Aex + Be-2x
Solution:
y = Aex + Be-2x …. (i)
e2x(i): ye2x = Ae3x + B. …. (ii)
Differentiating (ii): y`e2x + 2e2xy = 3Ae3x ….(iii)
Differentiating (iii): y``e2x + 2e2xy`+ 2e2xy`+4e2xy = 9Ae3x.
Or: y``e2x + 4e2x y` + 4e2xy = 9Ae3x …. (iv)
3(iii): 3y`e2x + 6e2xy = 9Ae3x
______
y``e2x + y`e2x - 2e2xy = 0
e2x(y``+ y` - 2y) = 0. But e2x ≠ 0
Thus the solution is: y`` + y` - 2y = 0
1.1.3: Concepts of Solution and Initial Value Problem
(A) Solution of a Differential Equation.
Definition: If y = F(x) is the solution of an ODE, hence a function F(x) satisfies the given differential equation.
Example. 5. Given + - 6y = 0. Show that:
(a) y = e2x is the solution.
(b) y = 5e2x + 4e-3x is the solution.
(c) y = xe2x is not the solution.
Solution:
(a) y = e2x…(i) thus = 2e2x …(ii) and = 4e2x …(iii)
Substitute (i), (ii) dan (iii) into the given diff. eq. hence
+ - 6y = 4e2x + 2e2x – 6e2x = 0.
It is shown that y = e2x is the solution.
(b) y = 5e2x + 4e-3x
= 10e2x – 12e-3x
= 20e2x + 36e-3x
→ + - 6y = 20e2x + 36e-3x + 10e2x – 12e-3x
-30e2x – 24e-3x
= 0
y = 5e2x + 4e-3x is the solution.
(c) y = xe2x
y` = 2xe2x + e2x
y``= 2e2x + 4xe2x + 2e2x = 4xe2x + 4e2x.
→ y``+ y` - 6y = 4xe2x + 4e2x + 2xe2x + e2x – 6e2x
= 5e2x ≠ 0.
y = xe2x is not the solution.
Example 6.
Find the value of m so that y = emx is the solution of the diffrential equation
2y`` + 5y` - 3y = 0.
Solution:
Given y = emx …..(i), thus y`= memx …(ii) and y``= m2emx …(iii)
Substitute (i), (ii) and (iii) into the ODE, hence
2y``+ 5y` - 3y =0
2m2emx + 5memx – 3emx =0
emx(2m2 + 5m – 3) = 0. But emx ≠ 0 hence,
2m2 + 5m – 3 = 0
(2m -1)(m + 3) = 0
m = { ½ , -3}.
(B) General & Particular Solution (Initial Value Problem).
Definition:
(i) General Solution
Solution obtained from integrating equations are called general solutions.
(ii) Particular Solution
Particular solution are the solutions obtained by assigning specific values to the arbitrary constants in the general solutions.
Example 7. Show that y = Aex + (x + 2)e2x is the general solution of the differential equation - y = (x + 3)e2x, and hence determine the value of A given that y = 4 when
x = 0.
Solution:
y = Aex + (x + 2)e2x
= Aex + 2(x + 2)e2x + e2x
= Aex + (2x + 5)e2x
→ - y = Aex +(2x + 5)e2x – Aex – (x + 2)e2x
= (2x + 5 – x – 2)e2x
= (x + 3)e2x. (shown)
Given that y = 4 when x = 0
→ y = Aex + (x + 2)e2x
4 = Ae0 + (0 + 2)e0
4 = A + 2
→ A = 2
Particular solution: y = 2ex + (x + 2)e2x
The particular solution could be obtained by substituting the given condition (y = 4 when x = 0). The conditions are called the initial condition of the differential equation.
Definition:
(i) Initial Value Problem (IVP) is a differential equation with initial conditions.
(Ex. y = 1 and y`= 2 when x = 0)
(ii) Boundary Value Problem (BVP) is a diff. equation with boundary conditions.
(Ex. y = 0 when x = 0 and y`= 2 when x = 1)
Example 8.
Show that y = is the general solution for x + 2 + 9xy = 0.
And hence obtain the particular solution with condition y() = -3 and y`() = 0.
Solution:
The conditions above are an initial condition (IVP)
y = -3 and y`= 0 when x = .
Given: yx = A kos3x + B sin 3x … (i)
x+ y = -3A sin3x + 3B kos3x … (ii)
x+ + = -9A kos3x – 9B sin3x.
x + 2 = -9(A kos3x + B sin3x) … (iii)
Substitute (i) into (iii), thus:
x + 2 + 9xy = 0. (shown)
Substitute y() = -3 into (i) → -3 = -A or A = 3
y`() = 0 into (ii) → y = -3B
-3 = -3B or B = 1.
The particular solution: y = .
Example 9.
Show that y = Ax3 + is the general solution for x2y`` + xy` - 9y = 0 and hence obtain the particular solution with conditions y(2) = 1 and y`(1) = 0.
Solution:
The condition above are a boundary condition (BVP), y(2) = 1 and y`(1) = 0.
y = Ax3 + or x3y = Ax6 + B … (i).
Differentiating (i), thus 3x2y + x3y`= 6Ax5
→ xy` = 6Ax3 – 3y … (ii).
Differentiating (ii), thus xy``+ y`= 18Ax2 – 3y`
→ xy``= 18Ax2 – 4y` …(iii)
Substitute (ii) and (iii) into given diff. equation,
x2y``+ xy`- 9y = 18Ax3- 4y`x + xy`- 9y
= 18Ax3 -3(6Ax3- 3y) – 9y
= 18Ax3 – 18Ax3 + 9y – 9y
= 0
Thus: y = Ax3 + is the general solution.
Substituting y(2) = 1 or y = 1 when x = 2
into diff. equation y = Ax3 + we get
1 = 8A + B or 8 = 64A + B…(iv)
Substituting y`(1) = 0 or y`= 0 when x = 1
into xy`= 6Ax3 – 3y we get
xy`= 6Ax3 – 3(Ax3 + )
xy` = 3Ax3 -
0= 3A – 3B → A = B … (v)
From simultaneous equation (iv) and (v), thus
64A + A = 8 → A = B =
Particular equation: y = (x3 + ).
1.2: First Order Ordinary Differential Equation(ODE)
General Form: = f(x,y)
Example: a) = 2y + sin x.
b) = .
There are four types of a first order ODE,
i) Separable differential equation.
ii) Homogeneous differential equation.
iii) Linear differential equation.
iv) Exact differential equation.
1.2.1: Separable Differential Equation.
The differential equation:
y` = f(x,y)
is said to be separable if the equation can be written as the product of a function of x, u(x) and the function of y, v(y).
The equation can be written in the form
= u(x).v(y) or = u(x).dx
hence, integrate both sides:
∫ = ∫ u(x) dx.
Example 10. Solve the equation: (x + 2) = y.
Solution: (x + 2) = y
∫ = ∫
ln|y| = ln|x+2| + C
ln|| = ec = A
y = A(x+2).
Example 11. Solve the equation: ex + xy2 = 0.
Solution:
ex + xy2 = 0.
∫ = - ∫ xe-xdx.
- = -[x ∫e-xdx - ∫{e-xdx}dx.
= -xe-x -∫-e-xdx
= -xe-x – e-x + C.
= -(x+1) e-x + C.
Example 12.
Solve the following differential equation: x2y dx + (x + 1) dy = 0 which satisfied condition y = 2 when x = 0.
Solution:
x2y dx + (x + 1) dy = 0
- = dx.
- = {(x – 1) + }dx.
-∫ = ∫(x – 1)dx + ∫
-ln|y| = - x + ln|x + 1| + C.
ln|y(x + 1)| = x – ½ x2 – C.
y(x + 1) = ex-1/2 x-C
y(x + 1) = A.ex-1/2 x, where A = e-C
y = 2 when x = 0, thus: 2 = A.
The solution is:
y = . ex- ½ x
Substitution Method.
Example 13.
Solve the equation: = which satisfied the condition y(1) = 1.
Solution : Subsitute z = x + y
1 + thus = - 1
→ - 1 =
= + 1 = =
dz = 2 dx.
∫(1 + ) dz = ∫2 dx.
z + 2ln|z+3| = 2x + C.
2ln|z+3| = 2x – x – y + C
(z + 3)2 = A.ex-y, where A = eC.
y(1) = 1 → (1+1+3)2 = A.e1-1
25 = A
The solution is: (x + y + 3)2 = 25 ex-y .
Example 14. Solve the equation:
x + y = 2x((1 + x2y2).
Solution: Substitute z = xy, hence
→ = 2x(1 + z2)
∫ = ∫ 2xdx.
tan-1 z = x2 + C.
z = tan(x2 + C)
xy = tan(x2 + C).
y =
1.2.2:Homogeneous Equations
Consider the differential equation = f(x, y).
If: f(λx, λy) = f(x, y) for each , hence = f(x, y) is called a homogeneous equation.
Example: i). = = f(x, y)
f(λx, λy) = =
= = f(x, y) [homogeneous].
ii). = x – y = f(x, y).
f(λx, λy) = λx – λy = λ(x – y) ≠ f(x, y).
f(x, y) non-homogeneous.
The method of solving a homogenous diff. equation is by using the following substitution.
y = x.v, hence = x + v
Example 15. Solve the differential equation = with condition y(0) = 2.
Solution: By using substitution y = xv and = x+ v.
Thus: x + v = =
x = - v = = -
∫ () dv = - ∫ dx.
+ ln |v| = -ln|x| + C.
ln |xv| = + C. [v = ]
y = A.ex/2y , where A = eC
Then y(0) = 2 , hence A = 2.
The solution is: y = 2ex/2y
Example 16. Solve the differential equation = with condition y(3) = 1.
Solution:
f(λx, λy) = = = = f(x, y).
Substitute y = xv and , hence
x + v = = .
x = - v = .
∫()dv = ∫-2
∫{ + }dv = -∫ 2.
ln|v + 1| + ln|v – 1| = -2ln|x| + C
ln|v + 1| + 3ln|v – 1| = -4ln|x| + 2C
(v + 1)(v – 1)3.x4 = A , where A = e2C
()()3.x4 = A
(y + x)(y – x)3 = A
The condition y(3) = 1 → A = -32.
The solution is: (y + x)(y – x)3 + 32 = 0.
1.2.3: Linear Equations.
Note: a(x)+ b(x).y = c(x).
+ .y =
or: + p(x).y = q(x)
where p(x) = and q(x) = This is the general form of a linear differential equations.