Linear partial differential equations of mathematical physics
Linear Differential Equations
-
Upload
bhatsindhoor -
Category
Documents
-
view
155 -
download
21
description
Transcript of Linear Differential Equations
-
SMS 2308 - Mathematical Methods
Lecture Notes
Samsun Baharin Haji Mohamad
March 30, 2012
1
-
Contents
1 Introduction to Differential Equations 31.1 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.2 Solution of Differential Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.3 Linearly Independent Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2 First Order and First Degree ODEs 52.1 Separation of Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.2 Homogeneous Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2.1 Equations Reducible to Homogeneous Form . . . . . . . . . . . . . . . . . . 92.3 Linear First-order Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.3.1 Bernoullis Equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142.4 Exact Differential Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.4.1 Reduction to Exact Form, Integrating Factor . . . . . . . . . . . . . . . . . 16
3 Second Order Linear Differential Equation 183.1 Homogeneous Linear ODEs with Constant Coefficients . . . . . . . . . . . . . . . . 183.2 Non-homogeneous ODEs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.2.1 Method of Undetermined Coefficients . . . . . . . . . . . . . . . . . . . . . 213.2.2 Method of Variation of Parameters . . . . . . . . . . . . . . . . . . . . . . . 23
4 Other Types of ODE 244.1 ODE with y is missing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244.2 ODE with x is missing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.3 Equation of the type d2ydx2 = f(y) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.4 Euler-Cauchy Equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274.4.1 Method 1: Using substitution x = ez . . . . . . . . . . . . . . . . . . . . . . 274.4.2 Method 2: Using y = xm . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
4.5 One Solution is Known . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
5 Higher Order Linear ODEs 335.1 Homogeneous Linear ODEs with Constant Coefficients . . . . . . . . . . . . . . . . 335.2 Non-Homogeneous Linear ODEs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
5.2.1 Method of Variation of Parameters . . . . . . . . . . . . . . . . . . . . . . . 355.2.2 Annihilator Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
2
-
1 Introduction to Differential Equations
1.1 Definitions
A differential equation is an equation which involve differential coefficients or differentials. Forexample, the equations below are all differential equations.
1. exdx+ eydy = 0
2. d2xdt2 + n
2x = 0
3. y = x dydx + xdxdy
4.
[1 +
(dydx
)2]3/2/ d
2ydx2 = c
5. dxdy wy = a cos(pt), dydt + wx = a sin(pt)
6. xux + yuy = 2u
7. 2yt2 = c
2 2yx2
An ordinary differential equations (ODE) is differential equations where all the differentialcoefficients have reference to a single independent variable. Item 1 to 5 in the list are all ODEs.
A partial differential equation (PDE) is differential equations which there are two or moreindependent variables and partial differential coefficients with respect to any of them. Item 6 and7 are PDEs.
The ORDER of a differential equation is the order of the highest derivative appearing in it.The DEGREE of a differential equation is the degree of the highest derivative occuring in it,
after the equation has been expressed in a form free from any radicals or fractions as far as thederivatives are concerned.
From the list above, we can see that
1. Item 1 is of the first order and first degree.
2. Item 2 is of the second order and first degree.
3. Item 3 written as y dydx = x(dydx
)2+ x is clearly of the first order but of second degree.
4. Item 4 written as
[1 +
(dydx
)2]3= c2
(d2ydx2
)2is of the second order and second degree.
1.2 Solution of Differential Equations
A solution of a differential equation is a relation between the variables which satisfies the givendifferential equation.
y = A cos(nx+ )
is a solution of
d2y
dx2+ ny2 = 0
The general (or complete) solution of a differential equation is that in which the number ofarbitrary constants are equal to the order of the differential equation. Thus y = A cos(nx + ) is
3
-
a solution for d2ydx2 +ny
2 = 0 as the number of arbitrary constants (A,) are the same as the order
of d2ydx2 + ny
2 = 0.A particular solution is a solution that can be obtained from general solution by giving
particular values to the arbitrary constants. For example
y = A cos(nx+ pi/4)
is the particular solution of the equation d2ydx2 + ny
2 = 0 as it can be derived from the generalsolution y = A cos(nx+ ) by putting = pi/4.
A differential equation may sometimes have an additional solution which cannot be obtainedfrom the general solution by assigning a particular value to the arbitrary constant. Such a solutionis called a singular solution.
1.3 Linearly Independent Solution
Two solutions y1(x) and y2(x) of the differential equation
d2y
dx2+ P (x)
dy
dx+Q(x)y = 0
are said to be linearly independent if c1y1(x) + c2y2(x) = 0 such that c1 = 0 and c2 = 0.If c1 and c2 are not both zero, then the two solutions y1(x) and y2(x) are said to be linearly
dependent.
If y1(x) and y2(x) any two solutions ofd2ydx2 +P (x)
dydx +Q(x)y = 0, then their linear combination
c1y1(x) + c2y2(x) where c1 and c2 are constants, is also a solution ofd2ydx2 + P (x)
dydx +Q(x)y = 0.
4
-
2 First Order and First Degree ODEs
Some special methods to find solutions for these ODEs will be discussed here,
1. Separation of Variables
2. Homogeneous equations
3. Linear equations
4. Exact equations.
2.1 Separation of Variables
If in an equation, it is possible to collect all function of x and dx on one side and all the functionsof y and dy on the other side, then the variables are said to be separable. Thus the general formof such equation is
f(x)dx = g(y)dy
Integrating both sides, we get f(x)dx =
g(y)dy + c
as its solution.
Example 1
Solvedy
dx=x(2 log x+ 1)
sin y + y cos y
We separate them into(sin y + y cos y)dy = (x(2 log x+ 1))dx
Integrating both side, we getsin ydy +
y cos ydy = 2
log x xdx+ 2
xdx
cos y +[y sin y
sin y 1dy + c
]= 2
[(log x x
2
2
1
x x
2
2dx
)+x2
2
] cos y + y sin y + cos y + c = 2x2 log x x
2
2+x2
2
Hence the solution is2x2 log x y sin y = c
Example 2
Solvedy
dx= e3x2y + x2e2y
We separate them intoe2ydy = (e3x + x2)dx
5
-
Integrating both side, we get e2ydy =
(e3x + x2)dx+ c
e2y
2=e3x
3+x3
3+ c
Hence the solution is3e2y = 2(e3x + x3) + 6c
Example 3
Solvedy
dx= sin(x+ y) + cos(x+ y)
Setting x+ y = t so that dy/dx = dt/dx 1. The given equation becomesdt
dx 1 = sin t+ cos t
dx =dt
1 + sin t+ cos t
Integrating both side, we getdx =
dt
1 + sin t+ cos t+ c
x =
2d
1 + sin 2 + cos 2+ c (setting t = 2)
=
2d
2 cos2 + 2 sin cos c
=
sec2
1 + tan d + c
= log(1 + tan ) + c
Hence the solution is
x = log
[1 + tan
1
2(x+ y)
]+ c
Example 4
Solvey
x
dy
dx+
x2 + y2 12(x2 + y2) + 1
= 0
Setting x2 + y2 = t, we get
2x+ 2ydy
dx=dt
dx
ory
x
dy
dx=
1
2x
dt
dx 1
6
-
The given equation becomes
1
2x
dt
dx 1 + t 1
2t+ 1= 0
1
2x
dt
dx= 1 t 1
2t+ 1=
t+ 2
2t+ 1
2xdx =2t+ 1
t+ 2dt
2xdx =
(2 3
t+ 2
)dt
Integrating both side, we get 2xdx =
(2 3
t+ 2
)dt+ c
x2 = 2t 3 log(t+ 2) + c
Hence the solution isx2 + 2y2 3 log(x2 + y2 + 2) + c = 0
2.2 Homogeneous Equations
Homogeneous equations are of the form
dy
dx=f(x, y)
g(x, y)
where f(x, y) and g(x, y) are homogeneous functions of the same degree in x and y.To solve a homogeneous equation,
1. Set y = ux, then dydx = u+ xdudx
2. Separate the variables u and x, and integrate.
Example 1
Solve(x2 y2)dx xydy = 0
Rearrange the equation, we getdy
dx=x2 y2xy
Setting y = ux, then dydx = u+ xdudx , the equation becomes,
u+ xdu
dx=
1 u2u
xdu
dx=
1 2u2u
Separating the variables, we getu
1 2u2 du =dx
x
7
-
Integrating both sides, we get u
1 2u2 du =dx
x+ c
14
4u1 2u2 du =
dx
x+ c
14
log(1 2u2) = log x+ c4 log x+ log(1 2u2) = 4c
log x4(1 2u2) = 4c
x4(
1 2y2
x2
)= e4c = c (Set u = y/x)
Hence the solution isx2(x2 2y2) = c
Example 2
Solve (x tan
y
x y sec2 y
x
)dx+
(x sec2
y
x
)dy = 0
The equation can be rearrange into homogeneous equation
dy
dx=(yx
sec2y
x tan y
x
)cos2
y
x
Setting y = ux, then dydx = u+ xdudx , the equation becomes,
u+ xdu
dx= (u sec2 u tanu) cos2 u
xdu
dx= u tanu cos2 u u
Separating the variables, we getsec2 u
tanudu = dx
x
Integrating both side, we get sec2 u
tanudu =
dx
x
log tanu = log x+ log cx tanu = c
Hence the solution isx tan
y
x= c
Example 3
Solve
(1 + ex/y)dx+ ex/y(
1 xy
)dy = 0
8
-
Rewrite the equation into its homogeneous form, we get
dx
dy=
ex/y(
1 xy)
(1 + ex/y)
Setting x = uy, then dxdy = u+ ydudy , the equation becomes
u+ ydu
dy= e
u(1 u)(1 + eu)
ydu
dy= e
u(1 u)(1 + eu)
u = u+ eu
(1 + eu)
Separating the variables, we get
dyy
=1 + eu
u+ eudu =
d(u+ eu)
u+ eu
Integrating both side, we get
dy
y=
d(u+ eu)
u+ eu
log y = log(u+ eu) + cy(u+ eu) = ec = c
Hence the solution isx+ yex/y = c
2.2.1 Equations Reducible to Homogeneous Form
The equation of the formdy
dx=
ax+ by + c
ax+ by + c
can be reduced to the homogeneous form as follows:
Case I. When aa 6= bbSetting
x = X + h, y = Y + k, (h, k are constants)
anddx = dX, dy = dY
the equation becomesdY
dX=
aX + bY + (ah+ bk + c)
aX + bY + (ah+ bk + c)
we choose h and k so that dYdX become homogeneous equation.Set ah+ bk + c = 0 and ah+ bk + c = 0 so that
h
bc bc =k
ca ca =1
ab baor
h =bc bcab ba, and k =
ca caab ba
9
-
Thus when ab ba 6= 0, dYdX becomesdY
dX=
aX + bY
aX + bY
which is homogeneous in X, Y and be solved by setting Y = uX.
Example
Solvedy
dx=y + x 2y x 4
Settingx = X + h, y = Y + k, (h, k are constants)
anddx = dX, dy = dY
the equation becomesdy
dx=y + x+ (k + h 2)y x+ (k h 4)
Letting k + h 2 = 0 and k h 4 = 0, then h = 1 and k = 3 then the equation will bedYdX =
Y+XYX which is homogeneous in X and Y .
Setting Y = uX, then dYdX = u+XdudX , the equation becomes,
u+Xdu
dX=u+ 1
u 1Xdu
dX=
1 + 2u u2u 1
u 11 + 2u u2 du =
dX
X
Integrating both sides, we get
12
2 2u
1 + 2u u2 du =dX
X
12
log(1 + 2u u2) = logX + c
log
(1 +
2Y
X2 Y
2
X2
)+ logX2 = 2c
log(X2 + 2XY Y 2) = 2cX2 + 2XY Y 2 = e2c = c
Setting X = x h = x+ 1 and Y = y k = y 3, the previous equation becomes
(x+ 1)2 + 2(x+ 1)(y 3) (y 3)2 = cx2 + 2xy y2 4x+ 8y 14 = c
which is the required solution.
Case II. When aa =bb
When ab ba = 0, the above method fails as h and k become infinite or undetermined.
10
-
Seta
a=
b
b=
1
mor
a = am, b = bm
then dydx becomesdy
dx=
(ax+ by) + c
m(ax+ by) + c
Setting ax+ by = t, so that a+ b dydx =dtdx or
dydx =
1b
(dtdx a
), then the previous equation becomes
1
b
(dt
dx a)
=t+ c
mt+ c
dt
dx= a+
bt+ bc
mt+ c
=(am+ b)t+ ac + bc
mt+ c
so the variables are separable. In the solution, setting t = ax+ by, we get the required solution ofdydx
Example
Solve(3y + 2x+ 4)dx (4x+ 6y + 5)dy = 0
The equation can be rearrange as
dy
dx=
(2x+ 3y) + 4
2(2x+ 3y) + 5
Setting 2x+ 3y = t, then 2 + 3 dydx =dtdx The equation becomes,
1
3
(dt
dx 2)
=t+ 4
2t+ 5
dt
dx=
7t+ 22
2t+ 52t+ 5
7t+ 22dt = dx
Integrating both sides, 2t+ 5
7t+ 22dt =
dx (
2
7 9
7 1
7t+ 22
)= x+ c
2
7t 9
49log(7t+ 22) = x+ c
Setting t = 2x+ 3y, we have
14(2x+ 3y) 9 log(14x+ 21y + 22) = 49x+ 49c21x 42y + 9 log(14x+ 21y + 22) = c
which is the required solution.
11
-
2.3 Linear First-order Equations
A differential equation is said to be linear if the dependent variable and its differential coefficientsoccur only in the first degree and not multiplied together.
Thus the standard form of a linear equation of the first order is,
dy
dx+ Py = Q
where P Q are the functions of x.To solve the equation, we multiply both sides by e
Pdx, so we get
dy
dx ePdx + y
(ePdxP
)= Qe
Pdx
d
dx
(yePdx)
= QePdx
Integrating both side, we get
yePdx =
QePdx + c
as the required solution.
Example 1
Solve
(x+ 1)dy
dx y = e3x(x+ 1)2
Divide the equation with (x+ 1), we get
dy
dx yx+ 1
= e3x(x+ 1)
Here P = 1x+1 and Pdx =
dx
x+ 1= log(x+ 1) = log(x+ 1)1
The integrating factor is
ePdx = elog(x+1)
1=
1
x+ 1
Thus the solution for the equation is
y
x+ 1=
[e3x(x+ 1)]
1
x+ 1dx+ c
=
e3xdx+ c
=1
3e3x + c
So the solution is
y =
(1
3e3x + c
)(x+ 1)
12
-
Example 2
Solve (e2x
x
)dx
dy= 1
Rewrite the equation intody
dx+
yx
=e2x
x
where P = 1x
and Pdx =
1x
= 2x
then the integrating factor becomes ePdx = e2
x
The solution for the equations is
y e2x =
e2x
x e2xdx+ c
=
1xdx+ c
So the solution isy e2
x = 2
x+ c
Example 3
Solve
3x(1 x2)y2 dydx
+ (2x2 1)y3 = ax3
Setting z = y3 and 3y2 dydx =dzdx , the equation becomes
x(1 x2)dzdx
= (2x2 1)z = ax3
dz
dx+
2x2 1x x3 z =
ax3
x x3
Here P = 2x21
xx3 and Pdx =
2x2 1x x3 dx
=
( 1x 1
2
1
1 + x+
1
2
1
1 x)dx
= log x 12
log(1 + x) 12
log(1 x)
= log[x
1 x2]
The integrating factor is
exp
(2x2 1x x3 dx
)= e log[x
1x2] =
[x
1 x2]1
13
-
So the solution is
z[x
1 x2] = a
x3
x(1 x2) 1
x
1 x2 dx+ c
= a
x(1 x2)3/2dx+ c
= a2
(2x)(1 x2)3/2dx+ c
z[x
1 x2] = a(1 x2)1/2 + cInserting z = y3, we get
y3 = ax+ cx
1 x2
2.3.1 Bernoullis Equation
The equationdy
dx+ Py = Qyn
where P, Q are function of x is reducible to linear equation of the first order. This is a Bernoullisequation.
To solve it, we divide both sides with yn so that
yndy
dx+ Py1n = Q
Setting y1n = z so that
(1 n)yn dydx
=dz
dxThen, the equation becomes
1
1 ndz
dx+ Pz = Q
dz
dx+ P (1 n)z = Q(1 n)
which is a linear equation of the first order and can be solved easily.
Example
Solve
xdy
dx+ y = x3y6
.Divide both sides with xy6, we get
y6dy
dx+y5
x= x2
Setting y5 = z and
5y6 dydx
=dz
dxThe equation becomes
15
dz
dx+z
x= x2
dz
dx 5xz = 5x2
14
-
which is the same as dydx + Py = Q pattern. So we can use the integrating factor.Integrating factor is
ePdx = e
(5/x)dx
= e5 log x
= elog x5
= x5
The solution is
z x5 =
(5x2) x5dx+ c
y5x5 = 5 x2
2 + c
Divide both side with y5x5, we get
1 = (2.5 + cx2)x3y5
which is the required solution.
2.4 Exact Differential Equations
A differential equation of the form
M(x, y)dx+N(x, y)dy = 0
is said to be exact if its left hand side member is the exact differential of some function u(x, y)which is
du Mdx+Ndy = 0The solution is therefore
u(x, y) = c
From calculus, we see that the partial derivatives of u(x, y) is
du =u
xdx+
u
ydy
Comparing with du Mdx+Ndy, then we see thatu
x= M
u
y= N
If we differentiate M with respect to y and N with respect to x, we get
M
y=
2u
yx
N
x=
2u
xy
orM
y=N
x
We integrate ux = M with respect to x, we get
u =
Mdx+ k(y) k(y) is a constant
15
-
To determine k(y), we derive uy from this equation, and useuy = N to get dk/dy, and integrate
dk/dy to get k.
Example
Solvecos(x+ y)dx+ (3x2 + 2y + cos(x+ y))dy = 0
Test for exactness
M = cos(x+ y)
N = (3x2 + 2y + cos(x+ y))
Thus
M
y= sin(x+ y)
N
x= sin(x+ y)
So the equation is exact.Implicit general solution
u =
Mdx+ k(y)
=
cos(x+ y)dx+ k(y)
= sin(x+ y) + k(y)
To find k(y), we differentiate u = sin(x+ y) + k(y) with respect to y, we get
u
y= cos(x+ y) +
dk
dy
N = 3y2 + 2y + cos(x+ y)
So, dkdy is
dk
dy= 3y2 + 2y
By integration k(y) isk(y) = y3 + y2 + c
Inserting k(y) into u = sin(x+ y) + k(y), we obtain the answer
u(x, y) = sin(x+ y) + y3 + y2 = c
2.4.1 Reduction to Exact Form, Integrating Factor
We can transform a non-exact equation,
P (x, y)dx+Q(x, y)dy = 0
by multiplying it with a function F (x, y) producing an exact equation
FPdx+ FQdy = 0
16
-
which can be solve by using the method from the previous section. F (x, y) is called IntegratingFactor.
How to find Integrating factor
For Mdx + Ndy = 0, the exactness condition is M/y = N/x. For F (x) and FPdx +FQdy = 0, the exactness condition is
(FP )/y = (FQ)/x
By product rule, we getFPy = F
Q+ FQx
Dividing by FQ and rearrange, we get
1
F
dF
dx= R where R =
1
Q
(P
y Qx
)If we integrate the equation with respect to x and taking the exponent on both side, we get
the integrating factor which is
F (x) = exp
R(x)dx
and if our initial is F (y), we get
F (y) = exp
R(y)dy where R(y) =
1
P
(Q
x Py
)
Example
Find an integrating factor and solve the initial value problem of
(ex+y + yey)dx+ (xey 1)dy = 0, y(0) = 1
Test for exactness
P
y= ex+y + ey + yey
Q
x= ey
Since Py 6= Qx , so we have to find the integrating factor to make it an exact equation.R(x) fail, since it on both x and y, so we have to use R(y), which is
R(y) =1
P
(Q
x Py
)=
1
ex+y + yey(ey (ex+y + ey + yey))
= 1
Hence the integrating factor is F (y) = exp 1dy = e1. Multiplying the integrating factor to
the original equation, we get(ex + y)dx+ (x ey)dy = 0
17
-
which is an exact equation and be solve using the previous method.
u =
(ex + y)
= ex + xy + k(y)
u
y= x+
dk
dy= N = x ey
dk
dy= ey
k = ey + cHence, the general solution is
u(x, y) = ex + xy + ey = c
The particular solution is
u(0, 1) = e0 + 0 1 + e1 = 3.72ex + xy + ey = 3.72
3 Second Order Linear Differential Equation
3.1 Homogeneous Linear ODEs with Constant Coefficients
A second-order homogeneous linear ODEs with constant coefficient is
y
+ ay+ by = 0
The solution is
y = ex
y
= ex
y
= 2ex
If we put into the equation and rearrange, we will get
(2 + a+ b)ex = 0
Hence is a solution of the important characteristic equation
2 + a+ b = 0
The roots for this quadratic equation is
1 =1
2(a+
a2 4b) 2 = 1
2(a
a2 4b)
then the functiony1 = e
1x y2 = e2x
are solutions for second-order homogeneous linear ODEs with constant coefficient.From algebra, we know that the quadratic equation might have three different kind of roots,
depending on the sign of the discriminant a2 4b, which are1. Two real roots if a2 4b > 0.2. A real double root if a2 4b = 0.
18
-
3. Complex conjugate roots if a2 4b < 0
Case I: Two Distinct Real Root 1 and 2
In this case, the basic solution is
y1 = e1x and y2 = e
2x
and the general solution isy = c1e
1x + c2e2x
Example
Solve the initial value problem
y
+ y 2y = 0, y(0) = 4, y(0) = 5
The characteristics equation is2 + 2 = 0
Its roots are,1 = 1 and 2 = 2
So the general equation isy = c1e
x + c2e2x
For finding particular solution, we differentiate once
y
= c1ex 2c2e2x
and using the initial condition, we get
y = ex + 3e2x
Case II: Real Double Root = a/2
When a2 4b = 0 we only get one root, = 1 = 2 = a/2, hence the only solution is
y1 = e(a/2)x
To obtain the second independent solution y2, we set y2 = uy1. Substitute this and its derivativey2 and y
2 , we get
(uy1 + 2uy + uy1 ) + (a(u
y1 + uy1) + buy1 = 0
Collecting termuy1 + u(2y
1 + ay1) + u(y
1 + ay
1 + by1) = 0
The second and third expression is zero, so we are left with
uy1 = 0
By two integrations, we getu = c1x+ c2
19
-
we choose c1 = 1 and c2 = 0 then u = x, so y2 = xy1, so the general solution is
y = (c1 + c2x)e(a/2)x
Example
Solve the initial value problem
y + y + 0.25y = 0 y(0) = 3.0, y(0) = 3.5
The characteristic equation is
2 + + 0.25 = (+ 0.5)2 = 0
It has double root = 0.5, this give the general solution as
y = (c1 + c2x)e0.5x
Taking the derivative and find c1 and c2, so we get the particular solution as
y = (3 2x)e0.5x
Case III: Complex Roots 12
+ i and 12 i
The discriminant is a2 4b < 0, two complex roots, or we can obtain a real solution by using
y1 = eax/2 cosx and y2 = eax/2 sinx
where = b 14a2. The real general solution for Case III is
y = eax/2(A cosx+B sinx)
where A, B are arbitrary constants.
Example
Solve the initial value problem
y + 0.4y + 9.04y = 0, y(0) = 0, y(0) = 3
The characteristic equation is2 + 0.4+ 9.04 = 0
so the roots are 1 = 0.2 + 3i and 1 = 0.2 3i. Hence = 3. The general solution is
y = e0.2x(A cos 3x+B sin 3x)
Differentiate the general solution and using the initial value, we get the particular solution as
y = e0.2x sin 3x
20
-
3.2 Non-homogeneous ODEs
A general solution for a non-homogeneous ODEs
y + p(x)y + q(x)y = r(x), r(x) 6= 0on open interval I is a solution of the form
y(x) = yh(x) + yp(x)
where, yh = c1y1 + c2y2 is a general solution from homogeneous ODE and yp is any solution ofnon-homogenous ODE containing no arbitrary constant.
3.2.1 Method of Undetermined Coefficients
Method of undetermined coefficients is suitable for linear ODEs with constant coefficients a and b,
y + ay + by = r(x)
when r(x) is an exponential function, a power of x, a cosine or sine, or sums or products of suchfunctions. These functions have derivative similar to r(x) itself. So, we choose a form for yp similarto r(x), but with unknown coefficients to be determined by substituting yp and its derivatives intothe ODE. Table below shows the choice for yp for important form of r(x).
Term in r(x) Choice for ypkex Cex
kxn (n = 0, 1, ) Knxn +Kn1xn1 + +K1x+K0k cosx K cosx+M sinxk sinx K cosx+M sinxkex cosx ex(K cosx+M sinx)kex sinx ex(K cosx+M sinx)
And the choice of rules for the method of undetermined coefficients are
1. Basic Rule: If r(x) is one of the functions in the first column from the table, choose ypfrom the same line and determine the coefficients by substituting yp and its derivatives intothe equation
2. Modification rule: If a term in our choice for yp happens to be a solution of the ho-mogeneous ODE corresponding to the equation, we multiply the choice of yp by x or x
2
etc.
3. Sum Rule: If r(x) is a sum of functions in the first column of the table; we choose yp bysumming up the functions in the corresponding line.
Example 1: Rule 1
Solve the initial value problem
y + y = 0.001x2, y(0) = 0, y(0) = 1.5
The general solution for homogeneous ODE y + y = 0 is
yh(x) = A cosx+B sinx
Solution for non-homogeneous ODE, setting yp = Kx2, then y
p = 2K. Substitute into the
equation, we get2K +Kx2 = 0.001x2
21
-
Comparing both sides, we see that
2K = 0, K = 0.001
which the value of K contradict each other, so yp = Kx2 is not the solution for this equation.
Looking from the table, the choice of yp for the term r(x) = Kxn is yp = K2x
2 + K1x + K0,then
yp + yp = 2K2 + 2K2x
2 +K1x+K0 = 0.001x2
Comparing both sides, we get
K2 = 0.001, K1 = 0, K0 = 0.002This gives
yp = 0.001x2 0.002
and the general solution becomes,
y = yh + yp = A cosx+B sinx+ 0.001x2 0.002
To find the value for A and B, we use the initial condition
y(0) = A cos 0 +B sin 0 + 0.001(0)2 0.002= A 0.002 = 0
So, A = 0.002. To find B, we diffentiate the general solution once and put the initial condition
y = yh + y
p
= A sinx+B cosx+ 0.002xy(0) = A sin 0 +B cos 0 + 0.002(0)
= B = 1.5
So, B = 1.5. This gives the answer as
y = 0.002 cosx+ 1.5 sinx+ 0.001x2 0.002
Example 2: Rule 2
Solve the initial value problem
y + 3y + 2.25y = 10e1.5x, y(0) = 1, y(0) = 0The general solution for the homogeneous ODE,
y + 3y + 2.25y = 0
where 2 + 3+ 2.25 = (+ 1.5)2 = 0 is
yh = (c1 + c2x)e1.5x
The solution of non-homogeneous ODE cannot be taken as yp = Ce1.5x since this a solution
for homogeneous ODE. So, by using rule number 2, we modify our choice function by x2. That is,we use
yp = Cx2e1.5x
yp = C(2x 1.5x2)e1.5x
yp = C(2 3x 3x+ 2.25x2)e1.5x
22
-
Substitute these equations into the main equation, by ignoring the e1.5x, we get
C(2 6x+ 2.25x2) + 3C(2x 1.5x2) + 2.25Cx2e1.5x = 10
Comparing both sides, we get 2C = 10, so C = 5 and the solution is
yp = 5x2e1.5x
Hence the general equation becomes
y = yh + yp = (c1 + c2x)e1.5x 5x2e1.5x
Using the initial condition to find c1 and c2, we get
c1 = 1, and c2 = 1.5
This give the answer which is
y = (1 + 1.5x)e1.5x 5x2e1.5x
Example 3: Rule 3
Solve the initial value problem
y + 2y + 5y = e0.5x + 40 cos 10x 190 sin 10x, y(0) = 0.16, y(0) = 40.08
The general solution for homogeneous ODE y+ 2y+ 5y = 0 from the characteristics equation
2 + 25 = (+ 1 + 2i)(+ 1 2i) = 0
isyh = e
x(A cos 2x+B sin 2x)
The solution for non-homogeneous ODE, we choose our yp as summation of two function fromthe table, that is
yp = Ce0.5x +K cos 10x+M sin 10x
Substitute into the equation and comparing both side, we get
C = 0.16, K = 0, M = 2
Hence the solution is
y = yh + yp = ex(A cos 2x+B sin 2x) + 0.16e0.5x + 2 sin 10x
From the initial condition, we found that A = 0 and B = 10, hence the complete solution is
y = 10ex sin 2x+ 0.16e0.5x + 2 sin 10x
3.2.2 Method of Variation of Parameters
A particular solution yp for non-homogeneous linear ODE where r(x) is not an exponential functionex, a power of x, a cosine or sine, or sums or products of such functions can be determine by usingthe following formula
yp(x) = y1
y2r(x)
Wdx+ y2
y1r(x)
Wdx
23
-
where y1 and y2 are solutions for the corresponding homogeneous ODE,
y + P (x)y +Q(x)y = 0
and W is the Wronskian of y1 , y2,
W = y1y2 y2y
1
Example
Solve the non-homogeneous ODE
y + y = secx
From the homogeneous solution we get y1 = cosx and y2 = sinx. Using these information, wecan get the Wronskian as
W = cosx cosx sinx ( sinx) = 1By using the formula, yp is
yp = cosx
sinx secx1
dx+ sinx
cosx secx
1dx
= cosx ln | cosx|+ x sinx
The complete solution will be
y = yh + yp
= c1 cosx+ c2 sinx+ cosx ln | cosx|+ x sinxy = (c1 + ln | cosx|) cosx+ (c2 + x) sinx
4 Other Types of ODE
4.1 ODE with y is missing
The equation which do not contain y directly can be written as
f
(d2y
dx2,dy
dx, x
)= 0
on substituting
dy
dx= p
d2y
dx2=dp
dx
we get
f
(dp
dx, p, x
)= 0
24
-
Example
Find the solution for this ODE
(1 x2)D2 xD = 2
By setting dydx = p andd2ydx2 =
dpdx , we get
(1 x2)dpdx xp = 2
dp
dx x
1 x2 p =2
1 x2Integrating factor is
I.F = e ( x
1x2)
= e1/2log(1x2)
= elog1x2
=
1 x2
Hence, the solution is
p
1 x2 = 2
1 x21 x2 dx
=
2
1 x2 dx
= 2 sin1 x+ c1
or p =2 sin1 x
1 x2 +c1
1 x2
ordy
dx=
2 sin1 x1 x2 +
c11 x2
On integrating with respect to x, we get
y = (sin1 x)2 + c1 sin1 x+ c2
4.2 ODE with x is missing
The equations that do not contain x directly are of the form
f
(d2y
dx2,dy
dx, y
)= 0
On substituting
dy
dx= p
d2y
dx2=dp
dx=dp
dy dydx
d2y
dx2=dp
dy p
25
-
we get
f
(dp
dx, p, y
)= 0
Example
Solve the following equation
yd2y
dx2+
(dy
dx
)2=dy
dx
Put dydx = p andd2ydx2 =
dpdy p into the equation, we get
ydp
dy p+ (p)2 = p
or ydp
dy= 1 p
ordp
1 p =dy
y
or log(1 p) = log y + log c1or
1
1 p = c1y
or p = 1 1c1y
ordy
dx=c1y 1c1y
dydx
= p
orc1y
c1y 1dy = dx
or
(1 +
1
c1y 1)dy = dx
y + 1c1
log(c1y 1) = x+ c2
4.3 Equation of the type d2y
dx2= f(y)
Multiplying with 2 dydx , we get
2dy
dx d
2y
dx2= 2
dy
dx f(y)
Integrating with respect to x, we get(dy
dx
)2= 2
f(y)dy + c1
= (y), (y) = 2f(y)dy + c1
dy
dx=(y)
dy(y)
= dx
So the solution is dy(y)
= x+ c2
26
-
Example
Solve the following equation
d2y
dx2=y, y(0) = 1, y(0) =
23
Multiplying with 2 dydx , we get
2dy
dx d
2y
dx2= 2
dy
dx y
Integrating with respect to x,we get(dy
dx
)2=
4
3y3/2 + c1
=4
3y3/2, c1 = 0 using IVP
dy
dx=
23y3/4
y3/4dy =23dx
Integrating both side and using IVP values, we get
y1/4 =23x+ c2
=23x+ 1, c2 = 1 using IVP
4.4 Euler-Cauchy Equation
An equation of the form
a2x2 d
2y
dx2+ a1x
dy
dx+ a0y = r(x)
where a0, a1anda2 are constants is called Euler-Cauchy Equation. We will discuss two methodwhich can be use to solve this equation.
4.4.1 Method 1: Using substitution x = ez
An Euler-Cauchy equation can be reduced to a linear equation with constant coefficients by chang-ing the independent variable from x to z where
x = ez, z = log x,d
dz= D
For x dydx
dy
dx=dy
dz dzdx
=1
x dydz
xdy
dx=dy
dz
xdy
dx= Dy
27
-
And for x2 d2ydx2 , we get
d2y
dx2=
d
dx
(dy
dx
)=
d
dx
(1
x dydz
)= 1
x2dy
dz+
1
x
d2y
dz2dz
dx
= 1x2dy
dz+
1
x
d2y
dz21
x
=1
x2
(d2y
dz2 dydz
)=
1
x2(D2 D)y
x2d2y
dx2= (D2 D)y
Substitution of x dydx = Dy and x2 d
2ydx2 = (D
2 D)y into the first equation will reduces equationinto a differential equation with constant coefficients.
Example
Solve the following equation
x2d2y
dx2 2xdy
dx 4y = x4
Set
x = ez, z = log x,d
dz= D, x
dy
dx= Dy, x2
d2y
dx2= (D2 D)y
The equation becomes
D(D 1)y 2Dy 4y = e4z(D2 3D 4)y = 0
Since m1 = 1 and m2 = 4, then the homogeneous solution isyh(z) = c1e
z + c2e4z
And by using method of undetermined coefficient where we set yp = C xe4z, the non-homogeneoussolution is
(D2 3D 4)y = 8Ce4z + 16Cze4z 3(Ce4z + 4Cze4z) 4Cze4z= 5Ce4z
e4z = 5Ce4z
Comparing both side, we get C = 15 , thus particular solution is
yp(z) =1
5ze4z
So the solution is
y(z) = yh(z) + yp(z)
= c1ez + c2e4z +
ze4z
5
28
-
But since our original independent variable is x, we substitute back x = ez and z = lnx into theequation to get our final solution,
y(x) =c1x
+ c2x4 +
1
5x4 lnx
4.4.2 Method 2: Using y = xm
We write the Euler-Cauchy equation in the form
x2y + axy + by = 0
Substituting
y = xm
y = mxm1
y = m(m 1)xm2
into Euler-Cauchy equation, we get
x2m(m 1)xm2 + axmxm1 + bxm = 0 orm(m 1) + am+ b = 0m2 + (a 1)m+ b = 0
The roots are calculated using this formula
m1 =1
2(1 a) +
1
4(1 a)2 b
m2 =1
2(1 a)
1
4(1 a)2 b
Case I: Real roots, m1 6= m2If the roots m1 and m2 are real and different, the solutions are
y1 = xm1 , y2 = x
m2
and the general solution will be
y = c1xm1 + c2x
m2
Example
Solve the following Euler-Cauchy equation
x2y + 1.5xy 0.5y = 0the auxiliary equation is
m2 + (1.5 1)m 0.5 = 0The roots are m1 = 0.5 and m2 = 1, so the general solution is
29
-
y = c1x+
c2x
Case II: Real double roots, m1 = m2
The first solution is (from m1 =12 (1 a))
y1 = x(1a)/2
To find a second linearly independent solution, we use the reduction of order method by settingy2 = u y1 where we get
u =
1
y21exp
(p dx
)dx
where p = ax , which after some manipulation, we get u as
u = lnx
Therefore, the second linearly independent solution is
y2 = u y1= lnx x(1a)/2
Then, the general solution will be
y = (c1 + c2 lnx)x(1a)/2
Example
Solve the Euler-Cauchy equation
x2y 5xy + 9y = 0
Answer
The auxiliary equation is
m2 6m+ 9 = 0which give double real roots m1 = m2 = 3, so the general solution is
y = (c1 + c2 lnx)x3
Case III: Complex Roots, m1,2 = i
We show one example
Example
Solve the Euler-Cauchy equation
x2y + 0.6xy + 16.04y = 0
30
-
the auxilirary equation is
m2 0.4m+ 16.04 = 0which give complex roots
m1 = 0.2 + 4i
m2 = 0.2 4i
The basis solution
y1 = xm1 = x0.2+4i = x0.2(eln x)4i = x0.2e(4 ln x)i
y2 = xm2 = x0.24i = x0.2(eln x)4i = x0.2e(4 ln x)i
Using Eulers Formula and t = 4 lnx, we get
y1 = xm1 = x0.2[cos(4 lnx) + i sin(4 lnx)]
y2 = xm2 = x0.2[cos(4 lnx) i sin(4 lnx)]
After some manipulation we get (try to prove yourself)
y1 = x0.2 cos(4 lnx)
y2 = x0.2 sin(4 lnx)
Hence the general solution is
y = x0.2[A cos(4 lnx) +B sin(4 lnx)
4.5 One Solution is Known
If y = u is a given solution belonging to the homogeneous equation of the differential equation,then put y = u v is other solution for differential equation. Let
d2y
dx2+ P (x)
dy
dx+Q(x)y = R(x) (1)
Since u is a solution of the differential equation, we can write
d2u
dx2+ P (x)
du
dx+Q(x)u = 0
For y = u v
y = u vdy
dx= v
du
dx+ u
dv
dxd2y
dx2= v
d2u
dx2+ 2
dv
dx
du
dx+ u
d2v
dx2
31
-
Substituting y, dydxandd2ydx2 into (1), we get
vd2u
dx2+ 2
dv
dx
du
dx+ u
d2v
dx2+ P (x)
(vdu
dx+ u
dv
dx
)+Q(x)uv = R(x)
Rearrange, we get
v
[d2u
dx2+ P (x)
du
dx+Q(x)u
]+ u
[d2v
dx2+ P (x)
dv
dx
]+ 2
du
dx
dv
dx= R(x)
The first bracket is equal to 0, so the remaining equation divided by u, we get
d2v
dx2+ P (x)
dv
dx+
2
u
du
dx
dv
dx=R(x)
ud2v
dx2+
[P (x) +
2
u
du
dx
]dv
dx=R(x)
u
Thus, the formula to find v is
d2v
dx2+
[P (x) +
2
u
du
dx
]dv
dx=R(x)
u(2)
Example
Solve the following equation, given that y = u = x is a homogeneous solution for this equation
d2v
dx2+
[P (x) +
2
u
du
dx
]dv
dx=R(x)
u
d2v
dx2+
[2x(1 + x)x2
+2
x(1)
]dv
dx=x
x
d2v
dx2 2dv
dx= 1
ordz
dx 2z = 1, z = dv
dx
The last equation is linear differential equation, its solution is
ze2x =
1 e2xdx+ c1
=e2x
2 + c1
z =1
2 + c1e2x
dv
dx=
1
2 + c1e2x
dv = (1
2 + c1e2x)dx
v =x2
+c12e2x + c2
Then, the complete solution y = u v is
y = u v = x(x
2+c12e2x + c2
)
32
-
5 Higher Order Linear ODEs
An Higher Order ODE which can be written as below
yn + pn1(x)yn1 + . . .+ p1(x)y + p0(x)y = r(x)
is called Higher Order Linear ODE. The general solution can be represent as
y(x) = c1y1(x) + . . .+ cnyn(x).
5.1 Homogeneous Linear ODEs with Constant Coefficients
We consider nth-order homogeneous linear ODEs with constant coefficient which can write in form
yn + an1yn1 + . . .+ a1y + a0y = 0
Substituting y = ex, we obtain the characteristic equation,
n + an1n1 + . . .+ a1+ a0 = 0
By factoring the equation or using other methods we can determine the roots for this equation.
Distinct Real Roots
If all the roots we get are real and different, (1 6= 2 6= . . . 6= n), then the n solutions,
y1 = e1x, . . . , yn = e
nx
cosntitute the basic solution for
y = c1e1x + c2e
2x + . . .+ cn1en1x + cnenx
Example
Solve the ODE
y 2y y + 2y = 0
Answer
The characteristic equation is
3 22 + 2 = 0The roots are 1 = 1, 2 = 1 and 3 = 2. Therefore, the general solution is
y = c1ex + c2ex + c3e2x
Simple Complex Roots
If complex roots occur, they exist in conjugate pairs. Thus if = + i is a complex rootexist then it conjugate = i will also exist. The two corresponding linearly independentsolutions are
y1 = ex cos(x), y2 = e
x sin(x)
33
-
Example
Solve the ODE
y y + 100y 100y = 0
Answer
The characteristic equation is
3 2 + 100 100 = 0The roots are 1 = 1, 2 = 10i and 2 = 10i which has a complex roots. The general solution
will be
y = c1ex + c2e
0x cos 10x+ c3e0x sin 10x= c1e
x + c2 cos 10x+ c3 sin 10x
y = c1ex +A cos 10x+B sin 10x
Multiple Real Roots
If among the nth roots we have a real double root occur, for example 1 = 2, we take y1 andxy1 as the corresponding linearly independent solutions.
In general, if we have as a real root of order m, the m corresponding linearly independentsolution are
ex, xex, x2ex, . . . , xm1ex.
Example
Solve the ODE
y 3y + 3y y = 0
Answer
The characteristic equation is
5 34 + 33 2 = 0The roots are 1 = 2 = 0 and 3 = 4 = 5 = 1. So the general solution will be
y = c1 + c2x+ (c3 + c4x+ c5x2)ex
Multiple Complex Roots
The general solution will be the same as Simple Complex Roots except if = + i is acomplex double root with corresponding linearly independent solutions are
34
-
ex cos(x), ex sin(x), xex cos(x), xex sin(x)
and the corresponding general solution are
y = ex [(A1 +A2x) cosx+ (B1 +B2x) sinx]
5.2 Non-Homogeneous Linear ODEs
We consider nth-order non-homogeneous linear ODEs with constant coefficient which can write inform
yn + an1yn1 + . . .+ a1y + a0y = r(x)
The general solution is in the form
y(x) = yh(x) + yp(x)
where, yh(x) is the general solution for the corresponding homogeneous ODE. yp(x) is theparticular solution and can be found by using one of these methods.
1. Method of Undetermined Coefficients (same as for Second Order ODE)
2. Method of Variation of Parameters
3. Annihilator Method (guessing yp pattern)
5.2.1 Method of Variation of Parameters
The particular solution for the non-homogeneous higher order ODEs can be determined using thefollowing formula
yp(x) =
nk=1
yk(x)
Wk(x)
W (x)r(x) dx
= y1(x)
W1(x)
W (x)r(x) dx+ . . .+ yn(x)
Wn(x)
W (x)r(x) dx
Example
Solve the non-homogeneous Euler-Cauchy equation
x3y 3x2y + 6xy 6y = x4 lnx, (x > 0)
Answer
For general homogeneous solution, we use y = xm which give
m(m 1)(m 2) 3m(m 1) + 6m 6 = 0The roots are 1, 2, 3 and give as a basis
y1 = x, y2 = x2, y3 = x
3.
Hence the corresponding general solution of the homogeneous ODE is
35
-
yh = c1x+ c2x2 + c3x
3.
For particular non-homogeneous solution, we start by finding the Determinants
W =
x x2 x3
1 2x 3x2
0 2 6x
= 2x3W1 =
0 x2 x3
0 2x 3x2
1 2 6x
= x4W2 =
x 0 x3
1 0 3x2
0 1 6x
= 2x3W3 =
x x2 01 2x 00 2 1
= x2Putting all the result into the standard equation, we get
yp = y1(x)
W1(x)
W (x)r(x) dx+ y2(x)
W2(x)
W (x)r(x) dx+ y3(x)
W3(x)
W (x)r(x) dx
= x
x4
2x3x lnx dx+ x2
2x32x3
x lnx dx+ x3
x2
2x3x lnx dx
= x
x
2x lnx dx x2
x lnx dx+ x3
1
2xx lnx dx
=x
2
(x3
3lnx x
3
9
) x2
(x2
2lnx x
2
4
)+x3
2(x lnx x)
yp =1
6x4(
lnx 116
)Hence the complete solution is
y = yh + yp
= c1x+ c2x2 + c3x
3 +1
6x4(
lnx 116
)5.2.2 Annihilator Method
Here we try to make r(x) becomes 0 by multiplying the non-homogeneous equation with fixedDifferential operator.
1. for r(x) = erx, we mulitply the non-homogeneous equation with (Dr) to get (Dr)r(x) = 0Example
Derx = rerx
(D r)erx = 0
2. for r(x) = xkerx we multiply the non-homogeneous equation with (D r)k+1 to get (D r)k+1r(x) = 0
36
-
Example
D(erxu) = erxDu+ rerxu = erx(D + r)u
0 = D(erxu) erxDu rerxuD2(erxu) = erxD2u+ 2rerxDu+ r2erxu = erx(D + r)2u
0 = D2(erxu) erxD2u 2rerxDu r2erxu
3. for r(x) = cosx or sinx, we multiply the non-homogeneous equation with (D2 + 2) toget (D2 + 2)r(x) = 0Example
D(cosx) = sinxD2(cosx) = 2 cosx
0 = D2(cosx) + 2 cosx
4. for r(x) = xkex cosx or xkex sinx, we multiply the non-homogeneous equation with[(D )2 + 2]k+1 to get [(D )2 + 2]k+1 r(x) = 0
Example
Find a general solution for the following non-homogeneous ODEs using Annihilator method,
y 3y + 4y = xe2x
Answer
For homogeneous solution we use
(D3 3D2 + 4)y(x) = (D + 1)(D 2)2y(x) = 0.To annihilate r(x) = xe2x we multiply both side with (D 2)2, we get
(D 2)2(D3 3D2 + 4)y(x) = (D 2)2(xe2x)(D 2)2(D + 1)(D 2)2y(x) = 0
(D + 1)(D 2)4y(x) = 0The general solution is
y(x) = c1ex + c2e2x + c3xe2x + c4x2e2x + c5x3e2x
which comprise of
yh = c1ex + c2e2x + c3xe2x
yp = c4x2e2x + c5x
3e2x
Using method of undetermined coefficients, we get c4 = 1/18 and c5 = 1/18, so the generalsolution is
y(x) = c1ex + c2e2x + c3xe2x 1
18x2e2x +
1
18x3e2x
37
Introduction to Differential EquationsDefinitionsSolution of Differential EquationsLinearly Independent Solution
First Order and First Degree ODEsSeparation of VariablesHomogeneous EquationsEquations Reducible to Homogeneous Form
Linear First-order EquationsBernoulli's Equation
Exact Differential EquationsReduction to Exact Form, Integrating Factor
Second Order Linear Differential EquationHomogeneous Linear ODEs with Constant CoefficientsNon-homogeneous ODEsMethod of Undetermined CoefficientsMethod of Variation of Parameters
Other Types of ODEODE with y is missingODE with x is missingEquation of the type d2ydx2 = f(y)Euler-Cauchy EquationMethod 1: Using substitution x = ezMethod 2: Using y = xm
One Solution is Known
Higher Order Linear ODEsHomogeneous Linear ODEs with Constant CoefficientsNon-Homogeneous Linear ODEsMethod of Variation of ParametersAnnihilator Method