You are on page 1of 78

Introduction to

DIFFERENTIAL EQUATIONS

DQT203

IMK

Institut Matematik Kejuruteraan Universiti Malaysia Perlis

Content

Chapter Revision Differentiation and Integration 2 Chapter 1 First Order Differential Equations 17 Chapter Overview and Learning Objectives 17 1.0 Introduction to Differential Equations 18 1.1 Solution to Differential Equations 20 1.1.1 Direct Integration 20 1.1.2 Separable Equations 21 1.1.3 Homogeneous Equations 25 1.1.4 Linear Equations 28 1.1.5 Exact Equations 34 Chapter 2 Second Order Linear Differential Equation 42 Chapter Overview and Learning Objectives 42 2.0 Introduction to Second Order Linear Differential Equations 43 2.1 Homogeneous Differential Equations 43 2.1.1 Real and Different Roots to Auxiliary Equations 46 2.1.2 Real and Equal Roots to Auxiliary Equations 47 2.1.3 Complex Root to Auxiliary Equations 48 d2y 2.1.4 Equation of the form of n 2 y = 0 50 2 dx 2.2 Non-Homogeneous Differential Equations 52 2.2.1 Method of Undetermined Coefficient 52 2.2.1.1 Case of f (x ) = a polynomial of degree n 53 2.2.1.2 Case of f ( x ) = Pe kx 57 2.2.1.3 Case of f ( x ) = P sin kx or P cos kx 60 2.2.1.4 Case of a Linear Combination of 2.2.11- 2.2.3 61 2.3 Method of Variation of Parameters 64

CHAPTER

REVISION
Differentiation & Integration

Chapter Outline 1.0 1.2 Table Differentiation of Common Functions Methods of Differentiation 1.2.1 Functions of a Function ( The Chain Rule) 1.2.2 Application of The Chain Rule 1.2.3 Differentiation of a Product 1.2.4 Differentiation of a Quotient Integration 1.3.1 The Basic Standard Integrals 1.3.2 Integration by Substitution 1.3.3 Integration by Parts 1.3.4 Integration by Partial Fractions

1.3

Chapter Overview and Learning Objectives The aim for this chapter is to provide a short self assessment for students who would like to acquire a basic understanding of elementary differentiation and integration. It is also a prerequisite technique to students in order to understand and solve the differential equations problems. Thus, I urge every student who is weak at differentiation and integration to revise this chapter, and make sure you did all the tutorial questions provided at the end of the chapter. After careful study of this chapter, you should be able to do the following: 1. Understand the concept of differentiation and integration. 2. Able to differentiate and integrate any given function.

1.1 Table of Differentiation of Common Functions

y = f (x)
constant

dy dx
0 1

x xn kx n ex
e nx

nx n1 nkx n 1 ex
ne nx

ax ln x ln kx sin x sin kx cos x cos kx tan x tan kx cot x sec x cos ec x sinh x cosh x sin n x cos n x tan n x

a x ln a
1 x

1 d . kx kx dx

cos x

k cos kx

sin x k sin kx
sec 2 x k sec 2 kx

cos ec 2 x sec x. tan x


- cos ec x. cot x

cosh x sinh x n sin n1 x. cos x n cos n1 x.sin x


n tan n 1 x. sec 2 x

* k is a constant Source: Lecture Notes EQT102 by Aishah Mohd Noor

Examples Differentiate with respect to x a) y = 3 b) y = 3 x c) y = 3 x 5 d ) y = 3 + 3x5 e) y = e x f ) y = e3 x


5

g ) y = 5e 2 x h) y = 3 x + e 2 x i ) y = 65 x j ) y = ln 2 x k ) y = sin 3 x Solutions dy =0 dx dy b) =3 dx dy c) = 15 x 4 dx dy d) = 15 x 4 dx dy e) = ex dx 5 dy f) = 15 x 4 e 3 x dx dy g) = 10e 2 x dx dy h) = 3 + 2e 2 x dx dy i) = 6 5 x ln 6 dx dy 1 j) = ( 2) = 1 dx 2 x x dy k) = 3 cos 3 x dx a)

1.2 Methods of Differentiation 1.2.1 Functions of a Function ( The Chain Rule) If y is a function of u and u is a function of x, then dy dy du = dx du dx Another important result: dy 1 = dx dx dy This rule is very important in differentiation. It is used in implicit differentiation, finding rates of changes, as well as parametric differentiation. 1.2.2 Application of The Chain Rule Examples Differentiate the following a) y = cos ( x 3 ) b) y = ln ( sin 4 x ) c) y = esin 5 x
2

Solutions a) Let u = x 3 ,

dy du = 3 x 2 , and y= cos u , = - sin u dx du

dy dy du = = ( sin u )(3x 2 ) = 3x 2 sin x 3 dx du dx b) Let u = sin 4 x , du = 4 cos 4 x , and y = ln u , dx dy 1 = du u

dy dy du 1 4 cos 4 x = = ( 4 cos 4 x ) = = 4 cot 4 x dx du dx u sin 4 x c) Let u = sin 5 x 3 , du = 15 x 2 cos 5 x 3 , and y = eu , dx dy = eu du

3 dy dy du = = eu 15 x 2 cos 5 x 3 = 15 x 2esin 5 x cos 5 x 3 dx du dx

( )(

Some extended differentiation involves chain rule:

y (u is a function of x) un kun eu au ln (u) sin (u) cos (u) tan (u) sec (u) cosec (u) sinh (u) cosh (u) Properties of ln a) ln a = n ln a
n

dy dx
nun-1u nkun-1u eu u au ln (a) u 1 u u cos(u ) u sin(u ) u sec 2 (u ) u sec(u ) tan(u ) u cos ec(u ) cot(u ) u cosh(u ) u sinh(u ) u

b) ln ab = ln a + ln b c) ln

a = ln a ln b b
Source: Lecture Notes EQT102 by Aishah Mohd Noor

1.2.3 Differentiation of a Product The product rule is used to differentiate the product of two functions. Given y = u.v, where u and v are functions of x, then dy dv du =u +v dx dx dx or y ' = uv'+ vu ' Examples 7

Differentiate, with respect to x, a ) y = ( x 1)( x + 2) b) y = ( x 2 1)( x 2) 4 Solutions a ) Let u = x 1 u ' = 1 v = x + 2 v' = 1 y ' = ( x 1)(1) + ( x + 2)(1) = ( x 1) + ( x + 2) = 2x 1 b) Let u = ( x 2 1) u ' = 2 x v = ( x 2) 4 y ' = ( x 2 1) 4( x 2 ) + ( x 2) 4 (2 x)
3

[ = 2( x 2) ( 3x
3 3

= 2( x 2) 2 + 2( x 1)
2 2

] 2 x 1)

v' = 4( x 2) 3 (1)

1.2.4 Differentiation of a Quotient The quotient rule is used to differentiate functions in the form of quotient such as u y = where u and v are functions of x, then v dy = dx du dv u dx dx 2 v or vu 'uv' y' = v2 v

Examples Differentiate the following with respect to x: a) b) x 1 x+3 2x 1 y= 2 x +2 y=

Solutions a) dy (x + 3 ) (x 1 ) = dx (x + 3 ) 2 = 4 (x + 3 ) 2

b)

dy 2( x 2 + 2) 2 x(2 x 1) = dx ( x 2 + 2) 2 4 + 2x 2x 2 = ( x 2 + 2) 2

1.3 Integration 1.3.1 The Basic Standard Integrals


x
n

dx

1 dx x 1 dx ax + b x e dx kx e dx
a
x

ln x + C

xn +C n +1

1 ln ax + b + C a
ex + C

dx

( ax + b ) dx
sin x dx cos x dx tan x dx cot x dx sec

e kx +C k ax +C ln a 1 (ax + b) n+1 + C (n + 1)( a) cos x + C sin x + C ln sec x + C ln sin x + C


tan x + C

x dx 2 cos ec x dx sec x tan x dx cos ec x cot x dx sinh x dx cosh x dx sin ( ax + b ) dx


cos sec

cot x + C sec x + C cos ec x + C


cosh x + C sinh x + C

( ax + b ) dx
2

( ax + b ) dx

1 cos( ax + b ) + C a 1 sin ( ax + b ) + C a 1 tan ( ax + b ) + C a

Source: Lecture Notes EQT102 by Aishah Mohd Noor

10

1 1 x 1
2

dx dx

sin 1 x + C cos 1 x + C tan 1 x + C sinh 1 x + C cosh 1 x + C tanh 1 x + C

1 x 1 dx 1 + x2 1 dx x2 + 1 1 dx x2 1 1 dx 1 x2
2

Source: Lecture Notes EQT102 by Aishah Mohd Noor

1.3.2 Integration by Substitution Example Find sin ( 6 x + 5) dx Solution Let u = 6 x + 5 ,

du du 1 = 6 or du = 6dx ; and sin (u ) = cos (u ) + C 6 6 dx


1 1 cos (u ) + C = cos (6 x + 5) 6 6

Hence, sin ( 6 x + 5) dx =

1.3.3 Integration by Parts Why use parts? The function cannot be solved using any integration methods (i.e. standard f ' ( x) integral, substitution, f ' ( x ) f ( x), or ) that you encounter before. f ( x) Usually used for functions involves product either log, exponent and trigonometry. Neither of the term in the function is the derivative of the other. Example: 2 2 2 x ln xdx : ln x is not the derivative of x , x is not the derivative of ln x How to solve?

1 11

Using a formula

uv' = uv vu'

1 12

How to determine u and v? Example 1. Choose v so that you can easily get v

ln xdx

v' = x 2

Wrong!

x3 v = x 2 dx = 3

2. 3. 4.

e 3 x dx kalau tiada log, jadikan u = x n (kuasa positif), v= e 3 x

x ln xdx ada log, jadikan u = ln x, v' = x x


3

sin xdx ada trigo, jadikan u = x 3 , v' = sin x

3x 5. e sin xdx tiada x n @ log , u = e 3 x , v' = sin x

* From the previous examples, a priority order to choose u is:a ) ln x b) x n c) e kx Choose the u:a) b) c) d)

x cos 2 xdx u = x e dx u = x ln( x + 4)dx u = e cos 4 xdx u =


4 4 2x 3 2x

Solve the following:a ) x ln xdx b) x 2 ln xdx c) e 3 x sin xdx d ) x 3 e 2 x dx

1.3.4 Integration by Partial Fractions Why use partial fractions? The given function is in the form of fraction, but not in the form of f ' ( x) f ( x)

(i.e. the numerator is not the derivative of the denominator). For such case, firstly express the fractions in terms of its partial fractions (a simpler algebraic fractions which we shall most likely be able to integrate separately without difficulty).

1 13

Example: How to solve?

x +1 3 2 dx = dx dx x2 x 1 3x + 2

Express the given function in terms of its partial fractions using the following rules: a) The numerator must be of lower degree that the denominator. Otherwise, divide out by long division. 3x 2 + x + 1 3 Example: dx = ( 3 x 2 ) dx + dx x +1 x +1 Long division: 3x 2 2 x + 1 3x + x + 1 3x 2 + 3x 2x + 1 2x 2 3 b) Factorize the denominator into its prime factors. This is important, since the factors obtained determine the shape of the partial fractions. 5x + 1 A B dx = dx + dx Example: 2 ( x 1) ( x + 2) x + x2 Remember x 2 + x 2 = ( x 1)( x + 2) c) A linear factor ( ax + b ) gives a partial fractions of the form d) Factor ( ax + b ) 2 give partial fractions A B + ax + b ( ax + b ) 2 A ax + b

x2 A B C dx = dx + dx + dx Example: 2 ( x + 1) ( x 1) ( x + 1)( x 1) ( x 1) 2 A B C + + 2 ax + b ( ax + b ) ( ax + b ) 3 x A B C dx = dx + dx + Example: 3 2 ( x 1) ( x 1) ( x 1) 3 ( x 1) e) Factor ( ax + b ) 3 give partial fractions f) A quadratic factor ax 2 + bx + c gives a partial fraction Next, how to determine A, B, C, D, . Ax + B ax 2 + bx + c

14

Evaluate the following. x +1 dx x 3x + 2 x2 b) dx ( x + 1)( x 1) 2 a)


2

c) d) e)

( x + 2) 3

x2 + 1

dx

x2 dx ( x 2) x 2 + 1

4x + 1 dx x( 2 x 1) 2
2

15

TUTORIAL 1 Differentiation & Integration A. DIFFERENTIATION I. Find the derivative of each of the following 1. 3. 5. 7. y = 32 y = 4x + 1 y = 5x 2 y = 4 x 2 3x 2 2. y = x 5 4. y = 1 3 x 6. y = x 2 3 x 5 6 15 8. y = x 8 x 5 + x 4 x 3 + 2 2 5 2 10. y = 2 x (4 x 2 + 3 x 5) 12. y = (4 x + 7)( x 2 1) 1 14. y = 2 x +x x2 16. y = 2x + 1 3x 4 18. Find f(-1) when f ( x ) = x+2 20. y = 2 cos 5 x 22. y = 3 cos 4 x 2 24 y = cos( x 4 2 x 2 + 3) 26. y = sin 3 (2 x + 3) 28. y = sin x cos 3 x 30. Find d2y for y = cos x dx 2

9. y = x 2 (2 x + 1) 11. y = (2 x + 3)(5 x 4) x 13. y = 2x + 5 3x 1 15. y = 2x + 4 17. Find f(2) when f ( x) = ( x 2 4 x + 3)( x 3 5 x) 19. y = sin 7 x 21. y = 2 sin x 3 23. y = 4 sin(1 x) 25. y = cos 2 (3 x 1) 27. y = cos( x 3 4) 4 sin x 29. y = cos x 31. y = ln(2 x 3 3) 33. y = ln( x sin x) 35. y = tan(ln x)

32. y = ln(tan 3x ) 34. y = ln(3 x 2) 36. y = ln(ln x)


1 2

16

B. INTEGRATION I. Integrate the following

x dx 3. 4dx
1.
7

8 2. 3x dx

5.

6 x 3 dx

4. 96 x 5

2 6. (5 x 12 x + 8) dx 2 2 8. (2 x 3) dx

5 ) dx x3 2 3 9. 8 x ( x + 3) dx
2 7. (3 x x +

11.

x2 + x 13. sin 5 xdx 15.


2

(2 x + 1)

dx

x( x 1) dx ( x 1) dx 12. x
10.
2 4 3

x sin( x + 5)dx 17. tan 4 xdx dx 19. 4+ x 1 4x 23. e dx


21.
2x

14. cos(3 x 1)dx

16. sec 3x tan 3xdx

3x + 2dx dx 20. 3x + 2
18. 4x dx 1 x2 dx 24. 4 x e 22.

dx

25.

xe

x2

dx

II. Find the partial fractions of each of the following (26 28) 8 x 29 ( x + 2)( x 7) x 18 27. 2 2 x 5 x 12 x3 28. 2 x 1 26. III. Integration by partial fractions 29. 30.

1 x x
2

dx

dx + 2x 8

x dx 3x + 2 x +1 dx 32. 2 x + 4x 5 31.

33.

x(x + 1)

dx

Integration by parts 34. ln xdx 35. 36.

xe

dx

x ln xdx

2 37. ln x dx x 38. e cos xdx 2 39. (ln x) dx

CHAPTER

First Order Differential Equations

Chapter Outline 1.0 1.1 Introduction to Differential Equations Solution to Differential Equations 1.1.1 Direct Integration 1.1.2 Separable Equations 1.1.3 Homogeneous Equations 1.1.4 Linear Equations 1.1.5 Exact Equations

Chapter Overview and Learning Objectives This chapter presents four methods of solving first order differential equations. We begin with the easiest method direct integration. In this part, students need to make sure that they are familiar with the integration techniques. It is crucially important to students because the integration methods will be used throughout the chapter. Students who master every integration techniques have the advantages to understand the topic well. Students who are weak at integration will encounter difficulties in problem solving. Thus, it is advisable for these students to do exercise so that problem in integration can be minimized. The following subchapter exposed students to methods of solving three types of differential equation. To make things easier, students are advised to get familiar with the types of differential equations and its solution techniques so that they will not have problems. After careful study of this chapter, you should be able to do the following: 1. Clearly understand the types of first order differential equations. 2. Able to identify all types of first order differential equations and solve using appropriate method. 3. Clearly understand basic concepts of first order and its applications.

1.0

Introduction

Often in physic, engineering, and other technical areas, we need to search for an unknown function. In many cases, this search leads to an equation involving derivatives (or differentials) of the unknown function. Such equations involving derivatives (or differentials) are called differential equations. In other words, a differential equation is a relationship between an independent variable, x, a dependent variable, y, and one or more differential coefficients of y with respect to x. Example 1 dy + y sin x = 0 dx d2y dy xy 2 + y + e 3x = 0 dx dx x2 The order of a differential equation is given by the highest derivative involved in the equation. Function x dy y2 = 0 dx Order 1st order 2nd order 3rd order 2nd order

d2y xy 2 y 2 sin x = 0 dx d3y dy y + e4x = 0 3 dx dx d2y dy + 2 + 10 y = sin 2 x 2 dx dx Exercise 1 State the order of the following functions: Function y = e 2 x ( A + Bx) cos 2 x dy + y =1 dx

Order

d2y dy 3 + 2 y = x2 2 dx dx

( y 3 + 1)

dy xy 2 = x dx

Reminder A 1st order differential equation is derived from a function having 1 arbitrary constant. A 2nd order differential equation is derived from a function having 2 arbitrary constants. An nth order differential equation is derived from a function having n arbitrary constants. Example 2 Function x dy + y2 =1 dx dy = 1 y dx Order is derived from a function having 1 arbitrary constant is derived from a function having 1 arbitrary constant is derived from a function having 2 arbitrary constants

cos 2 x

d2y dy + 4 + y = e2x 2 dx dx

1.1

Solution of Differential Equations

To solve a differential equation, we have to find the function for which the equation is true. This means that we have to manipulate the equation so as to eliminate all the differential coefficients and leave a relationship between y and x. The rest of this particular program is devoted to the various methods of solving first order differential equations. 1.1.1 Direct Integration If the equation can be arranged in the form of can be solved by simple integration. Example 1 Find the function y of Solution y = (3 x 2 6 x + 5)dx = x 3 3x 2 + 5 x + c y = x 3 3x 2 + 5 x + c As always, of course, the constant of integration must be included. Here it provides the one arbitrary constant which we always get when solving a first order differential equation. Example 2 Solve Solution Leave dy on the LHS, dx dy 4 = 5x 2 + dx x 4 y = 5 x 2 + dx x 3 5x y= + 4 ln x + c 3 x dy = 5x 3 + 4 dx dy = 3x 2 6 x + 5 dx dy = f (x) , then the equation dx

Example 3
x Find the particular solution of the equation e

dy = 4 , given that y=3 when x=0. dx

Solution First re-write the equation in the form of dy 4 = = 4e x dx e x

x x Then, y = 4e dx = 4e + c Knowing that when y=3, x=0, we can evaluate c:

3 = 4e 0 + c c=7 Thus, y = 4e x + 7 1.1.2 Separable Equations dy = f ( x, y ) , the variable y on the RHS dx prevents solving by direct integration. We therefore have to devise some other method of solution. If the given equation is of the form Let us consider equations of the form dy = f (x) . F ( y ) and of the form dx

dy f ( x) = , i.e. equations in which the RHS can be expressed as products or dx F ( y ) quotients of functions of x or of y. Example 1 Solve dy 2x = dx y + 1

Solution We can re-write this as ( y + 1)dy = 2 xdx Now, integrate both sides with respect to x

( y + 1)dy = 2 xdx
y2 2x2 +y= +c 2 2
2

Thus,

y2 y=x +c 2

Example 2

Solve

dy = (1 + x )(1 + y ) dx

Solution 1 dy = (1 + x) dx (1 + y ) 1 (1 + y) dy = (1 + x)dx ln(1 + y ) = x + x2 +c 2

Reminder dy = f ( x )F ( y ) or dx Separable equations: dy f ( x) = dx F ( y )

F ( y )dy = f ( x )dx
Example 3 Solve dy 1 + y = dx 2 + x

Solution 1 1 dy = dx 1+ y 2+ x 1 1 1 + y dy = 2 + x dx ln(1 + y ) = ln(2 + x) + c e ln(1+ y ) = e ln( 2+ x ) e c , 1 + y = A(2 + x) y = A(2 + x ) 1 Exercise dy y 2 + xy 2 = 1. Solve dx x 2 y x 2 ans: ln y + 1 1 = ln x + c y x where A = e c

2. Solve

dy y 2 1 = dx x dy x 2 + 1 = dx y + 1

ans: y 1 = Ax 2 ( y + 1) y3 y 2 x2 ans: + = + ln x + c 3 2 2

3. Solve xy

Revision Exercise Find the general solution of the following equations: 1. 2. 3. 4. 5. dy y = dx x dy = ( y + 2)( x + 1) dx dy cos 2 x = y + 3 dx dy = xy y dx sin x dy . = cos x 1 + y dx

TUTORIAL 2 SEPARABLE EQUATIONS I. Solve each differential equation. 1. xdy y 2 dx = 0 dy 3 =y2 3. dx dy 5. x + y = 3 dx dy + y 3 cos x = 0 7. dx 9. (1 + x 2 )dy dx = 0 11. y ' = e x y 13. (4 xy + 12 x) dx = (5 x 2 + 5)dy 2. xdy + ydx = 0 dy = x2 + x2 y2 4. dx dy x 2 = 6. dx y 3 x dy ex = 0 8. e dx dy = 1+ x2 + y2 + x2 y2 10. dx 12. ( x + 1) y ' = y 2 + 4

II. Find the particular solution of each differential equation subject to the given conditions. dy 2x dy = ; y = 4, x = 0 = x 2 y 4 ; y = 1, x = 1 14. 15. dx y + x 2 y dx dy dy = e x ; y (0) = 6 = 0; y (1) = 4 16. y 17. x + y dx dx dy = ln x; y (1) = 0 18. xy dx III. Solve the given differential equation by separation variables. dy = sin 5 x 19. 20. dx + e 3 x dy = 0 dx 2 dy dx y + 1 = e 3x+2 y 21. 22. y ln x = dx dy x 23. sec 2 xdy + csc ydx = 0 24. (e y + 1) 2 e y dx + (e x + 1) 3 e x dy = 0 dS dP = kS = P P2 25. 26. dr dt dy = x 1 y2 27. dx IV. Solve the given initial value problem. dx 2 dy = 4( x 2 + 1); x( ) = 1 = y xy; 28. 29. x 4 dt dx dy y 2 1 30. = ; y (2) = 2 dx x 2 1

y ( 1) = 1

1.1.3 Homogeneous Equations dy x + 3 y = . This look simple enough, but we find that we cannot dx 2x express the RHS in the form of x-factor, so we cannot solve by the method of separating variables. Consider In this case, we make the substitution y = vx , where v is a function of x. So y = vx . Differentiate y = vx with respect to x we get, y = vx dy dv dv = v.1 + x = v + x dx dx dx Thus , dy x + 3 y = dx 2x dv x + 3vx v+x = dx 2x dv x(1 + 3v) x = v dx x (2) dv 1 + 3v 2v 1 + v x = = dx 2 2 Solve using separable method: 2 1 1 + v dv = x dx 2 ln(1 + v) = ln x + c e ln(1+v ) = e ln x e c , (1 + v) 2 = Ax y Since y = vx , substitute v = x y (1 + ) 2 = Ax x y y2 (1 + 2 + 2 ) = Ax x x 2 x + 2 xy + y 2 ( ) = Ax x2 Thus, ( x + y ) 2 = Ax 3
2

Factorize with respect to x

A = ec

Example 2 dy x 2 + y 2 = Solve . dx xy (Here, all the terms in the RHS are of degree 2, i.e. the equation is homogeneous.) Solution v+x dv x 2 + v 2 x 2 = dx vx 2 dv 1 + v 2 v 2 1 x = = dx v v 1 vdv = x dx v2 = ln x + c 2 1 y2 = ln x + c 2 x2 y 2 = 2 x 2 (ln x + c) Exercise dy 2 xy + 3 y 2 = dx x 2 + 2 xy dy 2. Solve ( x 2 + y 2 ) = xy dx 1. Solve Reminder ans: xy + y 2 = Ax 3 ans: 2 y 2 ln cy = x 2

Homogeneous equations:

use substituti on y = vx dy dv =v+ x dx dx dv v+ x = f ( x )F (vx ) = F (v ) dx 1 1 F (v ) dv = x dx

Revision Exercise Solve the following: dy 1. ( x y ) =x+ y dx dy = x2 + y2 dx dy = xy y 2 dx

2. 2 x 2

3. ( x 2 + xy )

TUTORIAL3 HOMOGENEOUS EQUATIONS

I. Solve each differential equation. 1. ( x y )dx + xdy = 0 2. ( x 3 + y 3 ) dx xy 2 dy = 0 3. y 2 dx = ( xy 4 x 2 )dy 4. dy x + 4 y = dx 4 x + y dy = 2 x + y given that y=3 when x=2. dx dy dx dy =0 dx

5. (2 y x)

3 3 2 6. ( x + y ) = 3 xy

7. ( xy + y 2 ) + ( x 2 xy )

8. 2 xdx + ( y 3 x)dy = 0
3 2 9. ( x + 3 xy )

dy = y 3 + 3x 2 y dx dy =0 dx

10. y 3 x + (4 y + 3 x)

1.1.4 Linear Equations dy + 5 y = e2x dx This clearly an equation of the first order, but different from those we have dealt with so far. In fact, none of our previous methods could be used to solve this one, so we have to find a further method to attack. Consider the equation How do we know that an equation is a linear equation? An equation is said to be linear if it has the form of a dy + by = c dx

Where a, b and c are constants or functions of x or a combination of both. To solve a linear equation, we need to transform any given equation to a general form of dy + Py = Q dx Where P = b c dy = 1. and Q = and leave the coefficient of a a dx

Solution steps: 1. Find the integrating factor (pronounce as rho)

= e

Pdx

2. Multiply both sides with , we get dy + Py = Q dx You will now see that the LHS is the differential coefficient of y d { y } = Q dx

Simplify (integrate both sides with respect to x), to get y = Qdx 3. Solve for y . Finally solve for y.

Example 1 dy + 3 y = sin x Identify P, Q and from dx Solution List down the following P= Q=

= e

Pdx

= e

___

dx

= ___

Example 2 Solve dy y=x dx

Solution 1. P=-1, Q=x, the integrating factor is = e Pdx = e 1dx = e x 2. Multiply both sides with we get y = Q ye x = xe x

3. Integrate to solve for y. Integrating by part ye x = xe x dx ye x = uv vdu ye x = x (e x ) + e x dx ye x = xe x e x + c y = x 1 + ce x Example 3 Solve x dy + y = x3 dx u=x du =1 dx dv = e x v = e x dx = e x

Solution Rewrite to its general form dy 1 + y = x2 dx x then solve 1 x Q = x2 P=

=e

x dx

= e ln x = x

yx = x( x 2 )dx = x 3 dx x4 +c 4 x3 c y= + 4 x yx = Example 4 Solve dy + y cot x = cos x dx

Solution P = cot x Q = cos x


cot xdx dx = e = e sin x = e ln sin x = sin x cos x

y sin x = sin x cos xdx sin 2 x y sin x = +c 2 sin x c sin x y= + = + c csc x 2 sin x 2 U Using substitution

Example 5 Solve ( x + 1) Solution Rewrite your general form of linear equation dy + dx P= Q= y= dy + Py = Q dx dy + y = ( x + 1) 2 dx

= e

dx

Solve for y

( x + 1) 2 y=
3

c ( x + 1)

Example 6 Solve x dy 5 y = x7 dx

Solution Rewrite your general form of linear equation dy + Py = Q dx

dy y= dx P= Q=

= e

dx

Solve for y

y=

x7 + cx 5 2

Exercise
2 1. Solve (1 x )

dy xy = 1 dx

ans: y (1 x 2 ) = sin 1 x + c dy y = ( x 2) 3 given that y=10 when x=4. dx

2. Solve the equation ( x 2) ans: y = ( x 2) 3 + 3( x 2) 2

Revision Exercise Solve the following dy + 3y = e4x dx dy 2. x + y = x sin x dx dy 3. tan x + y = sec x dx 1. e4x + ce 3 x 7 sin x c cos x + ans: y = x x ans: y = ans: y = x csc x + c csc x

TUTORIAL 4 LINEAR EQUATIONS

I. Solve each differential equation. 1. dy 1 + y=x dx x dy 1 + y = ex dx x dy y = e3x dx dr + r tan = sec d dy + xy = x dx

2.

3.

4.

5. ( x 2 + 1)

6.

dy y = 4e x , y(0)=4 dx dy 1 + 3 x 2 y = x 3 , y(0)=2 dx e dy y cos x 4 + = , y = , x > 0 dx x x 2 dy + e x y = x, dx y (0) = 1

7.

8.

9. (e x + 1)

10. x 11. t 3

dy y = x 2e x , dx

y (1) = e 1

dx + 3t 2 x = t , x(2) = 0 dt

1.1.5 Exact Equations Unlike homogeneous equations, many first order differential equations cannot be reduced to separable differential equations by a suitable substitution. For example, the first order differential equation (sin y + y cos x)dx + (sin x + x cos y )dy = 0 is neither separable nor can be reduced to a separable equation by an appropriate substitution. In this section, we deal with equations whose solution are given by formulas of the form F ( x, y ) = c . A first order differential equation that can be written in the form M ( x , y )dx + N ( x , y )dy = 0 where M ( x, y )dx + N ( x, y )dy = F F ( x, y )dx + ( x, y )dy x y

for some function F ( x, y ) is called an exact differential equation. In calculus, we know that the total differential of a function f ( x, y ) is dF = F F ( x, y )dx + ( x, y )dy . x y

Therefore, the equation M ( x, y )dx + N ( x, y )dy = 0 is exact if there exists a function F ( x, y ) such that M ( x, y ) dx + N ( x, y )dy is the total differential of F ( x, y ) . Thus, we can prove that an equation is an exact equation if and only if M N = . y x Solution of an exact differential equations: 1. Write down your M and N M ( x, y ) and N ( x, y ) 2. Test for exactness M N = y x Yes, exact!

3. Let F ( x, y ) be the solution, and integrate M with respect to x. F = Mdx + ( y ) 4. Differentiate F with respect to y, and equate the result to N to find ' ( y ). 5. Integrate ' ( y ) with respect to y to find ( y ). (There is no need to include an arbitrary constant)

( y ) = ' ( y )dy
6. The solution of the equation is F ( x, y ) = c Example 1 Solve 2 xydx + ( x 2 1)dy = 0 Solution 1. Write down your M and N M = 2 xy N = ( x 2 1) 2. Test for exactness M N = 2x = y x Yes, exact! Therefore, there exist a function F ( x, y ) such that F = 2 xy x and F = ( x 2 1) y

3. Let F ( x, y ) be the solution, and integrate M with respect to x. F = Mdx + ( y ) F = 2 xydx + ( y ) F = x 2 y + ( y) 4. Differentiate F with respect to y, and equate the result to N to find ' ( y ).

F = x 2 + ' ( y) = N y x 2 + ' ( y) = x 2 1

' ( y) = x 2 x 2 1 ' ( y ) = 1
5. Integrate ' ( y ) with respect to y to find ( y ).

( y ) = ' ( y )dy
= 1dy = y

6. The solution of the equation is F ( x, y ) = c thus, x 2 y y = c x2 y y = c Thus, the solutions are given implicitly by x 2 y y = c . Example 2 Solve dy 2 xy 2 + 1 = dx 2x 2 y

Solution Rewrite the equation in the form M ( x, y )dx + N ( x, y )dy = 0 (2 xy 2 + 1)dx + 2 x 2 ydy = 0 M = 2 xy 2 + 1 N = 2x y
2

M = 4 xy y N = 4 xy x

Yes, exact!

Find F

F = Mdx + ( y ) F = (2 xy 2 + 1) dx + ( y ) 2x2 y 2 F= + x + ( y) 2 Differentiate F with respect to y, equate to N F = x 2 y 2 + x + ' ( y) = N y 2 x 2 y + ' ( y) = 2 x 2 y

' ( y) = 2 x 2 y 2 x 2 y ' ( y) = 0
Find ( y ).

( y ) = ' ( y )dy
=0 Thus, the solution is x 2 y 2 + x = c . Example 3 Solve xy '+ y + 4 = 0 Solution Rewrite to x dy + y + 4 = 0 which can be simplified to xdy + ( y + 4)dx = 0 . dx

Keep on working the rest M= N= Find F F = Mdx + ( y ) F = ( F= )dx + ( y ) + ( y) M = y N = x

Yes? No?

Differentiate F with respect to y, equate to N F = y + ' ( y) = N + ' ( y) =

' ( y) =
Find ( y ).

( y ) = ' ( y )dy
= Thus, the solution is xy + 4 x = c . Example 4 Solve sin xdy + ( y cos x x sin x )dx = 0 Solution M= N= Find F F = Mdx + ( y ) F = ( F= F= )dx + ( y ) + ( y) + ( y) M = y N = x

Yes? No?

Differentiate F with respect to y, equate to N F = y + ' ( y) = N + ' ( y) =

' ( y) =
Find ( y ).

( y ) = ' ( y ) dy
=
Thus, the solution is y sin x + x cos x sin x = c . Example 5 Solve (2 xy sec 2 x)dx + ( x 2 + 2 y )dy = 0 Solution M= N= Find F F = Mdx + ( y ) F = ( F= )dx + ( y ) + ( y) M = y N = x

Yes? No?

Differentiate F with respect to y, equate to N F = y + ' ( y) = N + ' ( y) =

' ( y) = ' ( y) =
Find ( y ).

( y ) = ' ( y ) dy
=
Thus, the solution is x 2 y tan x + y 2 = c .

Exercise 1. Solve (sin y + y cos x)dx + (sin x + x cos y )dy = 0 2. Solve (2 x + 3) + (2 y 2) y ' = 0 ans: x sin y + y sin x = c ans: x 2 + y 2 + 3 x 2 y = c

TUTORIAL 5 EXACT EQUATIONS

Solve each differential equation. 1. 3 xy 2 dy + y 3 dx = 0 2. ( y sin 2 x)dx ( y + cos 2 x)dy = 0 3. ln( xy )dx + x dy = 0 y

4. 3 x 2 dx dy = 0 5. y 2 dx + 2 xydy = 0 6. (2 x + y 3 )dx + (3 xy 2 + 4)dy = 0 7. 2 xydx + ( x 2 + y 2 ) dy = 0 8. sin 2 ydx + x sin 2 ydy = 0 9. 2 xy 2 dx + 2 x 2 ydy = 0, y (1) = 1 y (0) = 1 y (0) = 0

10. (2 xy + 3 x 2 )dx + ( x 2 1)dy = 0, 11. (e y 2 xy ) dx + ( xe y x 2 )dy = 0,

CHAPTER

Second Order Linear Differential Equations

Chapter Outline 2.0 Introduction 2.1 Homogeneous Differential Equations 2.1.1 Real and Different Roots to the Auxiliary Equation 2.1.2 Real and Equal Roots to the Auxiliary Equation 2.1.3 Complex Roots to the Auxiliary Equation d2y 2.1.4 Equations of the form n2 y = 0 2 dx 2.2 Non-Homogeneous Differential Equations 2.2.1 The Method of Undetermined Coefficient 2.2.1.1 Case f ( x ) = a polynomial of deg ree n 2.2.1.2 Case f ( x ) = Pe kx 2.2.1.3Case f ( x) = P sin kx OR P cos kx 2.2.1.4Case A linear combination of i, ii, and iii. 2.3 Method of Variation of Parameters (Kaedah Ubahan Parameter)

Chapter Overview and Learning Objectives This chapter deals with second order linear differential equations (SOLDE), as an extension from the previous chapter. Students will be exposed to two types of SOLDE namely homogeneous and non-homogeneous differential equations and its solution methods. It is very important for every student to clearly understand each type of equation and its characteristics so that the learning process is easy. After careful study of this chapter, you should be able to do the following: 1. Clearly understand the types of second order linear differential equations. 2. Able to identify all types of second order linear differential equations and solve using appropriate method. 3. Clearly understand basic concepts of second order and its applications.

2.0

Introduction

In previous chapter, we have studied first-order differential equations. However, knowing only the first-order differential equations is not enough because many engineering problems such as mechanical vibrations, buoyancy, and electric circuits require the use of second-order differential equations, discussed in this chapter. A second-order differential equations can be written as a d2y dy + b + cy = f ( x) 2 dx dx

Where a, b, and c are constant coefficients and f(x) is a given function of x. To make our process of finding the solution simple, we classify our second-order differential equations into two types: 1. Homogeneous differential equations a 2. d2y dy + b + cy = 0 2 dx dx

Non-homogeneous differential equations d2y dy a 2 + b + cy = f ( x) dx dx

2.1

Homogeneous Differential Equations A second-order differential equations are said to homogeneous if f ( x) = 0 , that is, a d2y dy + b + cy = 0 .. (1) 2 dx dx

The solution of the equation is given by y = Ae m1x + Be m2 x , where A and B are two arbitrary constants and m1 and m2 are the roots of the quadratic equation am 2 + bm + c = 0 . This quadratic equation is called the auxiliary equation and is obtained directly from the equation (1), by writing d2y = m2 , dx 2 dy = m, dx y =1

Example 1 Find the auxiliary equations from the given functions 2 d2y dy + 7 + 6y = 0 2 dx dx

d2y dy + 3 + 2y = 0 2 dx dx d2y dy + 5 + 6y = 0 2 dx dx Solution 2 d2y dy + 7 + 6y = 0 2 dx dx 2m 2 + 7 m + 6 = 0

d2y dy + 3 + 2y = 0 2 dx dx d2y dy + 5 + 6y = 0 2 dx dx

Since the auxiliary equation is always a quadratic equation, the values (roots) of m can be determined in the usual way, i.e. factorizes. Example 2 Find the roots of the auxiliary equations 2 d2y dy + 5 + 6y = 0 2 dx dx

d2y dy + 3 + 2y = 0 2 dx dx d2y dy + 5 + 6y = 0 2 dx dx 3 d2y dy + 6 9y = 0 2 dx dx

Solution d2y dy 2 2 + 7 + 6y = 0 dx dx d2y dy + 3 + 2y = 0 2 dx dx d2y dy + 5 + 6y = 0 2 dx dx 3 d2y dy + 6 9y = 0 2 dx dx (2m + 3)(m + 2) = 0 2m + 3 = 0 m + 2 = 0 m = 3 2 m = 2

2m 2 + 7 m + 6 = 0

Remarks: The types of solution we get for homogenous differential equation depends on the roots of the auxiliary equation. There are three (3) types of roots: 1. Real and different roots m = m1 and m = m2 Solution : y = Ae m1 x + Be m2 x 2. Real and equal roots m = m1 (twice) Solution : y = e m1x ( A + Bx) 3. Complex roots m = j Solution : y = e x ( A cos x + B sin x)

2.1.1 Real and Different Roots to the Auxiliary Equation Example 3 Find the solution for Solution Auxiliary equation: m 2 + 5m + 6 = 0 ( m + 2 )( m + 3) = 0 m = 2, m = 3 Solution : y = Ae 2 x + Be 3 x Example 4 Solve y"7 y '+12 y = 0 Solution Auxiliary equation: m 2 7 m + 12 = 0 (m 3)(m 4) = 0 m = 3, m = 4 Solution : y = Ae 3 x + Be 4 x Example 5 Solve d2y dy + 3 10 y = 0 2 dx dx d2y dy + 5 + 6y = 0 2 dx dx

Solution Auxiliary equation: Solution : Example 6 Solve 2 y"+ y ' y = 0 Solution Auxiliary equation: Solution :

2.1.2 Real and Equal Roots to the Auxiliary Equation d2y dy + 6 + 9 y = 0 . The auxiliary equation is: m 2 + 6m + 9 = 0 , 2 dx dx (m + 3)(m + 3) = 0 m = 3 (twice) . If m1 = 3 and m2 = 3 , then these would give the solution y = Ae 3 x + Be 3 x and their two terms would combine to give y = Ce 3 x . But every second-order differential equation has two arbitrary constants, so there must be another term containing a second constant. In fact, it can be shown that y = Kxe 3 x also satisfy the equation, so that the complete general solution id of the form y = Ae 3 x + Bxe 3 x , i.e. y = e 3 x ( A + Bx) . Let us take In general, if the auxiliary equation has real and equal roots, giving m = m1 (twice) , the solution of the differential equation is y = e m1x ( A + Bx) . Example 7 Solve y"+4 y '+4 y = 0 Solution Auxiliary equation: m 2 + 4m + 4 = 0 (m + 2)(m + 2) = 0 m = 2 (twice) Solution : y = e 2 x ( A + Bx) Example 8 Find the solution for y"+10 y '+25 y = 0 Solution Auxiliary equation: Solution : Example 9 Solve d2y dy + 8 + 16 y = 0 2 dx dx

Solution

Auxiliary equation: Solution : 2.1.3 Complex Roots to the Auxiliary Equation Now let us see what we get when the roots of the auxiliary equation are complex. Suppose m = j , i.e. m1 = + j and m2 = j . Then, the solution would be of the form: y = Ce ( + j ) x + De ( j ) x = Ce x .e jx + De x .e jx = e x (Ce jx + De jx ) From our previous understanding on complex number, we know that: e jx = cos x + j sin x e jx = cos x j sin x e jx = cos x + j sin x e jx = cos x j sin x Our solution above can therefore be written: y = e x { C (cos x + j sin x) + D(cos x j sin x)} y = e x { A cos x + B sin x} where A = C + D, B = C D = e x { (C + D) cos x + j (C D) sin x}

Thus, if m = j , the solution can be written in the form: y = e x ( A cos x + B sin x ) For example, if m = 2 j 3 , then y = e 2 x ( A cos 3x + B sin 3 x) For example, if m = 5 j 2 , then y=e ( + )

Example 10 d2y dy Solve + 4 + 9y = 0 2 dx dx Solution Auxiliary equation: m 2 + 4m + 9 = 0 m=

a = 1, b = 4, c = 9

b b 2 4ac 4 16 36 4 20 4 j 2 5 = = = = 2 j 5 2a 2 2 2

In this case, = 2, = 5 Solution: y = e 2 x ( A cos 5 x + B sin 5 x) Example 11 Solve y"2 y '+10 y = 0 Solution Auxiliary equation: m 2 + 4m + 9 = 0 a = 1 , b = 4 , c = 9 b b 2 4ac 4 16 36 4 20 4 j 2 5 m= = = = = 2 j 5 2a In this case, = Solution: , =

2.1.4 Equations of the form

d2y n2 y = 0 2 dx

Let us now consider the special case of the equation d2y dy a 2 + b + cy = 0 when b = 0 , dx dx 2 d y d2y c i.e a 2 + cy = 0 + y=0 dx dx 2 a and this can be written as of y is positive or negative. i) d2y + n 2 y = 0, m 2 + n 2 = 0 m 2 = n 2 m = jn 2 dx (This is like m = j , when = 0 and = n ) If y = A cos nx + B sin nx ii) If d2y n 2 y = 0, m 2 n 2 = 0 m 2 = n 2 m = n dx 2 or y = A cosh nx + B sinh nx d2y n 2 y = 0 to cover the two cases when the coefficient 2 dx

y = Ce nx + De nx Example 12 d2y Solve + 16 y = 0 dx 2 Solution

d2y + 16 y = 0 m 2 = 16 m = j 4 2 dx y = A cos 4 x + B sin 4 x Example 13 Solve d2y 3y = 0 dx 2

Solution d2y 3y = 0 m2 = 3 m = 3 2 dx y = A cosh 3 x + B sinh 3 x or y = Ce Example 14 Solve d2y + 5y = 0 dx 2

3x

+ De

3x

Solution d2y + 5 y = 0 m2 = 2 dx Example 15 Solve d2y 4y = 0 dx 2 m =

Solution d2y 4 y = 0 m2 = 2 dx m =

2.2

Non-Homogeneous Differential Equations

d2y dy + b + cy = f ( x ) for the 2 dx dx 2 case f ( x) = 0 . If f ( x) = 0 , then am + bm + c = 0 giving m = m1 and m = m2 and the solution is in general y = Ae m1x + Be m2 x . So far we have considered equations of the form a d2y dy + b + cy = f ( x ) , the 2 dx dx m1x m2 x substitution y = Ae + Be would make the left-hand side zero. Therefore, there must be a further term in the solution which will make the LHS equal to f (x) and zero. The complete solution which will therefore be of the form y = Ae m1x + Be m2 x + X , where X is the extra function yet to be found. In the non-homogeneous differential equation a y c = Ae m1x + Be m2 x is called the complementary function y p = X (a function of x) is called the particular integral Note that the complete general solution for non-homogeneous equation is given by y = yc + y p

2.2.1 The Method of Undetermined Coefficient At this stage, you have already know how to find the y c . Next, we are trying to find the y p . In order to ease our process of finding y p , lets look at different types of f (x) that you might encounter in your equations. i. f ( x) = a polynomial of deg ree n ( An x n + An1 x n 1 + + A1 x + A0 ) Given f (x) f ( x) = A f ( x) = Ax + B x r (C ) x r (Cx + D) yp

f ( x ) = Ax 2 + B x r (Cx 2 + Dx + E ) n n 1 n r f ( x ) = An x + An 1 x + + Ao x ( An x + An1 x n1 + + Ao ) Hint: Look at the highest order of the given polynomial

ii. iii.

f ( x) = Pe kx , where P and k are constants. The y p is given by x r (Ce kx ) f ( x) = P sin kx OR P cos kx , where P and k are constants yp x r (C cos kx + D sin kx) x r (C cos kx + D sin kx) x r (C cos kx + D sin kx)

Given f (x) f ( x ) = P sin kx f ( x) = P cos kx f ( x) = P cos kx + Q sin kx exist. iv. A linear combination of i, ii, and iii. Given f (x) f ( x ) = x 2 + Pe kx f ( x) = Pe kx + Q sin kx

Hint: The y p take the same form if either sine or cosine or both

yp x r (Cx 2 + Dx + E ) + x r ( Fe kx ) x r (Ce kx ) + x r ( D cos kx + E sin kx)

To find the particular integral, there are four steps involve: 1. 2. 3. 4. Determine the type of the given f (x) Determine the value of r (r=0,1,2) Find the y p ' , y p " and substitute them into the given differential equation. Determine the values of the arbitrary constants by equating the coefficient.

2.2.1.1Case f ( x) = a polynomial of deg ree n ( An x n + An 1 x n 1 + + A1 x + A0 ) For this case, if the given f (x) is of the above form, then the y p is written as: y p = x r ( An x n + An 1 x n 1 + + Ao ) Where r will be 0, 1, 2 such that no term in the y p is a solution in y c .

Example 16 d2y dy Solve 5 + 6 y = x2 2 dx dx Solution Find y c : Repeat what you have done in the previous chapter. m 2 5m + 6 = 0 (m 3)(m 2) = 0 m = 3, m = 2 y c = Ae 2 x + Be 3 x Find y p : Determine which case that you deal with. f ( x) = x 2 x r (Cx 2 + Dx + E ) for r = 0, no term above is in y c , then y p = Cx 2 + Dx + E y p ' = 2Cx + D y p " = 2C Substitute y p , y p ' and y p " in the given DE 2C 5(2Cx + D) + 6(Cx 2 + Dx + E ) = x 2 2C 5 D 10Cx + 6Cx 2 + 6 Dx + 6 E = x 2 Equating coefficients of powers of x 1 x 2 6C = 1 C = 6 [ x] 6 D 10C = 0 6 D = 10 D = 5 6 18 [ Cons ] 2C 5D + 6 E = 0 6 E = 25 2 = 19 E = 19 18 6 18 108

[ ]

Thus, y p =

1 2 5 19 x + x+ 6 18 108

The solution is y = yc + y p y = Ae 2 x + Be 3 x + 1 2 5 19 x + x+ 6 18 108

Example 17 Solve y"5 y '+6 y = 24 . Solution y = Ae 2 x + Be 3 x + 4

Example 18 d2y dy Solve 2 + y = 2x2 1 . 2 dx dx Solution y = ( A + Bx)e x + 2 x 2 + 8 x + 11

2.2.1.2 Case f ( x) = Pe kx

For this case, if the given f (x) is of the above form, then the y p is written as: y p = x r (Ce kx ) Where r will be 0, 1, 2 such that no term in the y p is a solution in y c . Example 19 Solve d2y dy + 14 + 49 y = 4e 5 x 2 dx dx

Solution Find y c : Repeat what you have done in the previous chapter. m 2 + 14m + 49 = 0 (m + 7)(m + 7) = 0 m = 7 (twice) yc = e 7 x ( A + Bx) Find y p : Determine which case that you deal with. f ( x) = 4e 5 x x r (Ce 5 x ) for r = 0, no term above is in y c , then y p = x 0 (Ce 5 x ) = Ce 5 x y p ' = 5Ce 5 x y p " = 25Ce 5 x Substitute y p , y p ' and y p " in the given DE 25Ce 5 x + 14(5Ce 5 x ) + 49Ce 5 x = 4e 5 x 25Ce 5 x + 70Ce 5 x + 49Ce 5 x = 4Ce 5 x 1 144C = 4 C = 36 Thus, y p = 1 5x e 36

The solution is

y = yc + y p y = e 7 x ( A + Bx) + 1 5x e 36

Example 20 Solve y"+4 y '+5 y = 13e 3 x given that when x = 0, y = Solution Find y c : Repeat what you have done in the previous chapter. m 2 + 4m + 5 = 0 5 dy 1 = . and 2 dx 2

y c = e 2 x ( A cos x + B sin x) Find y p : Determine which case that you deal with. f ( x) = 13e 3 x y p = for r = 0, no term above is in y c , then yp = y p '= y p "= Substitute y p , y p ' and y p " in the given DE

Thus, y p =

1 3x e 2

The solution is

y = yc + y p 1 y = e 2 x ( A cos x + B sin x) + e 3 x 2
when x = 0, y = 5 2 5 1 = e 0 ( A cos 0 + B sin 0) + e 0 2 2 5 1 = A+ 2 2 A=2 1 y = e 2 x ( 2 cos x + B sin x ) + e 3 x 2

when x = 0,

dy 1 = y = uv u = e 2 x v = 2 cos x + B sin x dx 2 u ' = 2e 2 x v' = 2 sin x + B cos x

dy 3 = uv'+vu ' = e 2 x (2 sin x + B cos x) + (2 cos x + B sin x)(2e 2 x ) + e 3 x dx 2 1 3 = e 0 (2 sin 0 + B cos 0) 2e 0 (2 cos 0 + B sin 0) + e 0 2 2 1 3 = B4+ 2 2 B=3 1 Particular solution : y = e 2 x (2 cos x + 3 sin x) + e 3 x 2 Example 21 Solve d2y dy 2 8 y = 3e 2 x . 2 dx dx

Solution 1 y = Ae 4 x + Be 2 x xe 2 x 2

2.2.1.4

Case f ( x) = P sin kx OR

P cos kx

For this case, if the given f (x) is of the above form, then the y p is written as: Given f (x) f ( x ) = P sin kx f ( x) = P cos kx f ( x) = P cos kx + Q sin kx exist. Where r will be 0, 1, 2 such that no term in the y p is a solution in y c . Example Given f (x) f ( x ) = 3 cos 4 x f ( x) = 2 sinh x f ( x) = cos 3x + sin 3 x Example 22 Solve y"5 y '+6 y = 2 sin 4 x . Solution y = Ae 2 x + Be 3 x + Find y c : m 2 5m + 6 = 0 ( m 3)( m 2) = 0 m = 3, m = 2 y c = Ae 3 x + Be 2 x Find y p : f ( x) = 2 sin 4 x y p = x r (C cos 4 x + D sin 4 x ) for r = 0 y p = C cos 4 x + D sin 4 x y p ' = 4C sin 4 x + 4 D cos 4 x y p " = 16C cos 4 x 16 D sin 4 x 1 (2 cos 4 x sin 4 x) 25 yp x r (C cos 4 x + D sin 4 x) x r (C cosh x + D sinh x) x r (C cos 3 x + D sin 3 x) yp x (C cos kx + D sin kx)
r

x r (C cos kx + D sin kx) x r (C cos kx + D sin kx)

Hint: The y p take the same form if either sine or cosine or both

Substitute y p , y p ' and y p " in the given DE y"5 y '+6 y = 2 sin 4 x 16C cos 4 x 16 D sin 4 x 5(4C sin 4 x + 4 D cos 4 x) + 6(C cos 4 x + D sin 4 x) = 2 sin 4 x 16C cos 4 x 16 D sin 4 x + 20C sin 4 x 20 D cos 4 x + 6C cos 4 x + 6 D sin 4 x = 2 sin 4 x (20C 10 D) sin 4 x (10C + 20 D) cos 4 x = 2 sin 4 x 20C 10 D = 2 ...(1) 2 40C 20 D = 4....(1) 10C 20 D = 0...( 2) 10C 20 D = 0...( 2) 2 50C = 4 C = 25 1 D= 25 1 ( 2 cos 4 x sin 4 x ) Solution : y = Ae 3 x + Be 2 x + 25 Example 23 Solve d2y dy 2 + 10 y = cos 3 x 2 dx dx

Solution y = e x ( A cos 3x + B sin 3 x) + 1 ( cos 3x 6 sin 3x ) 37

2.2.1.4

Case A linear combination of 2.2.1.1 - 2.2.1.3. Given f (x) f ( x ) = x + Pe


2 kx r 2

yp x (Cx + Dx + E ) + x r ( Fe kx ) x r (Ce kx ) + x r ( D cos kx + E sin kx)

f ( x) = Pe kx + Q sin kx

For this question, you may have a combination of cases that we have discussed before. To make it easier, identify which case that you have in your f(x), and find your y p separately. Consider these examples. Example 24 Solve y"+4 y = e x 2 . Solution

yc : m 2 + 4 = 0 m= 4 m = j2 yc = A cos 2 x + B sin 2 x f ( x) = e x 2 f1 ( x ) = e x y p1 = x r (Ce x ) r = 0, y p1 = Ce x f 2 ( x) = 2 y p 2 = x r ( D) r = 0, y p 2 = D ok! y p = y p1 + y p 2 = Ce x + D y p ' = Ce x y p " = Ce x Substitute y p , y p ' , y p ": Ce x + 4(Ce x + D) = e x 2 5Ce x + 4 D = e x 2 5C = 1 4 D = 2 C = 1/ 5 D = 1 / 2 1 1 yp = ex 5 2 1 1 y = yc + y p = A cos 2 x + B sin 2 x + e x 5 2 f 2 ( x) = 2 y p 2 = x r ( D) ok!

Example 25 Solve y"+2 y '+2 y = 3e x + sin x . Solution Follow previous example to solve this question. Some hints below may help you. yc = e x ( A cos x + B sin x ) y p1 = Ce x y p 2 = D cos x + E sin x y = yc + y p = try... y = e x ( A cos x + B sin x) + 3e x 2 1 cos x + sin x 5 5

2.3

Method of Variation of Parameters (Kaedah Ubahan Parameter)

We have seen that the method of undetermined coefficients is a simple procedure for determining a particular solution when the equation has constant coefficients and the nonhomogeneous term is of a special type. Next, we are going to look at a more general method, called variation of parameters, for finding a particular solution. This method works for every function of f (x) , but it usually more difficult to apply in practice. Lets consider a differential equation ay"+by '+cy = f ( x) . If y1 and y 2 are the solution of ay1 "+by1 '+cy1 = 0 and ay 2 "+by 2 '+cy2 = 0 respectively. Hence, the general solution of ay"+by '+cy = f ( x) is y = uy1 + vy2 Where, u = v= And Wronskian (W) W= In a simple word, to solve 1. Determine a and f(x) 2. Determine y1 and y 2 . That is the solutions for a homogeneous equation where f(x)=0 3. Find the Wronskian, W 4. Find u and v 5. Solve by using the equation y = uy1 + vy2 y1 y1 ' y2 y2 ' y 2 f ( x) dx + A aW

y1 f ( x) dx + B aW

Example 26 Solve using method of variation of parameter y"5 y '+6 = x . Solution 1. a=1 and f ( x ) = x 2. y1 and y 2 . y"5 y '+6 = 0 m 2 5m + 6 = 0 ( m 3)( m 2) = 0 m = 3, m = 2 y = Ae 3 x + Be 2 x

y1 = e 3 x

y2 = e 2 x

y1

y2

3. Wronskian, W W = e3x 3e 3 x e2x = e 3 x .2e 2 x e 2 x 3e 3 x = 2e 5 x 3e 5 x = e 5 x 2x 2e

4. u and v u = y 2 f ( x) dx + A aW (e 2 x )( x) = dx (1)(e 5 x ) = xe 2 x 5 x dx = xe 3 x dx = uv vdu u = x v ' = e 3 x du = 1 v = e 3 x dx = e 3 x 3

e 3 x xe 3 x (1) dx = 3 3 3 x 3 x e xe 3 x e 3 x xe = = +A 3 (3)(3) 3 9

v=

y1 f ( x) dx aW (e 3 x )( x) = dx e5 x = xe 3 x 5 x dx = xe 2 x dx u = x = [uv vdu ] u' = 1 v' = e 2 x v= e 2 x 2

xe 2 x e 2 x = [ dx] 2 2 xe 2 x e 2 x = + 2 (2)(2) = xe 2 x e 2 x + +B 2 4

5. Solve, y = uy1 + vy2 y = uy1 + vy2 xe 3 x e 3 x 3 x xe 2 x e 2 x 2x = + A e + 2 + 4 + B e 3 9 x 1 x 1 = + Ae 3 x + + + Be 2 x 3 9 2 4 x 5 = Ae 3 x + Be 2 x + + 6 36

( )

( )

Example 27 Solve y"+6 y '+8 y = e 2 x given that y (0) = 3, y ' (0) = 1. Solution m 2 + 6m + 8 = 0 (m + 2)(m + 4) = 0 m = 2, m = 4 y1 = e 2 x y1 ' = 2e 2 x e 2 x W = 2e 2 x y2 = e 4 x y 2 ' = 4e 4 x e 4 x = 4e 6 x (2e 6 x ) = 2e 6 x 4 x 4e

u =

y 2 f ( x) dx aW e 4 x e 2 x = dx 2e 6 x 1 = e 6 x( 6 x ) dx 2 1 = 1dx 2 x = +A 2

v=

y1 f ( x) dx aW e 2 x e 2 x = dx 2e 6 x 1 = e 4 x( 6 x ) dx 2 1 = e 2 x dx 2 e2x = +B 4

Hence, y = uy1 + vy2 e2x 4 x x y = + A e 2 x + 4 + B e 2 2 x 2 x xe e y= + Ae 2 x + Be 4 x 2 4 xe 2 x e 2 x y = Ae 2 x + Be 4 x + 2 4

Initial value problem: y (0) = 3, y ' (0) = 1. y (0) = 3 A+ B+0 A+ B= 1 =3 4

13 (1) 4 y ' (0) = 1 y ' = 2 Ae 2 x 4 Be 4 x 2 xe 2 x 1 2 x + e 2 2

2 A 4B 0 + 2 A 4B =

1 =1 2

1 (2) 2 equation (1) 2 13 2 A + 2B = (1) 2 1 2 A 4B = (2) 2 Solve by adding the two equations

2B = 7 7 2 13 A+ B = 4 13 7 27 A= = 4 2 4 B= Hence, the solution is 27 4 x 7 2 x xe 2 x e 2 x y= e e + 4 2 2 4 2 x 27 4 x 15 2 x xe y= e e + 4 4 2

UNIVERSITI MALAYSIA PERLIS INSTITUT MATEMATIK KEJURUTERAAN TUTORIAL 8 VARIATION OF PARAMETER (NON-HOMOGENEOUS EQUATIONS)

Solve each differential equation. 1. d 2 y dy 2y = 8 dx 2 dx

2. y"+2 y '+ y = e 2 x 3. d2y dy 2 + y = 4 sin x 2 dx dx d2y dy 7 4 y = e 3 x , y (0) = 2 and y ' (0) = 5 2 dx dx

4. 2

5.

d2y dy + 4 + 5 y = 2e 2 x , y (0) = 1 and y ' (0) = 2. 2 dx dx

ANSWER Tutorial

TUTORIAL 1 A. DIFFERENTIATION 1. 0 2. 5x 4 3. 4 4. -3 5. 10 x 6. 2 x 3 7. 8 x 3 8. 20 x 7 6 x 4 + 30 x 3 3 x 2 9. 6 x 2 + 2 x 10. 24 x 2 + 12 x 10 11. 20 x + 7 12. 12 x 2 + 14 x 4 5 13. (2 x + 5) 2 2x 1 14. 2 ( x + x) 2 14 15. 2( x + 2) 2 2x 2 + 2x 16. (2 x + 1) 2 17. -7 18. 10 19. 7 cos 7 x 20. 10 sin 5 x 21. 6 x 2 cos x 3 22. 24 x sin 4 x 2 23. 4 cos(1 x ) 24. 4( x 3 x ) sin( x 4 2 x 2 + 3) 25. 6 cos(3 x 1) sin(3x 1) 26. 6 sin 2 ( 2 x + 3) cos( 2 x + 3) 27. 12 x 2 ( x 3 4) 3 sin( x 3 4) 3 28. cos 3x cos x 3 sin x sin 3 x 29. sec 2 x 30. cos x 6x 2 31. 3 2x 3 3 sec 2 3x 32. or 3 sec 3 x cos ec3 x tan 3 x x cos x + sin x 33. x sin x 3 2(3x 2) sec 2 (ln x) 35. x 1 36. x ln x 34. B. INTEGRATION 1 8 x +c 8 1 9 2. x + c 3 3. 4 x + c 54 11 4. x 6 + c 11 3 5. 2 x +c 5 3 2 6. x 6 x + 8 x + c 3 1 2 5 3 7. x x 2 + c 2 2x 4 5 3 8. x 4 x + 9 x + c 5 9. ( x 2 + 3) 4 + c 1 3 ( x 1) 5 + c 10. 10 11. 2 x 2 + x + c 1 1 12. + 2 + c x 2x 1 13. cos 5 x + c 5 1 14. sin(3 x 1) + c 3 1 2 15. cos( x + 5) + c 2 1.

16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30.

1 sec 3 x + c 3 1 ln cos 4 x + c 4 2 3 (3x + 2) 2 + c 9 2 4+ x +c 1 ln 3 x + 2 + c 3 1 ln 1 4 x + c 4 2 ln 1 x 2 + c 1 2x e +c 2 1 e4x + c 4 1 x2 e +c 2 5 3 + x+2 x7 3 2 2x + 3 x 4 1 1 x+ + 2( x + 1) 2( x 1) 1 x +1 ln +c 2 x 1 1 x2 ln +c 6 x+4

35. xe x e x + c 2 32 4 3 x ln x x 2 + c 3 9 2 37. x ln x 2 x + c 1 x 38. e (sin x + cos x) + c 2 39. x(ln x ) 2 2 x ln x + 2 x + c 36.

31. 2 ln x 2 ln x 1 + c @ ( x 2) 2 +c x 1 2 1 32. ln x + 5 + ln x 1 + c @ 3 3 1 ln ( x + 5) 2 ( x 1) + c 3 x 1 + +c 33. ln x +1 x +1 34. x ln x x + c ln

TUTORIAL 2 1 = ln x c or y ln x + 1 = cy y c or xy = c 2. y = x 1 3. 2 y 2 = x + c 1. x3 +c 3 5. ln(3 y ) = ln x + c or x(3 y ) = c 6. 3 y 2 = 2 x 3 + c 7. 1 = 2 y 2 (sin x + c) 8. 2 y + e 2 x = c 9. y = tan 1 x + c 4. tan 1 y = x3 10. tan y = x + +c 3 11. e y = e x + c 1 y = 2 ln( x + 1) + c 12. tan 2 2 13. x 2 + 1 = c( y + 3) 5
1

17. x 2 + y 2 = 9 18. y 2 = ln 2 x 1 19. y = cos 5 x + c 5


3 3

1 3 x 20. y = e + c 3 21. 3e 2 y = 2e 3 x + c 1 3 1 3 1 2 22. x ln x x = y + 2 y + ln y + c 3 9 2 23. 4 cos y = 2 x + sin 2 x + c 24. e x + 1 + 2 e y + 1 = c 25. S = ce kr ce t 26. P = 1 + ce t 1 2 27. y = sin x + c 2 3 28. x = tan 4t 4 1 29. xy = e (1+ x ) 30. FIY ..... find it yourself

14. 1 = (2 x 3 ) y 3 15. y 2 = 2 ln( x 2 + 1) + 16 16. y 2 = 2e x + 34 TUTORIAL 3 1. y + x ln x = cx 2. y 3 = 3x 3 ln x + cx 3 3. y = Ae 4 x 4. A( x + y ) 3 = ( x y ) 5 5. x 2 + xy y 2 = 1 6. x 3 2 y 3 = Ax 7. xy = Ae x , A = e c 8. A( y x 2 ) = ( y 2 x) 9. Axy = ( x 2 y 2 ) 2 10. A(2 y x) 5 (2 y + 3 x) 3 = 1


y y

TUTORIAL 4 1 2 c x + 3 x x e c 2. y = e x + x x 1 3x x 3. y = e + ce 2 4. r = sin + c cos 1. y = 5. y = 1 + c( x 2 + 1) 2 6. y = 4e x ( x + 1) 7. y = 2e x + xe x 1 8. y = (1 + sin x) x x2 2 + x 9. y = x 2(e + 1) e + 1 10. y = xe x x 1 2 11. x = 3 2t t TUTORIAL 5 1. Exact 2. Exact 3. Exact 4. y = x 3 + c 5. xy 2 = c 6. x 2 + xy 3 + 4 y = c 1 3 2 7. x y + y = c 3 2 8. x sin y = c 9. x 2 y 2 = 1 x3 + 1 x2 1 11. xe y x 2 y = 0 10. y =
3 3 1

TUTORIAL 6 1. y = e 6 x ( A + Bx) 2. y = A cos 7 x + B sin 7 x 3. y = Ae x + Be 3 x x x x + B sin 4. y = e A cos 2 2 5. y = A cosh 3 x + B sinh 3 x 6. y = Ae 7 x + Be 2 x 7. y = Ae 4 x + Be 2 x 8. y = Ae x + Be x 9. y = A + Be 3 x 10. y = Ae 2 x + Be 3 11. y = e 2 x + e x 12. y = 9e 3 x 5e 5 x TUTORIAL 7 1. y = Ae x + Be 2 x 4 2. y = Ae 2 x + Be 2 x + 2e 3 x 3. y = e x ( A + Bx) + e 2 x 4. y = A cos 5 x + B sin 5 x + 5. 6. 7. 8. 1 (25 x 2 + 5 x 2) 125
x

y = e x ( A + Bx) + 2 cos x y = e 2 x (2 cos x) y = Ae x + Be x / 3 2 x + 7 y = Ae 2 x + Be 4 x + 4 xe 4 x

e 3x 7 y = e 3 x ( A + Bx) + 6 x + 6 10. 11. y = 4 cos 4 x 2 sin 4 x + Ae 2 x + Be 3 x 1 2x 3x 12. y = e ( A cos x + B sin x) + 2 e 2 1 1 2 x 13. y = e ( A + Bx) + + sin 2 x 4 8 1 x 3x 2x 14. y = Ae + Be + (3 x + 4) e 9 1 1 3x 3x 3 x 15. y = Ae + Be sin 3x + xe 18 6 9. y = Ae 4 x + Be x / 2

TUTORIAL 8 1. y = Ae x + Be 2 x 4 2. y = e x ( A + Bx) + e 2 x 3. y = e x ( A + Bx) + 2 cos x 4. y = Ae 4 x + Be


x 2

e 3x 7

5. y = e 2 x (2 cos x)

You might also like