Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

EM2 Solved problems—ODE c pHabala 2003

EM2 Solved problems—Ordinary Differential Equations


y
1. Find the general solution to the equation y′ = 2−x .

Solve the following problems:


1
x(1) = π2 ;
p
2. 2x ẋ = 1+t2,

3. (1 + et ) y ′ = et , y(0) = 0;
q
′ y
4. y = x+1 , y(0) = 4;
y
5. ẏ + x = 3x, y(−1) = 2;
2
6. y ′ = 2xy + ex , y(1) = 0.

t

7. Find the general solution to the equation y′ = 1+t2 y+ 1 + t2 .

For each of the following equations, find its fundamental system and general solution:
8. y ′′′ + y ′′ − 2y ′ = 0;
9. y ′′ − 2y ′ + y = 0;
10. y ′′′ − 4y ′′ + 13y ′ = 0;
11. 4y ′′′′ − 8y ′′′ + 5y ′′ = 0.

Find the general solution to the following equations:


12. ẍ + 3ẋ + 2x = et1+1 ;
13. y ′′ − 2y ′ + y = 2t + 9;
14. y ′′ + y ′ − 2y = 18t et − 4e−t ;

e−x
15. y ′′ + 2y ′ + y = x2 +1 .

Find the solution to the problem


16. ÿ + 4y = 8 cos(2x), y(0) = 0, ẏ(0) = 6.
2et
17. y ′′ − y = et +1 , y(0) = 2 − 2 ln(x), y ′ (0) = −1.

18. Try all possible methods to find the general solution to the problem y ′′ +y = 8e2t sin(t).
EM2 Solved problems—ODE c pHabala 2003
°

Solutions
1. The equation is of the first order, with a bit of luck it can be solved by separation. To see
dy
whether it is separable, we replace y ′ with dx and try to separate variables:
dy y dy dx
dx = x−2 =⇒ y = x−2 .
We succeeded, so we solve this equation by separation. The next step is to integrate both sides,
using “+C” only on the Rright and ignoring absolute values:
dy
R dx
y = x−2 =⇒ ln(y) = ln(x − 2) + C.
We solve for y:
y = eln(x−2)+C = eC · eln(x−2) = A (x − 2).
(We used A = eC ). We obtained a general solution to the equation, it remains to determine the
domain. In the equation it is not allowed to have x − 2 = 0. In the solution there is no trouble
and no other condition arises, so we can write the answer:
y(x) = A (x − 2), x 6= 2.
By the way, this means that when finding a particular solution, we have a choice between
intervals (−∞, 2) and (2, ∞).
2. This is an initial value problem, first we have to find a general solution of the equation.
Again, we have an equation of the first order. Note that in this case the letter x denotes an
unknown function, while the variable is t! So to find whether we can separate we will replace ẋ
with dx
dt :
2x dx 1
dt = 1+t2 =⇒ dt
2x dx = 1+t 2.

We succeeded in separation
R dt and continue: we integrate and solve for the
pfunction x.
2
R
2x dx = 1+t2 =⇒ x = arctan(t) + C =⇒ x = ± arctan(t) + C.
So we have two different versions of the general solution. Concerning domain, in the original
eqation there is no problem, but in the solution we have to make sure that arctan(t) + C ≥ 0.
Thus we get two kinds of general psolution:
x(t) = arctan(t) + C, t ∈ [− tan(C), ∞),
p
x(t) = − arctan(t) + C, t ∈ [− tan(C), ∞).
Having the general
p π solution, we will use the initial condition to find the particular solution.
Since x(1) = 2 > 0, we will consider the first general solution, because the second cannot
give positive values.
arctan(1) + C = π2
pπ pπ
C = π4 .
p p
=⇒ 4 +C = 2 =⇒
Thus we get the following solution (using tan(π/4) = 1):
x(t) = arctan(t) + π4 , t ∈ [−1, ∞).
p

3. This is an initial value problem, first we have to find a general solution of the equation. We
will try to separate:
et
(1 + et ) dy
dt = e
t
=⇒ dy = 1+e t dt.

It worked, we can integrate (with +C only on the right) and solve for y. Note that for the
integral on the right we Rwill use Rthe substitution w = 1 + et .
et
1 dy = 1+e t dt =⇒ y = ln(1 + et ) + C.
Since in the given equation there is no problem, we only have to look at the solution for the
domain, and we see that we have to make sure that 1 + et > 0, but this is always true as et > 0.
So we get the general solution
y(t) = ln(1 + et ) + C, t ∈ IR.
Now we use the initial condition to determine the appropriate C:
ln(1 + e0 ) + C = 0 =⇒ ln(2) + C = 0 =⇒ C = − ln(2).
Thus we get the desired solution of our initial value problem:

y(t) = ln(1 + et ) − ln(2) = ln 1+e
¡
2 , t ∈ IR.
EM2 Solved problems—ODE c pHabala 2003
°

4. First we need to find the general solution. This is not a linear equation (y is under a square
root), so the only hope is√separation:
dy y dy
R dy
√ = √dx
R dx
dx = =⇒ =⇒
√ √ = √
x+1 y x+1 y x+1
√ √ √ √
=⇒ 2 y =2 x+1+C =⇒ y = x+1+A
¡√ ¢2
=⇒ y= x + 1 + A , x > −1.
This is the general solution.
Note: there is a little problem concerning possible values of A. The square√root as a function

is defined only on the positive axis, so y ≥ 0. Consequently we must have x + 1 + A ≥ 0 on
the domain (see the calculations above), that is, we can only have A ≥ 0. However, we will not
worry now, the problem will appear shortly.
Now we use¡√ the initial condition:
¢2
0 + 1 + A = 4 =⇒ (1 + A)2 = 4 =⇒ 1 + A = ±2 =⇒ A = 1, −3.
There are two possible solutions, so probably one of them is √ wrong. We will try:
¡√ ¢2 ′ x+1−3
a) If y(x) = x + 1 − 3 , then the left-hand side is y = √ x+1
, while the right-hand side
reads p√ 2 √
q
y ( √x+1−3) | √x+1−3|
x+1 = x+1
= x+1
.
Since the expression inside the absolute value can be negative (try x = 0), the absolute value
does matter and the two sides are not equal. This is not a solution.

¡√ ¢2 x+1+1
a) If y(x) = x + 1 + 1 , then the left-hand side is y ′ = √ x+1
, while the right-hand side
reads p√ 2 √
q
y ( √x+1+1) | √x+1+1|
x+1 = x+1
= x+1
.

Since x + 1 + 1 ≥ 0 always, the absolute value can be ignored and both sides of the equation
agree. Thus we have the solution:
¡√ ¢2
y(x) = x + 1 + 1 , x > −1.

5. This is an initial value problem, first we have to find a general solution of the equation. We
try to separate:
dy y
dx + x = 3x =⇒ x dy + y dx = 3x2 dx.
It seems that the separation is not possible, so the separation trick will not work. Could it be
that the equation is linear?
y ′ + x1 y = 3x.
Yes it is! So we use the variation of parameter procedure. First we solve the homogeneous
equation, by separation as usual (we ignore absolute
R dy R values, put +C on the right only):
dy 1 dy dx dx
dx + x y = 0 =⇒ y =− x =⇒ y = −x
C
e
=⇒ ln(y) = − ln(x) + C =⇒ yh (x) = eC−ln(x) = eln(x) =A x.
This is the general solution of the associated homogeneous equation. To find a solution to the
given equation we have to pretend now that A is a function and substitute y(x) = A(x)
x into the
given equation:
h i′
A(x) A′ (x)x−A(x) A′ (x)
x + A(x)
x2 = 3x =⇒ x2 + A(x)
x2 = 3x =⇒ x = 3x
=⇒ A′ (x) = 3x2 =⇒ A(x) = x3 + C.
We substitute into y above and obtain the general solution of the given equation:
3
y(x) = x x+C = x2 + Cx , x 6= 0.
(The domain follows from the fact that the given equation and also the solution cannot have
x = 0). Now we use the initial condition:
C
(−1)2 + −1 =2 =⇒ 1 − C = 2 =⇒ C = −1.
EM2 Solved problems—ODE c pHabala 2003
°

We also have to make a choice between intervals (−∞, 0) and (0, ∞). The proper domain has
to allow us to use the initial condition, that is, it has to contain x = −1. This is true only for
the first interval, so we get the solution of the given initial value problem:
y(x) = x2 − x1 , x ∈ (−∞, 0).
6. First we need the general solution. Separation is not possible either, but the equation is
linear and we can use variation of parameter. First we have to solve the homogeneous equation
2
y ′ = 2xy. (Note that properly we should write y ′ − 2xy = ex and the pass to y ′ − 2xy = 0.)
This equation is linear, but it does not have constant coefficients (the coefficient at y is 2x), so
the fundamental system approach is not possible. Fortunately for us,
Z separation now helps:
dy dy dy
Z
= 2xy =⇒ = 2x dx =⇒ = 2x dx
dx y y
2 2 2
=⇒ ln(y) = x2 + C =⇒ y = ex +C = eC ex = A ex .
2
Now we do the variation and pretend that y(x) = A(x)ex . We calculate
2 2
y ′ (x) = A′ (x)ex + 2x A(x)ex
and substitute y and y ′ into the given equation:
2 2 2 2
[A′ (x)ex + 2x A(x)ex ] = 2x[A(x)ex ] + ex .
2 2
From this we get A′ (x)ex = ex , that is, A′ (x) = 1.
2 2
An alternative is to remember that from y(x) = A(x)ex we always get the equation “A′ (x)ex
is equal to the right-hand side”.
2
From a′ (x) = 1 we get A(x) = x and a particular solution yp (x) = x ex , from the first part we
2
have yh (x) = a ex , therefore the general solution is
2
y(x) = yp (x) + yh (x) = (x + a)ex , x ∈ IR.
2
We could also write A(x) = x + C and get y(x) = (x + C)ex .
Either way, we have the general solution and we can use the initial condition:
y(1) = 0 =⇒ (1 + a)e1 = 0 =⇒ (1 + a)e = 0 =⇒ 1 + A = 0 =⇒ A = −1.
Thus we get
2
y(x) = (x − 1)ex , x ∈ IR.
7. First we try to separate: √
dy t
dt = 1+t2 y + 1 + t2 =⇒ (1 + t2 )dy = ty dt + (1 + t2 )3/2 dt.
This does not look too hopeful, separation failed. √ Is this a linear equation?
t
y ′ − 1+t 2 y = 1 + t2 .
Yes it is. So we use the variation of parameter procedure. First we find the general solution of
the associated homogeneous equation. When integrating on the right, we use the substitution
w = 1 + t2 .
dy
t t dt
R dy R t dt
y ′ − 1+t2 y = 0 =⇒ y = 1+t 2 =⇒ y = 1+t2 =⇒ ln(y) = 12 ln(1 + t2 ) + C
1 2 √ √
=⇒ yh (t) = e 2 ln(1+t )+C = eC eln(1+t2 ) = A 1 + t2 .
Note that there was no trouble in the given equation, there is also no trouble in the solution,
so this solution of the homogeneous equation works on the whole √ real line.
Now we pretend that A is a function and substitute y(t) = A(t) 1 + t2 into the given equation.
h p i′ t p p
A(t) 1 + t2 − A(t) 1 + t 2 = 1 + t2
1 + t2
p t t A(t) p
A′ (t) 1 + t2 + A(t) √ −√ = 1 + t2
1 + t2 1 + t2
A′ (t) = 1 =⇒ A(t) = t + C.
Thus we get the general solution of the given √ equation:
y(t) = (t + C) 1 + t2 , t ∈ IR.
8. The given equation is linear, we therefore use characteristic numbers and the Fact:
EM2 Solved problems—ODE c pHabala 2003
°

Characteristic equation: λ3 + λ2 − 2λ = 0, that is, λ(λ − 1)(λ + 2) = 0.


Thus we have characteristic numbers λ = 0, 1, −2, all with multiplicity one.
Therefore the fundamental system is {e0·x , e1·x , e2·x } = {1, ex , e2x }.
The general solution is y(x) = a + bex + ce2x , x ∈ IR.
9. The given equation is linear. Characteristic equation:
λ2 − 2λ + 1 = (λ − 1)2 = 0. Thus we have characteristic number λ = 1 with multiplicity two.
Thus the fundamental system is {e1·x , x e1·x } = {ex , x ex }.
The general solution is y(x) = aex + bx ex , x ∈ IR.
10. The given equation is linear. Characteristic equation:
λ3 − 4λ2 + 13λ = λ(λ2 − 4λ + 13) = 0.
Using the quadratic formula we get roots λ = 2±3j, we have characteristic numbers λ = 0, 2±3j,
all with multiplicity one.
We consider only one complex root (say, the one with “+”) and get the fundamental system
{e0·x , e2·x sin(3 · x), e2·x cos(3 · x)} = {1, e2x sin(3x), e2x cos(3x)}.
The general solution is y(x) = a + be2x sin(3x) + ce2x cos(3x), x ∈ IR.
11. The given equation is linear. Characteristic equation:
4λ4 − 8λ3 + 5λ2 = λ2 (4λ2 − 8λ + 5) = 0. √
Using the quadratic formula we get roots λ = 81 (8 ± −16) = 1 ± 21 j, we have characteristic
numbers λ = 0, 1 ± 12 j, zero has multiplicity two, the complex roots have multiplicity one.
We consider only one complex root (say, the one with “+”) and get the fundamental system
{e0·x , x e0·x , e1·x sin( 21 · x), e1·x cos( 12 · x)} = {1, x, ex sin( 21 x), ex cos( 12 x)}.
The general solution is y(x) = a + bx + cex sin( 21 x) + dex cos( 12 x), x ∈ IR.
12. Since this is a linear ODE with constant coefficients, we first find the fundamental system
using characteristic numbers:
λ2 + 3λ + 2 = (λ + 1)(λ + 2) = 0 =⇒ λ = −1, −2, multiplicities are one.
The fundamental system is thus {e−t , e−2t } (note that t is the variable!) and the general solution
to the associated homogeneous equation is xh (t) = a e−t + b e−2t .
Since the right-hand side is not special, we will find the solution to the given problem by
first finding some particular solution using variation of parameter. So we pretend that a, b are
functions:
½ ′ x(t) = a(t)e−t + b(t)e−2t . The equations are:
a (t)e + b′ (t)e−2t = 0
−t
(#1)
′ −t ′ −2t 1
. From (#1) we get a′ = −b′ e−t , plugging into (#2)
−a (t)e − 2b (t)e = et +1 (#2)
2t
1

we get −b (t)e −2t
= et +1 , that is, b′ (t) = e−e
t +1 . When we substitute b′ into (#1), we get
t
a′ (t) = ete+1 . Thus (using et + 1 = w, et dt = dw)
2t R −et et dt R 1−w R 1 t t
R
b(t) = e−e t +1 dt = et +1 = w dw = w − 1 dw = ln |w| − w = ln |e + 1| − e − 1,
R et R 1
a(t) = et +1 dt = w dw = ln |w| = ln |et + 1|.
A particular solution is
xp (t) = ln |et + 1|e−t + (ln |et + 1| − et − 1)e−2t = ln |et + 1|e−t + ln |et + 1|e−2t − e−t − e−2t .
The general solution to the given equation is then
x(t) = xp (t) + xh (t) = ln |et + 1|e−t + ln |et + 1|e−2t − e−t − e−2t + a e−t + b e−2t
= ln |et + 1|e−t + ln |et + 1|e−2t + (a − 1)e−t + (b − 1)e−2t
= ln |et +
R 1|e
−t
+ ln |et + 1|e−2t + A e−t +RB e−2t , t ∈ IR.
Alternative: a(t) = a′ (t) dt = ln |et + 1| + a, b(t) = b′ (t) dt = ln |et + 1| − et − 1 + b, hence
x(t) = (ln |et + 1| + a)e−t + (ln |et + 1| − et − 1 + b)e−2t
= ln |et + 1|e−t + ln |et + 1|e−2t + a e−t + b e−2t , t ∈ IR.
EM2 Solved problems—ODE c pHabala 2003
°

13. We have a linear ODE with constant coefficients, so we start with fundamental system.
Characteristic equation is λ2 − 2λ + 1 = (λ − 1)2 = 0. Thus we get the characteristic number
λ = 1 with multiplicity 2. Consequently, the fundamental system is {et , t et } and the general
solution to the associated homogeneous equation is yh (t) = a et + b t et .
Now we need some particular solution to the given equation. Fortunately for us, the right-hand
side is special, because it is of the form P (t)eαt , where in this case P (t) = 2t + 9 is a polynomial
of degree 1 and α = 0, as 2t + 9 = (2t + 9) · 1 = (2t + 9) e0·t . Thus there will be a solution of the
form Q(t)tk eαt , where Q(t) is a polynomial of degree at most equal to the degree of P , which
is one, so Q(t) = At + B for some constants A, B, and k says how many times α appears as a
characteristic number, in this case k = 0.
Thus we are looking for a solution of the form y(t) = (At + B)t0 e0t = At + B. We identify the
constants A, B by substituting y into the given equation and solving. We get:
[At + B]′′ − 2[At + B]′ + (At + B) = 2t + 9 =⇒ 0 − 2A + At + B = 2t + 9
=⇒ At + (B − 2A) = 2t + 9 =⇒ A = 2, B = 13.
The corresponding particular solution is yp (t) = 2t + 13 and the general solution is
y(t) = yp (t) + yh (t) = 2t + 13 + a et + b t et , t ∈ IR.

14. We have a linear ODE with constant coefficients, so we start with its fundamental system.
Characteristic equation is λ2 + λ − 2 = 0, that is, (λ − 1)(λ + 2) = 0. Thus we get characteristic
numbers λ = 1, −2 with multiplicity 1. Consequently, the fundamental system is {et , e−2t } and
the general solution to the associated homogeneous equation is yh (t) = a et + b e−2t .
Now we need some particular solution to the given equation. Unfortunately, the way it is written
we cannot make it into a special right-hand side. Fortunately, we can avoid the long variation
of parameter procedure by using the superposition principle, we split the equation into two.
a) Equation y ′′ + y ′ − 2y = 18t et . The right-hand side is now special, of the form P (t)eαt , where
in this case P (t) = 18t is a polynomial of degree 1 and α = 1. Thus there will be a solution
of the form Q(t)tk eαt , where Q(t) is a polynomial of degree at most equal to the degree of P ,
which is one, so Q(t) = At + B for some constants A, B, and k says how many times α = 1
appears as a characteristic number, in this case k = 1.
Thus we are looking for a solution of the form y(t) = (At + B)t1 e1·t = (At2 + Bt)et . We identify
the constants A, B by substituting y into the given equation and solving. We get:
[(At2 + Bt)et ]′′ + [(At2 + B)tet ]′ − 2((At2 + Bt)et ) = 18t et
¾
t t 6A = 18
=⇒ (6At + 2A + 3B)e = (18t + 0) e =⇒ =⇒ A = 3, B = −2.
2A + 3B = 0
The particular solution is ya (t) = (3t2 − 2t)et .

b) Equation y ′′ + y ′ − 2y = −4e−t . The right-hand side is special again, of the form P (t)eαt ,
where in this case P (t) = −4 is a polynomial of degree 0 and α = −1. Thus there will be a
solution of the form Q(t)tk eαt , where Q(t) is a polynomial of degree at most equal to the degree
of P , which is zero, so Q(t) = A for some constant A, and k says how many times α = −1
appears as a characteristic number, in this case k = 0.
Thus we are looking for a solution of the form y(t) = At0 e−1·t = Ae−t . We identify the constant
A by substituting y into the given equation and solving. We get:
[Ae−t ]′′ + [Ae−t ]′ − 2(Ae−t ) = −4e−t =⇒ −2Ae−t = −4e−t =⇒ A = 2.
The particular solution is yb (t) = 2e−t .

Since the given equation’s right-hand side is a sum of right-hand sides of the two cases we just
handled, we obtain a particular solution to the given equation by adding the two solutions:
yp (t) = ya (t) + yb (t) = (3t2 − 2t)et + 2e−t .
Finally, the general solution is
EM2 Solved problems—ODE c pHabala 2003
°

y(t) = yp (t) + yh (t) = (3t2 − 2t)et + 2e−t + a et + b e−2t


= (3t2 − 2t + a)et + 2e−t + b e−2t , t ∈ IR.
Note: We can do the adding ya + yb earlier, when they ) are still in their general forms:
′′ ′ t 2 t t
y + y − 2y = 18t e =⇒ ya (t) = (At + B )e
=⇒ yp (t) = (At2 + B t )et + Ce−t
y ′′ + y ′ − 2y = −4e−t =⇒ yb (t) = Ce−t
Then we substitute yp into the given equation, find A, B, C and consqeuently y = yh + yp as
before.

15. The right-hand side is not special, so we are left with variation of parameter. The equation
is linear, so the method can be used, and it has constant coefficients, so we use characteristic
numbers to find the homogeneous solution:
y ′′ + 2y ′ + y = 0 =⇒ λ2 + 2λ + 1 = 0 =⇒ (λ + 1)2 = 0.
There is one characteristic number λ = −1 with multiplicity 2, thus the fundamental system is
{e−x , x e−x } and yh (x) = a e−x + b x e−x , x ∈ IR.
Now we will assume that y(x) = a(x)e−x + b(x)x e−x is a solution. We get equations
a′ (x)e−x + b′ (x)x e−x = 0 a′ (x) + b′ (x)x = 0
=⇒
−a′ (x) + b′ (x) − b′ (x)x = x21+1
−x
−a′ (x)e−x + b′ (x)e−x − b′ (x)x e−x = xe2 +1
Adding the equations we get b′ (x) = x21+1 and thus a′ (x) = −b′ (x)x = − x2x+1 , hence
b(x) = x2dx
R R x dx 1 2
+1 = arctan(x), a(x) = − x2 +1 = − 2 ln(x + 1).
We get a particular solution
yp (x) = − 12 ln(x2 + 1)e−x + arctan(x)x e−x
and the general solution
y(x) = yp (x) + yh (x) = − 12 ln(x2 + 1)e−x + arctan(x)x e−x + a e−x + b x e−x , x ∈ IR.
Note: We can also get the general solution by substituting a(x) = − 12 ln(x2 + 1 + a) and
b(x) = arctan(x) + b into y.

16. This is an initial value problem, first we have to find a general solution of the equation. It is
a linear ODE with constant coefficients, so we start with its fundamental system. Characteristic
equation is λ2 +4 = 0, so the characteristic numbers are ±2j with multiplicity one. Consequently
(we will consider λ = 0 + 2j), the fundamental system is {e0·x sin(2 · x), e0·x cos(2 · x)} =
{sin(2x), cos(2x)} and the general solution to the associated homogeneous equation is yh (x) =
a sin(2x) + b cos(2x).
Now we need some particular solution to the given equation. Fortunately for us, the right-hand
side is special, because it is of the form P (x)eαx sin(βx) + Q(x)eαx cos(βx). Namely, we have
2 cos(2x) = 0 · e0·x sin(2x) + 2e0·x cos(2x), so P (x) = 0, Q(x) = 2 (polynomials of degree zero),
α = 0, and β = 2.
Thus a solution can be found of the form y(x) = xk R(x)e0·x sin(2x) + xk S(x)e0·x cos(2x), where
R, S are polynomials of degree at most equal to the maximal degree of P and Q, which is zero,
and k says how many times α + βj = 0 + 2j = 2j appears as a characteristic number, which
is once. Since the degrees of R, S are zero, we can write R(x) = A, S(x) = B and obtain
y(x) = x1 A e0 sin(2x) + x1 Be0 cos(2x) = Ax sin(2x) + Bx cos(2x).
Now we find the appropriate constants A, B by substituting y into the given equation:
[Ax sin(2x) + Bx cos(2x)]′′ + 4(Ax sin(2x) + Bx cos(2x)) = 8 cos(2x)
=⇒ −4B sin(2x) + 4A cos(2x) = 0 sin(2x) + 8 cos(2x) =⇒ B = 0, A = 2.
Thus we get a particular solution yp (x) = 2x sin(2x) and the general solution
y(x) = yp (x) + yh (x) = 2x sin(2x) + a sin(2x) + b cos(2x), x ∈ IR.
Now we need to find a, b to satisfy the given initial conditions. We have y(0) = b and y ′ (0) =
[2 sin(2x) + 4x cos(2x) + 2a cos(2x) − 2b sin(2x)](0) = 2a, so from the initial conditions we get
the equations
EM2 Solved problems—ODE c pHabala 2003
°
¾
b=0
=⇒ b = 0, a = 3.
2a = 6
The solution of the given problem is therefore
y(x) = 2x sin(2x) + 3 sin(2x) = (2x + 3) sin(2x), x ∈ IR.
17. This equation does not have the special right-hand side, so it remains to try the variation
of parameter trick.
First the fundamental system: λ2 −1 = 0 =⇒ λ = ±1, thus we get {et , e−t }. The homogeneous
solution is yh (t) = aet + be−t , t ∈ IR.
Now we will consider y(t) = a(t)et + b(t)e−t and solve the equations
a′ et + b′ e−t = 0
2et
a′ et − b′ e−t = et +1
t 2
Adding and subtracting the two equations we get a′ (t) = et1+1 and b′ (t) = (e )
et +1 . Thus we have
R dy R 1 t
1
dy = ln(y) − ln(y + 1) = ln ete+1 = ln(et ) − ln(et + 1) = t − ln(et + 1)
¡ ¢
a(t) = (y+1)y = y − y+1
R y 1
dy = y − ln(y + 1) = et − ln(et + 1)
R
b(t) = y+1 dy = 1 − y+1
Thus we get the particular and then the general solution
yp (t) = [t − ln(et + 1)]et + [et − ln(et + 1)]e−t = tet + 1 − ln(et + 1)et − ln(et + 1)e−t
y(t) = yp (t) + yh (t) = tet + 1 − ln(et + 1)et − ln(et + 1)e−t + aet + be−t , t ∈ IR.
Now we need to find the solution satisfying the given initial conditions. We calculate
t −t
y ′ (t) = et + tet − ete+1 − ln(et + 1)et − eet +1 + ln(et + 1)e−t + aet − be−t .
We substitute in t = 0 and compare ¾ with the given initial conditions:
¾
y(0) = a + b − 2 ln(2) a + b − 2 ln(2) = 2 − 2 ln(2)
=⇒ =⇒ a = 0, b = 1.
y ′ (0) = a − b a − b = −1
The solution we want is tet + 1 − ln(et + 1)et − ln(et + 1)e−t + e−t , t ∈ IR.
18. First we solve the homogeneous system using characteristic numbers:
λ2 + 1 = 0 =⇒ λ = ±j =⇒ yh (t) = a sin(t) + b cos(t), t ∈ IR.
Now we need a particular solution.
a) Special right-hand side: We fit the right-hand side to P (t)eαt sin(βt) + Q(t)eαt cos(βt) by
choosing α = 2, β = 1, P (t) = 8, Q(t) = 0. The solution will be of the form
y(t) = tk R(t)eαt sin(βt) + tk S(t)eαt cos(βt).
The polynomials P and Q have degrees 0, so we have R(t) = A, S(t) = B for some constants
A, B. The number α + βj = 2 + j is not among characteristic numbers, so we have k = 0 and
write
y(t) = A e2t sin(t) + B e2t cos(t).
The first and second derivative:
y ′ (t) = 2A e2t sin(t) + A e2t cos(t) + 2B e2t cos(t) − B e2t sin(t)
= (2A − B)e2t sin(t) + (A + 2B)e2t cos(t)
y ′′ (t) = 2(2A − B)e2t sin(t) + (2A − B)e2t cos(t) + 2(A + 2B)e2t cos(t) − (A + 2B)e2t sin(t)
= (3A − 4B)e2t sin(t) + (4A + 3B)e2t cos(t).
We substitute into the given equation and obtain
(4A − 4B)e2t sin(t) + (4A + 4B)e2t cos(t) = 8e2t sin(t).
Thus 4A−4B = 8 and 4A+4B = 0, which means that A = 1, B = −1. Thus we get a particular
solution yp (t) = e2t sin(t) − e2t cos(t) and hence the general solution:
y(t) = yp (t) + yh (t) = e2t sin(t) − e2t cos(t) + a sin(t) + b cos(t), t ∈ IR.
b) Variation of parameter: We have yh (t) = a sin(t) + b cos(t), we will assume that y(t) =
a(t) sin(t) + b(t) cos(t) and get equations
a′ (t) sin(t) + b′ (t) cos(t) = 0,
a′ (t) cos(t) − b′ (t) sin(t) = 8e2t sin(t).
EM2 Solved problems—ODE c pHabala 2003
°

There are two reasonable ways to solve for a(t) and b(t). First, one can multiply the first equation
by sine and the second by cosine and add, thus obtaining a′ (t) = 8e2t sin(t) cos(t) = 4e2t sin(2t),
therefore b′ (t) = −8e2t sin2 (t) = 4e2t (cos(2t)
¯ − 1). ¯ ¯ ¯
¯ sin(t) cos(t) ¯ ¯ 0 cos(t) ¯¯
An alternative is the Cramer rule: D = ¯ ¯ ¯ = −1, Da′ = ¯ 2t
¯ =
¯ cos(t)¯ − sin(t) ¯ 8e sin(t) − sin(t) ¯
¯ sin(t) 0 ¯ = −8e2t sin2 (t), then a′ = Da′ and b′ = Db′ .
¯
−8e2t sin(t) cos(t), Db′ = ¯¯ 2t D D
cos(t) 8e sin(t) ¯
Thus
a(t) = 4e2t sin(2t) dt = 2 ew sin(w) dw
R R

b(t) = 4e2t (cos(2t) − 1) dt = 2 ew cos(w) dw − 2 ew dw


R R R
TheseR two integrals are quite ugly,Rtwo integrations by parts and then solving R an equation.
ew sin(w) dw = ew sin(w) − ew cos(w) dw = ew sin(w) − ew cos(w) − ew sin(w) dw
=⇒ ew sin(w) dw = 12 ew [sin(w) − cos(w)] + C
R

e cos(w) dw = ew cos(w) + ew sin(w) dw = ew cos(w) + ew sin(w) − ew cos(w) dw


R w R R

=⇒ ew cos(w) dw = 21 ew [sin(w) + cos(w)] + C


R
One can also try to find the answers in some thick book with integrals. We get
a(t) = e2t [sin(2t) − cos(2t)], b(t) = e2t [sin(2t) + cos(2t)] − 2e2t
and thus yp (t) = e [2 sin(t) cos(t) − cos (t) + sin2 (t)] sin(t)
2t 2

+e2t [2 sin(t) cos(t) + cos2 (t) − sin2 (t)] cos(t) − 2e2t cos(t) = e2t sin(t) − e2t cos(t)
as before.
For solution using the Laplace transform see Solved problems—Laplace transform.

You might also like