Differential Equations INTEGRATING FACTOR METHOD Graham S McDonald A Tutorial Module for learning to solve 1st order linear differential equations Table of contents Begin Tutorial c 2004 g.s.mcdonald@salford.ac.uk
1. Theory 2. Exercises 3. Answers 4. Standard integrals 5. Tips on using solutions 6. Alternative notation Full worked solutions Table of contents
Section 1: Theory 3 1. Theory Consider an ordinary differential equation (o.d.e.) that we wish to solve to find out how the variable y depends on the variable x. If the equation is first order then the highest derivative involved is a first derivative. If it is also a linear equation then this means that each term can involve y either as the derivative OR through a single factor of y. Any such linear first order o.d.e. can be re-arranged to give the following standard form: + P (x)y = Q(x) where P (x) and Q(x) are functions of x, and in some cases may be constants.
Section 1: Theory 4 A linear first order o.d.e. can be solved using the integrating factor method. After writing the equation in standard form, P (x) can be identified. One then multiplies the equation by the following integrating factor : IF= e P (x) This factor is defined so that the equation becomes equivalent to: d (IF y) = IF Q(x), whereby integrating both sides with respect to x, gives: IF y = IF Q(x) Finally, division by the integrating factor (IF) gives y explicitly in terms of x, gives the solution to the equation.
Section 2: Exercises 5 2. Exercises In each case, derive the general solution. When a boundary condition is also given, derive the particular solution. Click on Exercise links for full worked solutions (there are 10 exercises in total) Exercise 1. + y = x ; y(0) = 2 Exercise 2. + y = e x ; y(0) = 1 Exercise 3. x + 2y = 10x2 ; y(1) = 3 Theory Answers Integrals Tips Notation
Section 2: Exercises 6 Exercise 4. x y = x2 ; y(1) = 3 Exercise 5. x 2y = x4 sin x Exercise 6. x 2y = x2 Exercise 7. + y cot x = cosec x Theory Answers Integrals Tips Notation
Section 2: Exercises 7 Exercise 8. + y cot x = cos x Exercise 9. (x 2 1) + 2xy = x Exercise 10. = y tan x sec x ; y(0) = 1 Theory Answers Integrals Tips Notation
Section 3: Answers 8 3. Answers 1. General solution is y = (x 1) + Ce x, and particular solution is y = (x 1) + 3e x, 2. General solution is y = e x (x + C), and particular solution is y = e x (x + 1), 3. General solution is y = 5 2 x2 + C x 2, and particular solution is y = 1 2 (5x2 + 1 x 2 ), 4. General solution is y = x 2 + Cx, and particular solution is y = x 2 + 2x, 5. General solution is y = x 3 cos x + x 2 sin x + Cx 2, 6. General solution is y = x 2 ln x + C x 2,
Section 3: Answers 9 7. General solution is y sin x = x + C, 8. General solution is 4y sin x + cos 2x = C, 9. General solution is (x 2 1)y = x2 2 + C, 10. General solution is y cos x = C x, and particular solution is y cos x = 1 x.
Section 4: Standard integrals 10 4. Standard integrals f (x) x n 1 x f(x) f (x) f(x) xn+1 n+1 (n 1) [g (x)] n g (x) ln x g (x) g(x) [g(x)] n+1 n+1 (n 1) ln g (x) e x e x a x ax ln a (a > 0) sin x cos x sinh x cosh x cos x sin x cosh x sinh x tan x ln cos x tanh x ln cosh x cosec x ln tan x 2 cosech x ln tanh x 2 sec x ln sec x + tan x sech x 2 tan 1 e x sec 2 x tan x sech 2 x tanh x cot x ln sin x coth x ln sinh x sin 2 x cos 2 x x 2 x 2 sin 2x 4 sinh 2 x sinh 2x 4 x 2 + sin 2x 4 cosh 2 x sinh 2x 4 + x 2
Section 4: Standard integrals 11 f (x) f (x) f (x) f (x) 1 1 a 2 +x 2 a tan 1 x 1 1 a a 2 x 2 2a ln a+x a x (0< x <a) 1 1 (a > 0) x 2 a 2 2a ln x a x+a ( x > a>0) 1 a 2 x 2 sin 1 x a 1 a 2 +x 2 ( a < x < a) 1 x2 a 2 ln ln x+ a 2 +x 2 a x+ x 2 a 2 a (a > 0) (x>a>0) a2 x 2 a 2 2 [ sin 1 ( ) x a a2 +x 2 a 2 2 ] x2 + x a 2 x 2 a a 2 a 2 2 2 [ [ sinh 1 ( x a cosh 1 ( x a ) + x a 2 +x 2 a 2 ] ) + x ] x 2 a 2 a 2
Section 5: Tips on using solutions 12 5. Tips on using solutions When looking at the THEORY, ANSWERS, INTEGRALS, TIPS or NOTATION pages, use the Back button (at the bottom of the page) to return to the exercises. Use the solutions intelligently. For example, they can help you get started on an exercise, or they can allow you to check whether your intermediate results are correct. Try to make less use of the full solutions as you work your way through the Tutorial.
Section 6: Alternative notation 13 6. Alternative notation The linear first order differential equation: + P (x) y = Q(x) has the integrating factor IF=e P (x). The integrating factor method is sometimes explained in terms of simpler forms of differential equation. For example, when constant coefficients a and b are involved, the equation may be written as: a + b y = Q(x) In our standard form this is: + b a y = Q(x) a with an integrating factor of: IF = e b a = e bx a
Solutions to exercises 14 Full worked solutions Exercise 1. Compare with form: Integrating factor: P (x) = 1. + P (x)y = Q(x) (P, Q are functions of x) Multiply equation by IF: Integrating factor, IF = e P (x) = e = e x e x + ex y = e x x d [ex y] = e x x
Solutions to exercises 15 Integrate both sides with respect to x: e x y = e x (x 1) + C { Note: u dv = uv dv u x, v du ex xe x e x integration by parts with xe x e x = e x (x 1) } y = (x 1) + Ce x. Particular solution with y(0) = 2: 2 = (0 1) + Ce 0 = 1 + C C = 3 and y = (x 1) + 3e x. Return to Exercise 1
Solutions to exercises 16 Exercise 2. Integrating Factor: P (x) = 1, IF = e P = e = e x Multiply equation: Integrate: Particular solution: y = 1 x = 0 e x + ex y = e x e x d [ex y] = 1 e x y = x + C y = e x (x + C). gives 1 = e 0 (0 + C) = 1.C C = 1 and y = e x (x + 1). Return to Exercise 2
Solutions to exercises 17 Exercise 3. Equation is linear, 1st order + P (x)y = Q(x) + 2 x y = 10x, where P (x) = 2 x, Q(x) = 10x Integrating factor : IF = e P (x) = e 2 x = e 2 ln x = e ln x2 = x 2. Multiply equation: x 2 + 2xy = 10x3 d [ x2 y ] = 10x 3 Integrate: x 2 y = 5 2 x4 + C y = 5 2 x2 + C x 2
Solutions to exercises 18 Particular solution y(1) = 3 y(x) = 3 when x = 1. 3 = 5 2 1 + C 1 6 2 = 5 2 + C C = 1 2 ( ) y = 5 2 x2 + 1 2x = 1 2 2 5x 2 + 1 x. 2 Return to Exercise 3
Solutions to exercises 19 Exercise 4. Standard form: ( ) 1 y = x x Compare with + P (x)y = Q(x), giving P (x) = 1 x Integrating Factor: IF = e P (x) = e x = e ln x = e ln(x 1) = 1 x. Multiply equation: Integrate: 1 x 1 x 2 y = 1 [ ] d 1 x y = 1 1 x y = x + C y = x 2 + Cx.
Solutions to exercises 20 Particular solution with y(1) = 3: 3 = 1 + C C = 2 Particular solution is y = x 2 + 2x. Return to Exercise 4
Solutions to exercises 21 Exercise 5. Linear in y : 2 x y = x3 sin x Integrating factor: IF = e 2 x = e 2 ln x = e ln x 2 = 1 x 2 Multiply equation: Integrate: 1 x 2 2 x 3 y = x sin x [ ] d 1 x 2 y = x sin x y x 2 = x cos x 1 ( cos x)+c [Note: integration by parts, u dv = uv v du, u = x, dv = sin x] y x 2 = x cos x + sin x + C y = x 3 cos x + x 2 sin x + Cx 2. Return to Exercise 5
Solutions to exercises 22 Exercise 6. Standard form: Integrating Factor: P (x) = 2 x ( ) 2 y = x x IF = e P = e 2 x = e 2 ln x = e ln x 2 = 1 x 2 Multiply equation: 1 x 2 2 x 3 y = 1 x [ ] d 1 x 2 y = 1 x
Solutions to exercises 23 1 Integrate: x 2 y = x 1 x 2 y = ln x + C y = x 2 ln x + Cx 2. Return to Exercise 6
Solutions to exercises 24 Exercise 7. Of the form: + P (x)y = Q(x) ( linear, 1st order o.d.e.) where P (x) = cot x. } Integrating factor : IF = e P (x) = e cos x sin x { f (x) e f(x) = e ln(sin x) = sin x Multiply equation : sin x + sin x ( ) cos x sin x y = sin x sin x sin x + cos x y = 1 d [sin x y] = 1 Integrate: (sin x)y = x + C. Return to Exercise 7
Solutions to exercises 25 Exercise 8. Integrating factor: P (x) = cot x = cos x sin x { Note: IF = e P = e cos x sin x = e ln(sin x) = sin x cos x sin x f } (x) f(x) Multiply equation: sin x cos x + sin x y sin x = sin x cos x d [sin x y] = sin x cos x Integrate: y sin x = sin x cos x
Solutions to exercises 26 { Note: sin x cos x f(x)f (x) fdf = 1 2 f 2 + C } f df y sin x = 1 2 sin2 x + C = 1 2 1 2 (1 cos 2x) + C 4y sin x + cos 2x = C ( where C = 4C + 1 = constant ). Return to Exercise 8
Solutions to exercises 27 Exercise 9. Standard form: ( ) 2x + x 2 y = x 1 x 2 1 Integrating factor: P (x) = 2x x 2 1 Multiply equation: IF = e P = e 2x x 2 1 = e ln(x2 1) = x 2 1 (x 2 1) + 2x y = x (the original form of the equation was half-way there!) d [ (x 2 1)y ] = x Integrate: (x 2 1)y = 1 2 x2 + C. Return to Exercise 9
Solutions to exercises 28 Exercise 10. P (x) = tan x Q(x) = sec x Multiply by IF: IF = e tan x = e sin x cos x = e + sin x cos x cos x = e ln(cos x) = cos x sin x cos x cos xy = cos x sec x d [cos x y] = 1 y cos x = x + C. y(0) = 1 y = 1 when x = 0 gives cos(0) = 0 + C C = 1 y cos x = x + 1. Return to Exercise 10