Professional Documents
Culture Documents
EXAMPLES
AIDAN SIMS
⇐⇒ −y = ln(−x3 − C)
⇐⇒ y = − ln(−x3 − C).
Example 1.1
dy
Example 1.2. Solve dx
= 2xy + 12y.
dy
Answer: Separable: dx = 2y(x + 6), and so
Z Z
1
dy = x + 6 dx provided y 6= 0
2y
1 1
⇐⇒ ln |2y| = x2 + 6x + C provided y 6= 0
2 2
x2 +12x+2C
⇐⇒ |2y| = e provided y 6= 0
2 +12x
⇐⇒ 2y = Aex
where A = ±e2C is an arbitrary nonzero constant. Example 1.2
dy xy+3x
Example 1.3. Solve dx
= x2 +1
, y(3) = 1.
Answer: Separable:
xy + 3x x(y + 3) x
2
= 2 = 2 (y + 3).
Rx + 1 x +1 x +1
Consequently y+3 dy = x2x+1 dx provided y 6= −3. The left-hand integral is ln |y + 3|.
R 1
Consequently,
1 1 2
ln |y + 3| = ln(x2 + 1) + C ⇐⇒ |y + 3| = e 2 ln(x +1)+C
2 √
⇐⇒ y + 3 = A x2 + 1
√
⇐⇒ y = A x2 + 1 − 3
C
p±e is an arbitrary
where A = √ nonzero constant. Now use the initial value y(3)
4 4
√ = 1. So
1+3 = A (3 + 1) = 10A, and so A = 10 , and the solution is y(x) = 10 x2 + 1−3.
2 √ √
Example 1.3
dy
Example 1.5. Solve x dx − 3y = x4 .
dy −3
Answer: Integrating factor: provided x 6= 0 we have dx
+ x
y = x3 . Hence
R −3 1
I(x) = e x = e−3 ln(x) = (eln(x) )−3 = .
x3
Hence, for x 6= 0,
dy −3
I(x) + I(x)y = I(x)x3 ⇐⇒ (I(x)y)0 = I(x)x3
dx x Z
⇐⇒ I(x)y = I(x)x3 dx
Z
y
⇐⇒ 3 = 1 dx
x
y
⇐⇒ 3 = x + C
x
⇐⇒ y = x4 + Cx3 .
Example 1.5
MATH2310 SEMESTER 1, 2006 (ODE’S STRAND): WORKED EXAMPLES 3
dy ex x
Example 1.6. Solve dx
+ ex +1
y = ex +1
where y(0) = 1.
R ex
Answer: Integrating factor: I(x) = e ex +1 dx . Put u := ex + 1 so that du = ex dx. The
variable substitution gives
ex
Z Z
du
x
dx = = ln |u| = ln |ex + 1| = ln(ex + 1).
e +1 u
x +1)
Hence I(x) = eln(e = ex + 1. We have
dy ex x 0 x
I(x) + x I(x)y = I(x) x ⇐⇒ I(x)y = I(x) x
dx e + 1 e +1 Z e +1
x
⇐⇒ I(x)y = I(x) x dx
e +1
Z
x
⇐⇒ (ex + 1)y = (ex + 1) x dx
e +1
Z
⇐⇒ (ex + 1)y = x dx
1 2
2
x +C
⇐⇒ y = .
ex + 1
1 2
0 +C C
Now use the initial value: y(0) = 1 gives 1 = 2e0 +1 = 2
and hence C = 2. Hence the
solution is
1 2
x +2
y(x) = 2 x .
e +1
Example 1.6
Example 2.2. What is the largest interval on which the E/U theorem guarantees a unique
solution to xy 0 + sin(x)y = sin(x), y(0) = 1.
Example 2.3. Does the E/U theorem apply to the initial value problem y 0 −3y 2 = sin(xy),
y(0) = 1?
1
Example 2.4. Does the E/U theorem apply to the initial value problem y 0 − 3y 2 =
sin(xy), y(0) = 0?
1
Answer: Rearranging gives y 0 = f (x, y) where f (x, y) = sin(xy) + 3y 2 . So E/U applies
1
where f and ∂f
∂y
are continuous. f is continuous everywhere. ∂f ∂y
= x cos(xy) + 32 y − 2 is
also continuous for y 6= 0. So E/U applies for y 6= 0. But y = 0 at the initial value
point, so E/U does not apply to the IVP. Example 2.4
3. Euler’s Method
Example 3.1. Use Euler’s method with two steps to calculate y(3) if y(1) = 0 and
dy
dx
= 2x2 (y − 1).
Answer: Since the total x change is 3 − 1 = 2, with two steps, the step size h = 1. So
Example 3.2. Use Euler’s method with two steps to calculate y(7) if y(3) = 1 and
dy √
dx
= 12 (x − 3) y.
Answer: Since the total x change is 7 − 3 = 4, with two steps, the step size h = 2. So
1 √
y1 = y0 + hy 0 (x0 , y0 ) = 1 + 2( (3 − 3) 1) = 1 + 0 = 1.
2
Thus (x1 , y1 ) = (5, 1) and
1 √
y2 = y1 + hy 0 (x1 , y1 ) = 1 + 2( (5 − 3) 1) = 1 + 2 = 3.
2
So y(7) ' 3. Example 3.2
MATH2310 SEMESTER 1, 2006 (ODE’S STRAND): WORKED EXAMPLES 5
Example 3.3. Use Euler’s method with two steps to calculate y(−2) if y(0) = 0 and
dy
dx
= x + y + 1.
Answer: Since the total x change is −2 − 0 = −2, with two steps, the step size h = −1.
So
y1 = y0 + hy 0 (x0 , y0 ) = 0 + −1(0 + 0 + 1) = 0 + −1 = −1.
Thus (x1 , y1 ) = (−1, −1) and
y2 = y1 + hy 0 (x1 , y1 ) = −1 + −1(−1 + −1 + 1) = −1 + 1 = 0.
So y(−2) ' 0. Example 3.3
Example 3.4. Use Euler’s method with two steps to calculate y(2) if y(4) = 7 and
dy 2x2
dx
= y+1 + 1.
Answer: Since the total x change is 2 − 4 = −2, with two steps, the step size h = −1.
So
2 42
y1 = y0 + hy 0 (x0 , y0 ) = 7 + −1( + 1) = 7 + −5 = 2.
7+1
Thus (x1 , y1 ) = (3, 2) and
232
y2 = y1 + hy 0 (x1 , y1 ) = 2 + −1( + 1) = 2 + −7 = −5.
2+1
So y(2) ' −5. Example 3.4
Answer:
3 5 2
L−1 { 2
+ + 2 }(t)
s s + 1 s + 2s + 5
3 5 2
= L−1 { 2 }(t) + L−1 { }(t) + L−1 { 2 }(t)
s s+1 s + 2s + 5
1 1 2
= 3L−1 { 2 }(t) + 5L1 { }(t) + L−1 { }(t)
s s+1 (s + 1)2 + 22
= 3t + 5e−t + e−t sin(2t).
Example 4.3
Answer:
1 3s + 8
L−1 { 3
+ 2 }(t)
(s − 1) s +4
1 3s + 8
= L−1 { 3
}(t) + L−1 { 2 }(t)
(s − 1) s +4
1 2 s 2
= L−1 { 3
}(t) + 3L−1 { 2 2
}(t) + 4L−1 { 2 }(t)
2 (s − 1) s +2 s + 22
1
= et t2 + 3 cos 2t + 4 sin(2t).
2
Example 4.4
Example 4.6. If y 00 + −3y 0 + 3y = et sin(3t) and y(0) = −2, y 0 (0) = 2, compute L{y}(s).
Answer: Compute the Laplace transforms of both sides.
L{y 00 − 3y 0 + 3y}(s) = L{y 00 }(s) − 3L{y 0 }(s) + 3L{y}(s)
= (s2 L{y}(s) − sy(0) − y 0 (0)) − 3(sL{y}(s) − y(0)) + 3L{y}(s)
= (s2 L{y}(s) − (−2)s − 2) − 3(sL{y}(s) − (−2)) + 3L{y}(s)
= (s2 − 3s + 3)L{y}(s) + 2s − 8
while on the other hand
3 3
L{et sin(3t) }(s) = 2 2
= 2 .
(s − 1) + 3 s − 2s + 10
Equating these two quantities we can then calculate:
3
(s2 − 3s + 3)L{y}(s) + 2s − 8 = 2
s − 2s + 10
3
⇐⇒ (s2 − 3s + 3)L{y}(s) = 2 − 2s + 8
s − 2s + 10
3 − 2s(s2 − 2s + 10) + 8(s2 − 2s + 10)
⇐⇒ (s2 − 3s + 3)L{y}(s) =
s−2
3 2
−2s + 12s − 36s + 83
⇐⇒ L{y}(s) = 2 .
(s − 3s + 3)(s2 − 2s + 10)
Example 4.6
where we have used the multiple angle formula sin(a + b) = sin(a) cos(b) + cos(a) sin(b)
to expand sin(4t + 4). Now using the linearity of the Laplace transform, we have
L{u1 (t)e3t sin(4t) − u3 (t)}(s)
= e−1s e3 cos(4)L{e3t sin(4t)}(s) + e3 sin(4)L{e3t cos(4t)}(s) − e−3s L{1}(s).
4 3t
Now use the Laplace transform table: L{sin(4t)}(s) = s2 +4 2 , so L{e sin(4t)}(s) =
4 s 3t s−3
(s−3)2 +16
. Likewise, L{cos(4t)}(s) = s2 +42 , and so L{e cos 4t}(s) = (s−3)2 +16 . That is,
Answer:
s+3 s+1 2
L−1 e−7t −1
−7t
(t) = L e +
s2 + 2s + 2 (s + 1)2 + 12 (s + 1)2 + 12
= L−1 {e−7t L{e−t cos(t)}(s) + 2L{e−t sin(t)}(s)}(t)
= u7 (t){e−t cos(t) + 2e−t sin(t)}(t − 7)
= u7 (t) e−(t−7) cos(t − 7) + 2e−(t−7) sin(t − 7)
Example 5.6
6.1. Wronskians.
Example 6.1. Decide if the following are linearly independent: {x2 , sin(2x), 2x − 1}.
Putting x = 0 into the Wronskian gives 4 sin(0) + 4 cos(0) = 4 6= 0, so yes they are
linearly independent. Example 6.1
2
Example 6.2.
Determine whether the following are linearly independent: 6x + 12, (x +
2
1) , 2x − 1 .
MATH2310 SEMESTER 1, 2006 (ODE’S STRAND): WORKED EXAMPLES 11
So the Wronskian is equal to the zero function, which means no they are not linearly
independent. Example 6.2
Example 6.3. Can the functions {sin(x), cos(x), ex } be a fundamental set of solutions to
any third order constant coefficients homogeneous linear ODE?
Answer: Since there are three functions and the DE is to be third order, the answer is
“yes” if they are linearly independent, and “no” if they are linearly dependent. So we
check the Wronskian:
sin(x) cos(x) ex
W (x) = det cos(x) − sin(x) ex
− sin(x) − cos(x) ex
= sin(x) − sin(x)ex − ex (− cos(x))
= ex sin(x) cos(s) − sin2 (x) − cos2 (x) − cos(x) sin(x) − cos2 (x) − sin2 (x)
= −2ex .
Since this is not equal to zero for any value of x (in particular, if x = 0 the Wronskian
is equal to 2), the functions are linearly independent and so the answer is yes these
functions could be a fundamental set of solutions to a constant coefficients 3rd order
linear homogeneous DE. Example 6.3
12 AIDAN SIMS
Example 8.1. If y = ∞ n 2 00 0
P
n=0 an x is a series solution to (x + 2x)y − (3x + 1)y − 7y = 0,
what is the recurrence relation relating the coefficients an ?
Answer: Differentiating gives
∞
X ∞
X
y0 = nan xn−1 and y 00 = n(n − 1)an xn−2 .
n=1 n=2
Substituting into the left-hand side of the DE we obtain
(x2 + 2x)y 00 − (3x + 1)y 0 − 7y
X ∞
= (x2 + 2x) n(n − 1)an xn−2
n=2
∞
X ∞
X
− (3x + 1) nan xn−1 − 7 an x n
n=1 n=0
MATH2310 SEMESTER 1, 2006 (ODE’S STRAND): WORKED EXAMPLES 15
∞
X ∞
X
2 n−2
=x n(n − 1)an x + 2x n(n − 1)an xn−2
n=2 n=2
∞
X ∞
X
− 3x nan xn−1 − 1 nan xn−1
n=1 n=1
∞
X
−7 an x n
n=1
∞
X ∞
X
n
= n(n − 1)an x + 2n(n − 1)an xn−1
n=2 n=2
∞
X X∞ ∞
X
n n−1
+ −3nan x + −nan x + −7an xn .
n=1 n=1 n=1
The first step is to make sure that the bottom index of the sum matches up with the
exponent of x; if the sum involves xn , we want the summation to start at n = 0, if the
sum involves xn−1 we want the summation to begin at n = 1, if the sum involves xn−2 ,
we want the summation starting at n = 2, and so forth; the meta-principle is that the
first term should involve x0 .
This means we have to adjust the first, second, third, fourth and fifth of the sums
above. Do do this, we just add extra zero terms at the beginning. For example (note
that this level of detail would not usually be included, and is just here to indicate what’s
going on) in the first sum,
∞
X ∞
X
n
n(n − 1)an x = 0 + 0 + n(n − 1)an xn
n=2 n=2
∞
X
0 1
= (0)(0 − 1)a0 x + (1)(1 − 1)a1 x + n(n − 1)an xn
n=2
∞
X
= n(n − 1)an xn .
n=0
Doing similar tricks in the second, third and fifth sums we get
Now we need to fix up the exponent of x in the second and fourth sums. So we substitute
k = n − 1 (that is n = k + 1) in these sums, and k = n in the other three to obtain
∞
X ∞
X
k
= k(k − 1)ak x + 2(k + 1)((k + 1) − 1)ak+1 x(k+1)−1
k=0 k+1=1
∞
X X∞ ∞
X
k (k+1)−1
+ −3kak x + −(k + 1)ak+1 x + −7ak xk
k=0 (k+1)=1 k=0
∞
X ∞
X
= k(k − 1)ak xk + 2k(k + 1)ak+1 xk
k=0 k=0
∞
X X∞ ∞
X
k k
+ −3kak x + −(k + 1)ak+1 x + −7ak xk .
k=0 k=0 k=0
Since y is a solution to (x2 + 2x)y 00 − (3x + 1)y0 − 7y = 0, it follows that each of the
coefficients k 2 − 4k − 7)ak + (2k 2 + k − 1)ak+1 is equal to zero; that is
Example 8.1
Example 8.2. If y = ∞ n 2 00 0
P
n=0 an x is a series solution to (x + 2)y − xy − 15y = 0, find
the recurrence relation.
Answer:
∞
X ∞
X
y0 = nan xn−1 and y 00 = n(n − 1)an xn−2 .
n=1 n=2
MATH2310 SEMESTER 1, 2006 (ODE’S STRAND): WORKED EXAMPLES 17
Hence
(x2 + 2)y 00 + xy 0 − 15y
X∞ ∞
X ∞
X
= (x2 + 2) n(n − 1)an xn−2 − x nan xn−1 − 15 an x n
n=2 n=1 n=0
∞
X ∞
X ∞
X ∞
X
n n−2 n
= n(n − 1)an x + 2n(n − 1)an x − nan x + −15an xn
n=2 n=2 n=1 n=0
∞
X ∞
X ∞
X ∞
X
= n(n − 1)an xn + 2n(n − 1)an xn−2 − nan xn + −15an xn .
n=0 n=2 n=0 n=0
Substitute n = k + 2 or k = n − 2 in the second sum and k = n in the other three:
(x2 + 2)y 00 + xy 0 − 15y
X∞ ∞
X ∞
X ∞
X
k k k
= k(k − 1)ak x + 2(k + 2)(k + 1)ak+2 x − kak x + −15ak xk
k=0 k=0 k=0 k=0
∞
X
k(k − 1)ak + 2(k + 2)(k + 1)ak+2 − kak − 15ak xk
=
k=0
X∞
(k 2 − 2k − 15)ak + 2(k + 2)(k + 1)ak+2 xk .
=
k=0
Since this is a solution to the differential equation, we must have
(k − 2k − 15)ak + 2(k + 2)(k + 1)ak+2 = 0 ⇐⇒ 2(k + 2)(k + 1)ak+2 = −(k − 5)(k + 3)ak
−(k − 5)(k + 3)
⇐⇒ ak+2 = ak
2(k + 2)(k + 1)
for all k. Example 8.2
Example 8.3. If y = ∞ n 2 00 0
P
n=0 an x is a series solution to (x − 1)y − 3xy + 4y = 0, find
the recurrence relation.
Answer: ∞ ∞
X X
0 n−1 00
y = nan x and y = n(n − 1)an xn−2 .
n=1 n=2
Hence
(x2 − 1)y 00 − 3xy 0 + 4y
X∞ ∞
X ∞
X
2 n−2 n−1
= (x − 1) n(n − 1)an x − 3x nan x +4 an x n
n=2 n=1 n=0
∞
X ∞
X ∞
X ∞
X
= n(n − 1)an xn − n(n − 1)an xn−2 + −3nan xn + 4an xn
n=2 n=2 n=1 n=0
∞
X ∞
X ∞
X ∞
X
= n(n − 1)an xn + n(n − 1)an xn−2 + −3nan xn + 4an xn .
n=0 n=2 n=0 n=0
18 AIDAN SIMS
Example 8.4. If y = ∞ n 2 00 0
P
n=0 an x is a series solution to (x + 2x + 1)y + xy − 4y = 0,
find the recurrence relation.
Answer:
∞
X ∞
X
0 n−1 00
y = nan x and y = n(n − 1)an xn−2 .
n=1 n=2
Hence
(x2 + 2x + 1)y 00 + xy 0 − 4y
∞
X ∞
X ∞
X
= (x2 + 2x + 1) n(n − 1)an xn−2 + x nan xn−1 − 4 an x n
n=2 n=1 n=0
∞
X ∞
X ∞
X
= n(n − 1)an xn + 2n(n − 1)an xn−1 + n(n − 1)an xn−2
n=2 n=2 n=2
∞
X ∞
X
+ nan xn + −4an xn
n=1 n=0
∞
X ∞
X ∞
X
= n(n − 1)an xn + 2n(n − 1)an xn−1 + n(n − 1)an xn−2
n=0 n=1 n=2
∞
X ∞
X
+ nan xn + −4an xn .
n=0 n=0
MATH2310 SEMESTER 1, 2006 (ODE’S STRAND): WORKED EXAMPLES 19
n2 + 4n − 5 2
= lim 2 x
n→∞ n + 3n + 2
= x2
because the ratio of the leading coefficients of n2 + 4n − 5 and n2 + 3n + 2 is 1. So the
series converges where x2 < 1, that is −1 < x < 1. Example 8.5
20 AIDAN SIMS
P∞ 2n2 +4n−5
Example 8.6. If the coefficients of y = n=0 an xn satisfy an+2 = 5n(n+2) n
a , for which
values of x does the series converge?
Answer: Use the ratio test. Since the recurrence relation relates an+2 to an we check
the ratio of an+2 to an :
an+2 xn+2
an+2 2
lim = lim x
n→∞ an xn n→∞ an
2n2 +4n−5
5n(n+2) an 2
= lim x
n→∞ an
2
2n + 4n − 5 2
= lim x
n→∞ 5n2 + 10
2
= x2
5
P∞ 4n−5
Example 8.7. If the coefficients of y = n=0 an xn satisfy an+2 = a ,
5n(n+2) n
for which
values of x does the series converge?
Answer: Use the ratio test. Since the recurrence relation relates an+2 to an we check
the ratio of an+2 to an :
an+2 xn+2
an+2 2
lim = lim x
n→∞ an xn n→∞ an
4n−5
5n(n+2) an 2
= lim x
n→∞ an
4n − 5 2
= lim 2 x
n→∞ 5n + 10
=0
because the polynomial on the denominator has a higher degree than the one on the
numerator. So the series converges where 0 < 1, that is for all x. Example 8.7
P∞ 2n2 +4n−5
Example 8.8. If the coefficients of y = n=0 an xn satisfy an+2 = (n+2)
an , for which
values of x does the series converge?
MATH2310 SEMESTER 1, 2006 (ODE’S STRAND): WORKED EXAMPLES 21
Answer: Use the ratio test. Since the recurrence relation relates an+2 to an we check
the ratio of an+2 to an :
an+2 xn+2
an+2 2
lim = lim x
n→∞ an xn n→∞ an
2n2 +4n−5
(n+2) an 2
= lim x
n→∞ an
2
2n + 4n − 5 2
= lim x
n→∞ n+2
(
∞ if x 6= 0
=
0 if x = 0
because the polynomial on the denominator has lower degree than the one on the nu-
merator. The only place that this ratio is less than 1 is at x = 0, so the series converges
only where x = 0. Example 8.8
P∞ n 4n−5
Example 8.9. If the coefficients of y = n=0 an x satisfy an+1 = 3n−7 an , for which
values of x does the series converge?
Answer: Use the ratio test. Since the recurrence relation relates an+1 to an we check
the ratio of an+1 to an :
an+1 xn+1
an+1
lim = lim |x|
n→∞ an xn n→∞ an
4n−5 an
= lim 3n−7 |x|
n→∞ an
4
= |x|
3
because the ratio of the leading coefficients of 4n − 5 and 3n − 7 is 34 . So the series
converges where 43 |x| < 1, that is − 43 < x < 34 . Example 8.9