The Integrating Factor Method for Solving Ordinary Differential Equations, Lecture notes of Electronics engineering

The integrating factor method for solving ordinary differential equations (ODEs) of the form dy/dx + P(x)y = Q(x). The method involves finding a particular solution yP and the homogeneous solution yH, and then combining them to find the general solution. The document also covers the separation of variables method for homogeneous ODEs and the exact differential equations.

Typology: Lecture notes

2019/2020

Uploaded on 05/11/2020

jek0821
jek0821 🇺🇸

1 document

1 / 41

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
C19 : Ordinary Differential Equations I - B
Chapter 19 Ordinary Differential Equations I(Part B)
19.4 First order linear equations: use of an integrating factor
19.4.1 Exact equations I
A first order linear differential equation is an exact equation when it takes the form
a(x)dy
dx +a ' (x)y=g(x)
or
a(x)y ' +a ' (x)y=g(x)
(1)
where
a(x)
is a function of the independent variable (x in the above equation).
From the general form
a1(x)y ' +a0(x)y=g(x)
:
We can see that the coefficient
a0(x)
of
y
is the derivative of the coefficient
a1(x)
of
.
The equation (1) can easily be rewritten as
d
dx [a1(x)y] = g(x)
(2)
and easily integrated to lead to a solution
a1(x)y=G(x)+c
or
y(x)=G(x)
a1(x)+c
a1(x)
Lmc March 2020 1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29

Partial preview of the text

Download The Integrating Factor Method for Solving Ordinary Differential Equations and more Lecture notes Electronics engineering in PDF only on Docsity!

Chapter 19 Ordinary Differential Equations I (Part B)

19.4 First order linear equations: use of an integrating factor

19.4.1 Exact equations I

A first order linear differential equation is an exact equation when it takes the form a ( x) dy dx

  • a ' (x ) y = g ( x ) (^) or a ( x) y ' + a ' (x ) y = g (x) (1)

where a^ (^ x)^ is a function of the independent variable (x in the above equation).

  • From the general form (^) a 1 ( x) y ' + a 0 ( x) y = g ( x) : ◦ We can see that the coefficient a 0 (^ x)^ of y is the derivative of the coefficient a 1 (^ x)^ of dy dx . ◦ The equation (1) can easily be rewritten as d dx [a 1 (x )⋅y ] = g ( x) (^) (2) and easily integrated to lead to a solution a 1 (^ x)^ y^ =^ G^ (x^ )^ +^ c or y(^ x)^ =^ G ( x) a 1 ( x)

c a 1 ( x)

Example 19.14 Solving an exact equation

Solve the first order linear DE x 2 dy dx

  • 2 x y = cos x

Solution

  1. We recognize an exact equation in the form of a^ dy dx
  • a ' y = g (x ) Where a 1 ( x) = x 2 , a 0 (^ x)^ =^2 x^ =^ a 1 '^ (^ x)^ and g (x ) = cos x
  1. We rewrite the equation as d dx [ x 2 y] = cos x (^) ► (^) d [ x 2 y ] = cos x dx
  2. Integration on both side : (^) x 2 y = sin x + c
  3. Explicit general solution : y(^ x)^ =^ sin x x
2 +^

c x

2 I^ :^ x^ ≠^0

See Examples 19.15 in textbook (Example 19.13 in 5

th

edition)

19.4.3 First order linear equations

From the general form of a linear DE: an (x ) d n y dx n

  • an− 1 ( x ) d n− 1 y dx n− 1
  • ⋯ + a 1 ( x) dy dx
  • a 0 (x) y = g ( x ) We get the first order linear DE in the dependent variable y. a 1 ( x) dy dx
  • a 0 ( x) y = g (x )
  • If g (x ) = 0 , then the equation is homogeneous.
  • If g (x ) ≠ 0 , then the equation is non-homogeneous. This equation can be rewritten in standard form dy dx
  • P ( x ) y = Q ( x ) (^) (5)
  • with P^ (^ x)^ =^ a 0 (x ) a 1 ( x) and Q^ (x^ )^ =^ g ( x) a 1 (x )
  • P and Q are function of the independent variable only or simply constants.

Examples of standard equations

General form Standard form P Q

x dy dx

  • 3 x 2 y = 7 x 3 dy dx
  • 3 x y = 7 x 2 P ( x ) = 3 x (^) Q ( x) = 7 x 2 x dy dx − 2 y = 4 x e − x dy dx − 2 y x = 4 e −x P ( x ) = − 2 x Q ( x) = 4 e −x 2 x 2 dy dx − 10 x 2 y = 2 x 2 sin x dy dx − 5 y = sin x P = − 5 Q ( x) = sin x − 6 dx dt − 48 t x = − 18 t 2
  • 30 t dx dt
  • 8 t x = 3 t 2 − 5 t (^) P (t ) = 8 t (^) Q (t ) = 3 t 2 − 5 t L di dt
  • R i = E (t ) di dt

R L i = E (t) L P = R L Q (t ) = E (t ) L Note : In textbook, when it says the apply voltage in a RL circuit is a ramp, it means E (t ) = t.

1) Homogeneous DE

The homogeneous DE dy dx

  • P ( x ) y = (^0) is separable ► dy y = −P (x ) dx By integrating we get ln y = −[∫ P ( x) dx (^) ] + c ► (^) y H =^ c^ e −∫ P ( x) dx (8) with (^) y 1 =^ e −∫ P ( x )dx we can rewrite (8) as ► yH (^ x^ )^ =^ c^ y 1 (^ x)^ (9)
  • Verification of the solution (9) in the homogeneous DE dy dx + P ( x ) y = (^0) ► dyH dx + P (x) yH = 0 ► c dy 1 dx + P ( x) c y 1 = 0 or dy 1 dx
  • P (x ) y 1 = 0 (will be used to determine y^ p )

2) Non-homogeneous DE

To find a particular solution of equation (5), we will use a procedure called Variation of Parameters

  • Basic idea : To find a function ν ( x ) that will be used to multiply y 1 (^ x)^ from equation (9) so that the product y^ p (^ x^ )^ =^ ν^ (^ x )⋅ y 1 (^ x )^ is a solution of equation (5). dy dx
  • P (x ) y = Q ( x ) ► dy (^) p dx
  • P ( x) y (^) p = Q ( x) ► d [ ν y 1 ] dx
  • P (x) ν y 1 = Q (x ) ► ν dy 1 dx
  • y 1 d ν dx
  • P (x ) ν y 1 = Q ( x) ► ν ( dy 1 dx
  • P (x ) y 1 )
  • y 1 d ν dx = Q( x) = 0 (see verification of equation (9) previous page) ► y 1 d ν dx = Q ( x) (^) (10)

From the resulting solution (13), we can develop the method to solve the DE (5) Multiplying the equation (13) by (^) e ∫ P^ (^ x^ )^ dx^ we get e ∫ P^ (^ x)^ dx^ y = c + (^) ∫e ∫ P^ (^ x^ )^ dx^ Q (x) dx Then deriving both sides d dx [ (^) e ∫ P^ (^ x^ )^ dx^ y ]^ = e ∫P^ (x^ )^ dx^ Q ( x ) (^) ( d [ uv ] = uv ' + u ' v (^) ) e ∫ P^ (^ x)^ dx^ ⋅ dy dx

  • y ⋅ d dx [e ∫ P^ (^ x^ )^ dx^ ] = e ∫ P^ (^ x^ )^ dx^ Q ( x ) e ∫ P^ (^ x)^ dx^ ⋅ dy dx
  • e ∫ P^ (^ x^ )^ dx^ ⋅ d dx [∫ P ( x ) dx ]⋅ y = e ∫ P^ (^ x^ )dx^ Q( x) e ∫ P^ (^ x)^ dx^ ⋅ dy dx
  • P( x) e ∫ P^ (^ x^ )^ dx ⋅y = e ∫ P^ (^ x^ )^ dx^ Q (x ) (^) (14) Equation (14) is obviously the DE dy dx
  • P (x ) y = Q ( x ) (^) multiplied by the expression e ∫ P^ (^ x)^ dx^ .

Solving a linear first order differential equation

By multiplying equation (5) by a function μ we get

μ dy dx

  • μ P y = μ Q (^) (15) with μ = e ∫ P^ (^ x^ )^ dx^ we can recognize that μ^ dy dx
  • μ P y = d dx [μ y] as previously demonstrated with equation (13) to (14). Equation (15) can then be rewritten as d dx [μ y] = μ Q (^) (16) This exact equation can be solved by integration to get μ^ y^ =^ ∫μ^ Q^ dx^ (17) And The solution of the non-homogeneous DE dy dx
  • P (x ) y = Q ( x ) is given by (^) y( x) =

μ ∫μ^ Q^ dx^ (18) where μ^ =^ e ∫ P^ (^ x^ )^ dx^ is called an integrating factor.

General Solution

The general solution of dy dx

  • P ( x ) y = Q (x ) is y(^ x)^ =^ yH +^ yP =^ c^ e −∫ P ( x ) dx
  • e −∫ P ( x ) dx ⋅∫e ∫ P^ (^ x^ )^ dx^ Q ( x) dx

Example 19.4.4.1 Solving a linear DE

Solve dy dx − 3 y = 6

Solution

  1. Already in standard form
  2. P ( x) = − (^3) μ = e∫^ P ( x) dx = e ∫−^3 dx^ = e − 3 x μ = e − 3 x Textbook method Prof method
  3. e − 3 x dy dx − 3 e − 3 x y = 6 e − 3 x ► d dx [e − 3 x y] = 6 e − 3 x ∫d^ [e − 3 x y ] = (^) ∫ 6 e − 3 x dx ► (^) e − 3 x y = − 2 e − 3 x
  • c 3') y^ =^ 1 μ ∫μ^ Q^ dx^ =^ 1 e − 3 x ∫^ e − 3 x ⋅ 6 dx = e 3 x ⋅ (^6) ∫e − 3 x dx = e 3 x ⋅ 6 {− 1 3 e − 3 x
  • c}
  1. Solution : (^) y = − 2 + ce 3 x on interval I^ :^ −∞^ <^ x^ <^ ∞

Note :

  • For the DE a 1 (^ x)^ dy dx + a 0 ( x) y = g ( x) (^) ,

◦ when a 1 , a 0 and g are constant, the DE is then said to be autonomous.

  • First order autonomous DE generate constant solution.
  • In Example 19.4.4.1, dy dx = 3 ( y+ 2 ) (^) ► (^) y( x) = − 2 is a constant solution. (and part of the general solution)

Constant of Integration (integrating factor)

From example 19.4.4.1,

  1. (^) μ = e ∫ P^ (^ x)^ dx^ = e − 3 x+c 1 = e c 1 e − 3 x = c 2 e − 3 x
  2. c 2 e − 3 x dy dx − 3 c 2 e − 3 x y = 6 c 2 e − 3 x ► c 2 [e − 3 x dy dx − 3 e − 3 x y] = c 2 [ 6 e − 3 x ]

∴ N o needs to introduce a constant of integration when solving for the integrating factor.

Example 19.4.4.3 General Solution

Solve (^ x 2 − 9 ) dy dx

  • x y = 0 Solution
  1. Standard form : dy dx

x x 2 − 9 y = (^0) ► P^ (^ x)^ =^ x ( x 2 − 9 ) Q (x ) = 0

  1. Integrating factor : (^) μ = e ∫ xdx/(^ x (^2) − 9 ) = e 1 2 ∫ 2 x dx/( x^2 − 9 ) = e 1 2 ln|x^2 − 9 |

► μ = √ x

2 − 9 Note : P is continuous on (−∞^ ,−^3 )^ , (−^3 ,^3 )^ and (^3 ,^ ∞)^ , but μ is undefined on (− 3 , 3 ) (square root of negative values)

  1. y =

μ ∫μ^ Q^ dx^ :^ y^ =^

√ x

2 − 9 ∫√^ x 2 − 9 ⋅ 0 dx =

√ x

2 − 9 ∫^0 dx^ =^ c

√ x

2 − 9

  1. General solution: y(^ x)^ =^ c

√ x

2 − 9 on I : x > 3 or I : x < − 3

Example 19.4.4.4 An Initial-Value Problem

dy dx

  • y = x with (^) y( 0 ) = 4 Solution
  1. Already in standard form : P ( x) = 1 , Q (x ) = x Both are continuous on (−∞^ ,^ ∞)
  2. Integrating factor : μ = e ∫dx^ = e x ► μ = e x
  3. y =

μ ∫μ^ Q^ dx^ :^ y^ =^

e x ∫ e x ⋅ x dx = e −x [ x e x − e x

  • c] = x − 1 + c e −x
  1. General solution : (^) y( x) = x − 1 + c e − x
  2. Initial value : y( 0 ) = 4 ► (^4) = 0 − 1 + c e 0 ► c = 5
  3. Solution of the IVP : (^) y( x) = x − 1 + 5 e −x on I : −∞ < x < ∞

Example 19.4.4.5 An Initial-Value Problem and piece-wise function

Solve dy dx

  • y = f ( x ) , y ( 0 ) = (^0) where f^ (^ x)^ =^

1, 0 < x ⩽ 1 0, x > 1

Solution

We first solve for y( x) on [0, 1 ] (A.), and in a second step (B.), we solve for (1,∞). A. For 0 < x ⩽ 1 ► dy dx

  • y = 1
  1. P ( x) = 1 ► (^) μ = e∫ dx = e x ► (^) μ = e x
  2. y^ =^

e

x ∫

e x ⋅ 1 dx = e −x [e x

  • c] (^) ► y( x) = 1 + c 1 e −x
  1. y( 0 ) = 0 ► c 1 =^ −^1 ► (^) y( x) = 1 − e − x B. For x > 1 ► dy dx
  • y = 0
  1. (^) P ( x) = 1 ► (^) μ = e∫ dx = e x (^) ► μ = e x
  2. y^ =^

e

x ∫e

x ⋅ 0 dx = e −x [c 2 ] (^) ► y( x) = c 2 e − x

From expressions found in A. and B. Intermediate solution : y(^ x)^ =^

1 − e −x , 0 < x ⩽ 1 c 2 e −x , x > 1 I have no initial value to use to find c 2 but … C. By definition of continuity at a point, it is possible to determine c 2_._ At x = 1 ► y(^1 )^ =^1 −^ e − 1 = c 2 e − 1 ► c 2 =^ e−^1 Solution of the IVP : y(^ x)^ =^

1 − e −x , 0 < x ⩽ 1 (e− 1 )e − x , x > 1 I : 0 < x < ∞