Sunteți pe pagina 1din 4

2/3/2014

Examples of solving linear ordinary differential equations using an integrating factor - Math Insight

Math Insight
Examples of solving linear ordinary differential equations using an integrating factor
Example 1
Solv e the ODE
dx cos(t)x (t) = cos(t) dt (1)

for the initial conditions x (0)

= 0

Solution : Since this is a first order linear ODE, we can solv e it by finding an integrating factor (t) . If we choose (t) to be
(t) = e
cos(t)

= e

sin(t)

and multiply both sides of the ODE by

, we can rewrite the ODE as


(e
sin(t)

d dt

x (t)) = e

sin(t)

cos(t).

Integrating with respect to t , we obtain


e
sin(t)

x (t) =

sin(t)

cos(t)dt + C

= e

sin(t)

+ C,
sin(t)

where we used the u -subtitution u

= sin(t)

to compute the integral. Div iding through by

, we calculate

that the the general form of the solution to equation (1) is


x (t) = 1 + C e
sin(t)

We v erify that we hav e a solution to equation (1). Since


dx = Ce dt
sin(t)

cos(t)

we calculate that
dx cos(t)x (t) = C e dt
sin(t)

cos(t) cos(t)(1 + C e

sin(t)

) = cos(t),

demonstrating that we hav e found the general solution to the ODE.


http://mathinsight.org/ordinary_differential_equation_linear_integrating_factor_examples 0
= x (0) = 1 + C
0

= 1 + C

1/4

2/3/2014

Examples of solving linear ordinary differential equations using an integrating factor - Math Insight
= x (0) = 1 + C e
0

We determine the integration constant C by the condition 0 Our specific solution to the ODE of (1) is
x (t) = 1 + e

= 1 + C

, so that C

= 1

sin(t)

Example 2
Solv e the ODE
dx = dt 1 ( x + I (t)) (2)

with initial condition x (t 0 )

= x0

Solution : Rewrite the equation in the form


dx + dt
t/

x =

I (t) .

In this case, our integrating factor is (t) ODE as

= e

(1/ )dt

= e

. Multiply ing through by

(t)

, we can rewrite our

d (e dt

t/

I (t) x (t)) = e

t/

For this ex ample, let's integrate from t 0 to t , rather than calculate the indefinite integral as in prev ious ex amples.
t

d dt

t0

(e

t /

x ( t ) )d t

I (t ) e
t

=
t0

t /

dt

t/

x (t) e

t0 /

1 x( t 0 ) =
t0

t /

I (t )dt

Div iding through by

t/

and using the initial conditions x (t 0 )


x (t) = e
(t t0 )/

= x0

, the solution to the ODE of (2) is


1 x0 +
t0

(t t )/

I (t )dt .

(3)

To v erify this solution, we differentiate equation (3) with respect to t , obtaining three terms (two from the ex ponentials and one from the upper integration limit),
dx = dt 1 = 1 = x (t) + 1 I (t). (e 1 e
(t t0 )/

1 x0

1 1
t0 t

(t t )/

I (t ) d t +

1 e

0/

I (t)

(t t0 )/

x0 +


t0

(t t )/

I ( t )d t ) +

1 I (t)

Indeed x (t) satisfies equation (2). If we plug t =


0

t0

into equation (3), the integral is from t 0 to

t0

, so is zero.
2/4

http://mathinsight.org/ordinary_differential_equation_linear_integrating_factor_examples = 1

2/3/2014

Examples of solving linear ordinary differential equations using an integrating factor - Math Insight
= 1

The ex ponential of the first term is e0

, and we confirm that x (t 0 )

= x0

Example 3
Solv e the ODE
dx dt + e x (t) = t
t 2

cos(t)

(4)

with the initial condition x (0)

= 5

Solution : The first step is to find the integrating factor


(t) = e
e dt
t

= e

= exp(e ),

where exp(x ) is another way of writing ex . Multiply ing equation (4) by deriv ativ e of (t)x (t) . We can write it as
d dt (exp( e )x (t)) = t
t 2

(t)

, then the left hand side is the

cos(t) exp(e ).

To solv e the ODE in terms of the initial conditions x (0), we integrate from 0 to t , obtaining
t

d ds

(exp( e )x (s))ds =
0 t

cos(s) exp(e )ds

exp(e )x (t) exp(e )x (0) =


0

cos(s) exp(e )ds.

Ev en though we cannot compute the integral analy tically , we still consider the ODE solv ed. Plugging in the initial conditions x (0)
= 5

, we can write the solution of the ODE (4) as


t t 2 s t

x (t) = 5 exp(1 e ) +
0

cos(s) exp(e

e )ds.

Y ou can easily check that x (t) satisfies the ODE (4) and the initial conditions x (0)

= 5

See also
Solv ing linear ordinary differential equations using an integrating factor An introduction to ordinary differential equations

Cite this as
Ny kamp DQ, Ex amples of solv ing linear ordinary differential equations using an integrating factor. From Math Insight . http://mathinsight.org/ordinary _differential_equation_linear_integrating_factor_ex amples Key words: differential equation, integrating factor, ordinary differential equation
http://mathinsight.org/ordinary_differential_equation_linear_integrating_factor_examples 3/4

2/3/2014

Examples of solving linear ordinary differential equations using an integrating factor - Math Insight

Ex amples of solv ing linear ordinary differential equations using an integrating factor by Duane Q. Ny kamp is licensed under a Creativ e Commons Attribution-Noncommercial-ShareAlike 3.0 License. For permissions bey ond the scope of this license, please contact us.

http://mathinsight.org/ordinary_differential_equation_linear_integrating_factor_examples

4/4

S-ar putea să vă placă și