You are on page 1of 8

POWER SERIES SOLUTIONS TO DIFFERENTIAL EQUATIONS

MATH 253, SPRING 2012


JONNY COMES
1.0. One of the applications of power series we have seen is their use in integration.
Indeed, we are now able to evaluate integrals such as
_
sin x
x
dx or
_
e
x
2
dx,
where previous methods of integration (from math 252) would fail. Of course, our
solutions to those integration problems are power series rather than elementary
functions (such as polynomials, trig. functions, logs, etc.), but we have methods for
determining when these power series converge (like the ratio test). Moreover, when
these series converge, we can approximate what they converge to by taking partial
sums, and we even have methods for estimating the errors in these approximations.
As a consequence, nding a power series solution to a given problem (like evaluating
an integral) is a very useful thing to do. In these notes we will see how to solve
examples of what are known as dierential equations, and just as it was in the case
of evaluating integrals, the solutions we look for are power series.
Throughout these notes we let x denote a indeterminate, and (unless otherwise
noted) all derivatives will be with respect to x. For instance, as is common, we will
write y

=
dy
dx
, y

=
d
2
y
dx
2
, and so on.
1.1. Introduction to Dierential Equations. A dierential equation is an
equation involving both variables and their derivatives. Here are a few examples:
y

= x
2
5, y

= 5y, y

= xy, y

+ xy

2x
2
y = 7.
A solution of a dierential equation is a function f(x) such that setting y = f(x)
in the dierential equation results in a true statement for all x-values under con-
sideration
1
. Here are some examples:
Example 1.1. Verify that 2x + e
3x
is a solution of the dierential equation
y

+ 6x = 2 + 3y.
Solution. Setting y = 2x + e
3x
we have y

= 2 + 3e
3x
so that for any x we have
y

+ 6x = 2 + 3e
3x
+ 6x = 2 + 3(e
3x
+ 2x) = 2 + 3y.
Example 1.2. Verify that sin(5x) is a solution of the dierential equation
y

+ 25y = 0.
Solution. Setting y = sin(5x) we have y

= 5 cos(5x) and y

= 25 sin(5x).
Hence, for any x
y

+ 25y = 25 sin(5x) + 25 sin(5x) = 0.


1
Unless we state otherwise, we are considering all real x-values.
1
2 JONNY COMES
Example 1.3. Find all solutions of the dierential equation
y

= 2x + 4.
Solution. Here we are looking for the most general antiderivative of 2x + 4,
which we know is y = x
2
+ 4x + C where C is an arbitrary constant.
This last example is a familiar one, but gives evidence of a phenomenon that
common in the game of dierential equations: in most all the dierential equations
we will consider, there is not a unique solution. In fact, the most general solution
of a given dierential equation will commonly depend on one or more arbitrary
constant. However, if we specify some additional requirement(s) on our solution
we will often arrive at a unique solution. These additional requirements are
commonly initial values, which we will discus in a moment. However, we rst
give an example to stress that the old trick of just add C when youre done which
works when nding antiderivatives can fail miserably when dealing with arbitrary
dierential equations:
Example 1.4. Consider the dierential equation y

= y. One particular solution to


this dierential equation is y = e
x
since y

= e
x
= y. However, adding a constant to
this particular solution will not result in another solution. For instance, if y = e
x
+6,
then y

= e
x
= e
x
+ 6 = y. On the other hand, in this example multiplying our
particular solution by any constant C will result in another solution:
y = Ce
x
y

= Ce
x
= y
It turns out that y = Ce
x
is the most general solution of the dierential equation
y

= y. For those of you who are curious about why there cant be any other
solutions, try to show that y

= y implies y = Ce
x
, or take math 256.
1.2. Initial Value Problems. Given a function y = f(x) we will write y
0
= f(0)
and call y
0
the initial value of y = f(x). An initial value problem consists of a
given dierential equation and a specied initial value. A solution of an initial
value problem is any solution to the given dierential equation which has the given
initial value.
Example 1.5. Consider the initial value problem
y
2
+ (y

)
2
= 1, y
0
= 1.
Show that y = cos(x) is a solution. Is y = sin(x) a solution?
Solution. If y = cos(x), then y

= sin(x) so that
y
2
+ (y

)
2
= cos
2
(x) + (sin(x))
2
= cos
2
(x) + sin
2
(x) = 1.
Also, y
0
= cos(0) = 1, so y = cos(x) is indeed a solution to the initial value problem.
On the other hand, if y = sin(x), then y
0
= sin(0) = 0 = 1. Hence y = sin(x)
is not a solution to the initial value problem (even though it is a solution to the
dierential equation).
Example 1.6. Consider the initial value problem
y

= 1 y, y
0
= 5.
Determine which of the following are solutions:
(1) y = 1 + e
x
, (2) y = 4 + e
x
, (3) y = 1 + 4e
x
.
NOTES ON DIFF. EQS. FOR MATH 253 3
Solution.
(1) If y = 1 + e
x
, then y
0
= 1 + e
0
= 1 = 5. Hence y = 1 + e
x
is not a
solution of the initial value problem.
(2) If y = 4 +e
x
, then y

= e
x
= 3 e
x
= 1 (4 +e
x
) = 1 y. Hence
y = 4 + e
x
is not a solution of the initial value problem either.
(3) If y = 1 + 4e
x
, then y

= 4e
x
= 1 (1 + 4e
x
) = 1 y. Also,
y
0
= 1 + 4e
0
= 5. Thus y = 1 + 4e
x
is a solution of the initial value
problem.
At this point, weve seen several examples of dierential equations and initial
value problems, and given a function y = f(x) we are able to test to see whether or
not that function is a solution. However, we have not seen a good method for nding
such a solution. The bulk of most courses on elementary dierential equations (like
math 256) is spent on developing methods of solving dierential equations. We will
focus on one particular method, which uses power series. You should know that
there is no general method which can be used to solve all dierential equations
2
.
Instead, there are many dierent methods which all have good and bad aspects.
1.3. Power Series Solutions to Dierential Equations. To nd a power series
solution to an initial value problem, we (i) assume the initial value problem has a
solution of the form y =

n=0
c
n
x
n
, (ii) substitute the series into the given dierential
equation, and (iii) use the resulting equation of power series along with the initial
value to solve for the coecients c
n
.
Sometimes we will see a pattern which allows us to solve for all the coecients.
Other times, a pattern may not be evident, but we can always compute as many of
the coecients as we desire (as long as the desired number of terms is nite).
Example 1.7. Find a power series solution to the initial value problem
y

= 5y, y
0
= 7.
Solution. Set y =

n=0
c
n
x
n
, so that y

n=1
nc
n
x
n1
and 5y =

n=0
5c
n
x
n
. Then
the given dierential equation becomes

n=1
nc
n
x
n1
=

n=0
5c
n
x
n
or expanded out
c
1
+ 2c
2
x + 3c
3
x
2
+ 4c
4
x
3
+ = 5c
0
+ 5c
1
x + 5c
2
x
2
+ 5c
3
x
3
+
Since two power series are equal exactly when all their coecients are equal, we
get an innite number of equations:
c
1
= 5c
0
, 2c
2
= 5c
1
, 3c
3
= 5c
2
, 4c
4
= 5c
3
, . . .
which can alternatively be written as the recursive formula
nc
n
= 5c
n1
for all n > 0.
In any case, we can use the initial condition to nd c
0
, since
y =

n=0
c
n
x
n
= c
0
+ c
1
x + c
2
x
2
+ y
0
= c
0
.
2
Indeed, nding an antiderivative is a special case of solving a dierential equation. Hence, a
general method for solving dierential equations could be used to compute the antiderivative of
any function. If such a method existed, certainly someone would have taught it to you whenever
you learned about integrals.
4 JONNY COMES
From there, we can use the equations relating the coecients to nd all the other
c
n
s:
c
0
= 7
c
1
= 5c
0
= 5(7)
2c
2
= 5c
1
= 5(5 7) = 5
2
(7) c
2
=
7 5
2
2
3c
3
= 5c
2
= 5
7 5
2
2
=
7 5
3
2
c
3
=
7 5
3
3!
4c
4
= 5c
3
= 5
7 5
3
3!
=
7 5
4
3!
c
4
=
7 5
4
4!
.
.
.
Hence the coecients are given by
c
n
=
7 5
n
n!
for all n 0.
Thus, the power series solution to the initial value problem is
y =

n=0
7 5
n
n!
x
n
.
Notice that

n=0
7 5
n
n!
x
n
= 7

n=0
(5x)
n
n!
= 7e
5x
. Hence a (non-power series) solution
to the initial value problem is y = 7e
5x
. Lets check our answer:
y = 7e
5x
y

= 7 5e
5x
= 5(7e
5x
) = 5y and y
0
= 7e
0
= 7.
Example 1.8. Find a power series solution to the initial value problem
y

= 2y x, y
0
= 1.
Solution. Set y =

n=0
c
n
x
n
, so y

n=1
nc
n
x
n1
and 2y x =
_

n=0
2c
n
x
n
_
x.
Then expanding the given dierential equation we get
c
1
+ 2c
2
x + 3c
3
x
2
+ 4c
4
x
3
+ = 2c
0
+ (2c
1
1)x + 2c
2
x
2
+ 2c
3
x
3
+
Hence y =

n=0
c
n
x
n
is a solution to the dierential equation exactly when the
following equations are all satised
c
1
= 2c
0
, 2c
2
= 2c
1
1, 3c
3
= 2c
2
, 4c
4
= 2c
3
, 5c
5
= 2c
4
, . . .
NOTES ON DIFF. EQS. FOR MATH 253 5
Using the initial condition we get 1 = y
0
= c
0
so that
c
1
= 2c
0
= 2
2c
2
= 2c
1
1 = 3 c
2
=
3
2
3c
3
= 2c
2
= 2
3
2
=
3 2
2
c
3
=
3 2
3!
4c
4
= 2c
3
= 2
3 2
3!
=
3 2
2
3!
c
4
=
3 2
2
4!
5c
5
= 2c
4
= 2
3 2
2
4!
=
3 2
3
4!
c
5
=
3 2
3
5!
.
.
.
Hence the coecients are given by
c
n
=
3 2
n2
n!
for all n 2.
Thus y = 1 + 2x +

n=2
32
n2
n!
x
n
is the power series solution to the initial value
problem. We can realize this as a solution without a series as follows:
y = 1 + 2x +

n=2
3 2
n2
n!
x
n
= 1 + 2x + 3

n=2
2
n
x
n
2
2
n!
= 1 + 2x +
3
4

n=2
(2x)
n
n!
= 1 + 2x +
3
4
_
1 2x +

n=0
(2x)
n
n!
_
= 1 + 2x +
3
4
_
1 2x + e
2x
_
=
1
4
+
x
2
+
3e
2x
4
.
Lets check that y =
1
4
+
x
2
+
3e
2x
4
is indeed a solution:
y =
1
4
+
x
2
+
3e
2x
4
y

=
1
2
+
3e
2x
2
= 2
_
1
4
+
x
2
+
3e
2x
4
_
x = 2y x
and y
0
=
1
4
+ 0 +
3
4
= 1.
6 JONNY COMES
Example 1.9. Find a power series solution to the initial value problem
y

= xy, y
0
= 5.
Solution. Set y =

n=0
c
n
x
n
, so y

n=1
nc
n
x
n1
and xy =

n=0
c
n
x
n+1
. Then
expanding the given dierential equation we get
c
1
+ 2c
2
x + 3c
3
x
2
+ 4c
4
x
3
+ 5c
5
x
4
+ = c
0
x + c
1
x
2
+ c
2
x
3
+ c
3
x
4
+
Hence y =

n=0
c
n
x
n
is a solution to the dierential equation exactly when the
following equations are all satised
c
1
= 0, 2c
2
= c
0
, 3c
3
= c
1
, 4c
4
= c
2
, 5c
5
= c
3
, 6c
6
= c
4
, . . .
Using the initial condition we get 5 = y
0
= c
0
so that
c
1
= 0
2c
2
= c
0
= 5 c
2
=
5
2
3c
3
= c
1
= 0 c
3
= 0
4c
4
= c
2
=
5
2
c
4
=
5
2 4
=
5
2
2
(1 2)
=
5
2
2
2!
5c
5
= c
3
= 0 c
5
= 0
6c
6
= c
4
=
5
2 4
c
4
=
5
2 4 6
=
5
2
3
(1 2 3)
=
5
2
3
3!
.
.
.
Hence the power series solution is
y = 5 +
5
2
x
2
+
5
2
2
2!
x
4
+
5
2
3
3!
x
6
+ =

n=0
5x
2n
2
n
n!
.
We can realize this as a solution without a series as follows:
y =

n=0
5x
2n
2
n
n!
= 5

n=0
_
x
2
2
_
n
n!
= 5e
x
2
2
.
Lets check that y = 5e
x
2
2
is indeed a solution:
y = 5e
x
2
2
y

= 5xe
x
2
2
= xy
and y
0
= 5e
0
= 5.
Example 1.10. Find all power series solutions for the dierential equation
xy

= y.
Solution. If we set y =

n=0
c
n
x
n
, then y

n=1
nc
n
x
n1
so that xy

n=1
nc
n
x
n
.
If we expand the dierential equation xy

= y we get
c
1
x + 2c
2
x
2
+ 3c
3
x
3
+ 4c
4
x
4
+ = c
0
+ c
1
x + c
2
x
2
+ c
3
x
3
+ c
4
x
4
+
NOTES ON DIFF. EQS. FOR MATH 253 7
Thus y is a power series solution of the dierential equation exactly when c
n
= nc
n
for all n 0. Since
c
n
= nc
n
nc
n
c
n
= 0 (n 1)c
n
= 0 n = 1 or c
n
= 0.
Hence, c
n
= 0 whenever n = 0. Since there is no restriction on c
1
, we can set
m = c
1
, and it follows that
y = mx
is a solution to the given dierential equation where m is an arbitrary constant.
Example 1.11. Find the rst few nonzero terms of the power series solution for
the initial value problem
y

= 1 + y
2
, y
0
= 1.
Solution. Set y =

n=0
c
n
x
n
so that y

n=1
nc
n
x
n1
. Hence, the dierential
equation becomes
c
1
+ 2c
2
x + 3c
3
x
2
+ 4c
4
x
3
+ = 1 + [c
0
+ c
1
x + c
2
x
2
+ c
3
x
3
+ c
4
x
4
+ ]
2
.
After expanding the y
2
term we get
() c
1
+2c
2
x+3c
3
x
2
+4c
4
x
3
+ = (1+c
2
0
)+(2c
0
c
1
)x+(2c
0
c
2
+c
2
1
)x
2
+(2c
0
c
3
+2c
1
c
2
)x
3
+
Now, the initial condition tells us c
0
= 1. Hence, comparing the coecients in
() we get
c
1
= 1 + c
2
0
= 1 + (1)
2
= 2
2c
2
= 2c
0
c
1
= 2(1)(2) c
2
= 2
3c
3
= 2c
0
c
2
+ c
2
1
= 2(1)(2) + 2
2
c
3
=
8
3
4c
4
= 2c
0
c
3
+ 2c
1
c
2
= 2(2)(8/3) + 2(2)(2) c
4
=
14
3
.
.
.
Hence the power series solution looks like
y = 1 + 2x 2x
2
+
8
3
x
3

14
3
x
4
+
8 JONNY COMES
Exercises
(1) Show that y = xe
2x
is a solution to the dierential equation xy

= 2xy +y.
(2) Show that for x > 0, y =
1
x
is a solution to the dierential equation
y + xy

= 0.
(3) Show that y = 2x+Ce
3x
is a solution to the dierential equation in Example
1.1 where C denotes an arbitrary constant.
(4) Consider the dierential equation
y

+ 16y = 0.
Verify that y = Acos(4x) + B sin(4x) is a solution where A and B denote
arbitrary constants.
(5) Is y = e
2x
+ 9 a solution to the dierential equation y

= 2y ?
(6) Consider the initial value problem
y

= 2y, y
0
= 8.
Determine which of the following are solutions:
(a) y = e
2x
, (b) y = e
2x
+ 7, (c) y = 8e
2x
.
(7) Consider the initial value problem
y

= y, y
0
= 9
(a) Find a power series solution.
(b) Use known Maclaurin series to nd an expression of your answer for
part (a) which does not involve a series.
(c) Check that your answer for (b) is a solution to the initial value problem.
(8) Repeat exercise (7) for the initial value problem
y

= 7y + 1, y
0
= 1
(9) Repeat exercise (7) for the initial value problem
y

= y x, y
0
= 5
(10) Repeat exercise (7) for the initial value problem
y

= x
2
y, y
0
= 7.
(11) Consider the dierential equation x
2
y

= y.
(a) Determine y
0
.
(b) Show that the only power series solution is the zero function y = 0.
(12) Find the rst 4 nonzero terms of the power series solution for the initial
value problem
y

= 1 + y + y
2
, y
0
= 1.

You might also like