Vous êtes sur la page 1sur 15

MATH 625 ODEs SPRING 2013 HOMEWORK#2 SOLUTIONS

1. Solve the initial value problem


dy
dt
+ 2y = 1; y(0) =
5
2
.
SOLUTION: Note: this can be solved as a separable ODE or as a rst-order linear ODE.
Since we had not yet learned about rst-order linear ODEs when I assigned it, I will present
the separable ODE solution, In the meanwhile, however, we did cover rst-order linear ODEs
so I will accept a solution using the integration factor as well (you get the same answer, btw).
y

+ 2y = 1
dy
dt
= 1 2y
_
dy
1 2y
=
_
dt

1
2
ln |1 2y| = t +C
1
ln |1 2y| = 2t 2C
1
e
ln |12y|
= e
2t2C
1
|1 2y| = e
2t
e
2C
1
1 2y = e
2C
1
e
2
t
y =
e
2C
1
e
2
t
+ 1
2
y = Ce
2t
+
1
2
,
where C os any number, including 0, because y =
1
2
satises the ODE (with y

= 0).
To solve the IVP, we plug in y(0) =
5
2
:
5
2
= Ce
0
+
1
2
C =
5
2

1
2
C = 2
So the solution to the IVP is Y = 2e
2t
+
1
2
1
2. Solve the initial value problem
dy
dx
=
y
2
1
x
2
1
; y(2) = 2.
SOLUTION: This is a separable ODE.
dy
y
2
1
=
dx
x
2
1
_
dy
y
2
1
=
_
dx
x
2
1
Use partial fractions:
1
y
2
1
=
A
y + 1
+
B
y 1
1
y
2
1
=
A(y 1) + B(y + 1)
(y + 1)(y 1)
1 = Ay A + By +B
1 = (A + B)y + (B A)
So A + B = 0 or A = B and B A = 1 so 2B = 1 so B =
1
2
and A =
1
2
.
Back to our ODE:
_
_
1
2
1
(y 1)

1
2
1
(y + 1)
_
dy =
_
_
1
2
1
(x 1)

1
2
1
(x + 1)
_
dx
1
2
ln |y 1|
1
2
ln |y + 1| =
1
2
ln |x 1|
1
2
ln |x + 1| +C
1
ln |y 1| ln |y + 1| = ln |x 1| ln |x + 1| +C
1
e
ln |y1|ln |y+1|
= e
ln |x1|ln |x+1|+C
1
|y 1|e
|y+1|
1
= e
C
1
|x 1|e
|x+1|
1
y 1
y + 1
= e
C
1
x 1
x + 1
Let e
C
1
= C, then we have
y 1
y + 1
= C
x 1
x + 1
You can actually leave this like that, or solve for y explicitly:
y 1 = C(y + 1)
x 1
x + 1
y Cy
x 1
x + 1
= C
x 1
x + 1
+ 1
y
x + 1 Cx +C
x + 1
=
Cx C +x + 1
x + 1
2
y =
Cx C +x + 1
x + 1
x + 1
x + 1 Cx + C
y =
Cx C +x + 1
x + 1 Cx +C
So
y =
Cx C + x + 1
C Cx + x + 1
.
To solve the IVP, we plug in y(2) = 2:
2 =
2C C + 2 + 1
C 2C + 2 + 1
2 =
C + 3
3 C
6 2C = C + 3
3C = 3
C = 1
So the solution to the IVP is Y =
x 1 + x + 1
1 x +x + 1
2x
2
so
Y = x
3. Solve the ODE
dN
dt
+N = Nte
t+2
.
SOLUTION: This is a separable ODE.
dN
dt
= Nte
t+2
N
dN
dt
= N(te
t+2
1)
dN
N
= (te
t+2
1)dt
_
dN
N
=
_
(te
t+2
1)dt
The integral on the right-hand side requires integration by parts
_
uv

= uv
_
u

v:
_
te
t+2
dt = te
t+2

_
e
t+2
dt = te
t+2
e
t+2
3
Back to our ODE:
ln |N| = (t 1)e
t+2
t +C
1
|N| = e
(t1)e
t+2
e
t
e
C
1
N = e
C
1
e
t
e
(t1)e
t+2
N = Ce
t
e
(t1)e
t+2
4. Solve the ODE
dy
dx
=
_
2y + 3
4x + 5
_
2
.
SOLUTION: This is a separable ODE.
dy
dx
=
(2y + 3)
2
(4x + 5)
2
dy
(2y + 3)
2
=
dx
(4x + 5)
2
_
dy
(2y + 3)
2
=
_
dx
(4x + 5)
2

1
2
1
(2y + 3)
=
1
4
1
(4x + 5)
+C
1
2
(2y + 3)
=
1
(4x + 5)
4C
1
2
(2y + 3)
=
1 16C
1
x 20C
1
(4x + 5)
2y + 3
2
=
4x + 5
1 16C
1
x 20C
1
y +
3
2
=
4x + 5
1 16C
1
x 20C
1
At this point, it becomes cumbersome to write everything on the right-hand as a single
fraction, we end up doing a lot of algebra with very little value towards understanding the
function y any better. So
y =
4x + 5
1 4C
1
(4x + 5)

3
2
y =
4x + 5
1 + C(4x + 5)

3
2
4
5. Solve the ODE
dy
dt
=
3t + 1
e
y
+ sin(y)
.
SOLUTION: This is a separable ODE.
(e
y
+ sin(y))dy = (3t + 1)dt
_
(e
y
+ sin(y))dy =
_
(3t + 1)dt
e
y
cos y =
3
2
t
2
+t +C
6. Solve the ODE y
dy
dx
= xe
x
2
+y
2
.
SOLUTION: This is a separable ODE.
y
dy
dx
= xe
x
2
e
y
2
ye
y
2
dy = xe
x
2
dx
_
ye
y
2
dy =
_
xe
x
2
dx
Using the Chain Rule, check that
_
e
y
2
_

= e
y
2
(2y), so we have

e
y
2
2
=
e
x
2
2
+C
1
e
y
2
= 2e
x
2
2C
1
ln e
y
2
= ln(2e
x
2
2C
1
)
y
2
= ln(2e
x
2
2C
1
)
y
2
= ln(C 2e
x
2
)
7. Solve the ODE
dy
dt
=
y t
y +t
.
SOLUTION: This is a separable ODE. Let y = ut, where u = u(t), so y

= u

t +u and
u

t +u =
ut t
ut +t
5
Dividing the numerator and denominator of the right-hand side by t:
u

t =
u 1
u + 1
u
u

t =
u 1 u(u + 1)
u + 1
u

t =
u 1 u
2
u
u + 1
u

t =
u
2
+ 1
u + 1
u + 1
u
2
+ 1
du =
1
t
dt
_
u + 1
u
2
+ 1
du =
_
1
t
dt
_
u
u
2
+ 1
du +
_
1
u
2
+ 1
du =
_
1
t
dt
1
2
ln(u
2
+ 1) + arctan t = ln |t| +C
1
ln(u
2
+ 1) + 2 arctan t = 2 ln |t| + 2C
1
ln(u
2
+ 1) = C
2
+ ln
1
t
2
2 arctan t
e
ln(u
2
+1)
= e
C
2
+ln
1
t
2
2 arctan t
u
2
+ 1 = e
C
2
+ln
1
t
2
2 arctan t
u
2
= e
C
2
_
1
t
2
_
e
2 arctan t
1
y
2
t
2
=
_
e
C
2
t
2
_
e
2 arctan t
1
y
2
t
2
=
Ce
2 arctan t
t
2
1
y
2
=
Ce
2 arctan t
t
2
t2
8. Consider the ODE
dy
dx
= (x 3)(y + 1)
2/3
.
(a) Use separation of variables to derive the solution y = 1 + (x
2
/6 x +C)
3
.
(b) Show that y = 1 is a solution to the ODE.
(c) Show that there is no choice of the constant C that will reduce your solution from a) to
your solution from b). Where did you lose the solution y = 1?
6
SOLUTION:
(a)
dy
dx
= (x 3)(y + 1)
2/3
is separable, so we have
dy
(y + 1)
2/3
= (x 3)dx
_
(y + 1)
2/3
dy =
_
(x 3)dx
3(y + 1)
1/3
=
x
2
2
3x + C
1
(y + 1)
1/3
=
x
2
6
x +C
y + 1 =
_
x
2
6
x + C
_
3
y =
_
x
2
6
x + C
_
3
1
(b) For y = 1, we have y

= 0 and substituting in the ODE


dy
dx
= (x 3)(y + 1)
2/3
, we have:
0 = (x 3)(1 + 1)
2/3
0 = 0,
a true equality for all x, which by denition means that y = 1 satises the ODE, so it is
a legitimate solution.
(c) The solution y =
_
x
2
6
x + C
_
3
1 does not include y = 1 because
1 =
_
x
2
6
x +C
_
3
1
means
_
x
2
6
x +C
_
3
= 0
so
x
2
6
x +C = 0
which is not true (for all x!!!) for a given constant C because the left-hand side changes
depending on the value of x.
Therefore, y = 1 was not included in the general solution we found.
7
Upon inspection, however, this becomes clear because in the second line of that solution,
we divided by (y + 1)
2/3
, which immediately excluded the possibility y = 1. So we lost
this solution in the process of solving using separation of variables. We need to include this
solution by hand into the general solution, because the formula we found in (a) does not
include it.
9. Analyze the solution y = (x) to the initial value problem
dy
dx
= y
2
3y + 2; y(0) = 1.5
(a) Use dfield to plot the direction eld. What would you estimate for lim
x
(x)?
(b) Use Eulers method with a step size of .1, or smaller, to nd an estimate of (1).
(c) Solve the dierential equation, and use the exact solution to sanity-check (as an approxi-
mation) your estimates in part a) and part b).
SOLUTION:
(a) The estimate is lim
x
(x) = 1 from the direction eld.
(b) Using Eulers method with a step size of 0.1 and 0.001 to nd an estimate of (1):
x
n+1
= x
n
+h y
n+1
= y
n
+ hf(x
n
, y
n
)
0.1 1.475
0.2 1.45006
0.3 1.42531
0.4 1.40087
0.5 1.37685
0.6 1.35337
0.7 1.33052
0.8 1.30839
0.9 1.28706
1. 1.2666
8
With h = 0.001, we display every 50th term of the 1000 steps it took to get to x = 1:
x
n+1
= x
n
+h y
n+1
= y
n
+ hf(x
n
, y
n
)
0.05 1.4875
0.1 1.47502
0.15 1.46257
0.2 1.45016
0.25 1.43782
0.3 1.42555
0.35 1.41338
0.4 1.40131
0.45 1.38935
0.5 1.37753
0.55 1.36586
0.6 1.35433
0.65 1.34298
0.7 1.3318
0.75 1.32081
0.8 1.31001
0.85 1.29941
0.9 1.28903
0.95 1.27886
1. 1.26892
(c) Solving the IVP, a separable ODE:
dy
dx
= y
2
3y + 2
dy
y
2
3y + 2
= dx
_
dy
y
2
3y + 2
=
_
dx
9
The integrand on left-hand side is a fraction
1
(y 1)(y 2)
, which can be written as a
sum of simple fractions using the method of partial fractions (see video solutions):
1
(y 1)(y 2)
=
A
(y 1)
+
B
(y 2)
1
(y 1)(y 2)
=
A(y 2)
(y 1)(y 2)
+
B(y 1)
(y 1)(y 2)
1
(y 1)(y 2)
=
A(y 2) + B(y 1)
(y 1)(y 2)
So,
1 = A(y 2) + B(y 1)
1 = Ay 2A +By B
1 = 2A B + y(A +B)
Therefore, A +B = 0 (no y-dependence on the right-hand side) and 2A B = 1.
So A = B and 2A +A = 1 or A = 1 and B = 1
Back to our ODE:
_
1
(y 1)
dy +
_
1
(y 2)
dy =
_
dx
ln |y 1| + ln |y 2| = x + C
1
ln

y 2
y 1

= x + C
1

y 2
y 1

= e
C
1
e
x
y 2
y 1
= e
C
1
e
x
y 1 1
y 1
= Ce
x
y 1
y 1
+
1
y 1
= Ce
x
1 +
1
y 1
= Ce
x
1
1 y
= Ce
x
1
1 y =
1
Ce
x
1
y =
1
Ce
x
1
1
10
y = 1
1
1 Ce
x
It is easy to see that as x , y 1, regardless of the value of C. For the IVP,
y(0) = 1.5:
1.5 = 1
1
1 Ce
0
0.5 =
1
1 C
C = 3
So the solution to the IVP is:
Y = 1
1
1 3e
x
10. Verify that the function
Y (t) = e
t
2
_
t
0
e
s
2
ds + e
t
2
is indeed a function of t (explain!) and moreover, that Y (t) is a solution to the
ODE
y

2ty = 1.
SOLUTION:
Y (t) = e
t
2
_
t
0
e
s
2
ds + e
t
2
Y (t) = e
t
2
_
t
0
f(s)ds +e
t
2
,
where f(s) = e
s
2
. Let F(s) be the anti-derivative of f, so F

= f. Then, by the Fundamental


Theorem of Calculus,
Y (t) = e
t
2
F(s)

t
0
+e
t
2
Y (t) = e
t
2
(F(t) F(0)) + e
t
2
,
so Y (t) is a function of t.
To check if Y (t) satises the ODE, we need to compute Y

(t):
dY
dt
=
d
dt
_
e
t
2
_
t
0
e
s
2
ds +e
t
2
_
11
Using the product rule, we have:
dY
dt
=
d
dt
_
e
t
2
_
_
t
0
e
s
2
ds + e
t
2 d
dt
_
_
t
0
e
s
2
ds
_
+ 2te
t
2
dY
dt
= 2te
t
2
_
t
0
e
s
2
ds +e
t
2 d
dt
_
F(t) F(0)
_
+ 2te
t
2
dY
dt
= 2te
t
2
_
t
0
e
s
2
ds +e
t
2
F

(t) + 2te
t
2
dY
dt
= 2te
t
2
_
t
0
e
s
2
ds +e
t
2
f(t) + 2te
t
2
dY
dt
= 2te
t
2
_
t
0
e
s
2
ds +e
t
2
e
t
2
+ 2te
t
2
dY
dt
= 2te
t
2
_
t
0
e
s
2
ds + 1 + 2te
t
2
So plugging in Y and Y

into the ODE, we have:


Y

2tY
?
= 1
2te
t
2
_
t
0
e
s
2
ds + 1 + 2te
t
2
2t
_
e
t
2
_
t
0
e
s
2
ds + e
t
2
_
?
= 1
2te
t
2
_
t
0
e
s
2
ds + 1 + 2te
t
2
2te
t
2
_
t
0
e
s
2
ds 2te
t
2
?
= 1
Cancellations of equivalent terms:
2te
t
2
_
t
0
e
s
2
ds + 1 + 2te
t
2
2te
t
2
_
t
0
e
s
2
ds 2te
t
2
?
= 1
1

= 1
so Y is indeed a solution to the ODE.
11. (Problem 5 on p.22) The logistic equation for the population (in thousands) of
a certain species is given by
dp
dt
= 3p 2p
2
.
(a) Sketch the direction eld by using either a computer software of the method
of isoclines.
12
(b) If the initial population is 3000 (that is, p(0) = 3), what can you say about
the limiting population
lim
t+
p(t)?
(c) If p(0) = 0.8, what is
lim
t+
p(t)?
(d) Can a population of 2000 ever decline to 800?
SOLUTION: The direction eld shows two constant solutions at p = 1.5 and p = 0. All
integral curves above p = 0 approach p = 1.5. All integral curves diverge from p = 0. So if
p(0) = 3, then lim
t
p(t) = 1.5. If p(0.8), then lim
t
p(t) = 1.5 as well. If the population
is 2,000 (p = 2) at any point, this integral curve is above the constant curve p = 1.5, and
its long-term behavior is to approach this curve, so it can never decline to 0.8 which means a
population of 800.
12. Stefans Law of Radiation states that the rate of change in temperature of a
body at T(t) degrees in a medium at M(t) degrees is proportional to M
4
T
4
. That
is,
dT
dt
= K
_
M(t)
4
T(t)
4
_
,
where K is a constant. Let K = (40)
4
and assume that the medium temperature is
constant, M(t) = 70

. If T(0) = 100

, use Eulers method with h = .1 to approximate


T(1) and T(2). What do you get if h = .01?
SOLUTION: The ODE is
dT
dt
=
1
40
4
(70
4
T
4
)
13
The initial value is T(0) 100, so t
0
= 0, T
0
= 100, and h = 0.1, We need to go 10 and 20
steps, respectively, to get approximations for T(1) and T(2). Then, with h = 0.01, we generate
the approximations with a computer.
t
n+1
= t
n
+ h T
n+1
= T
n
+hf(t
n
, T
n
)
0.1 97.0316
0.2 94.5068
0.3 92.3286
0.4 90.4279
0.5 88.7538
0.6 87.2678
0.7 85.9402
0.8 84.7472
0.9 83.6702
1. 82.6936
For T(2), we have 20 points, we display only every other one here, but in the program, we
computed them all. Since Eulers method is recursive, skipping points is not really possible!
t
n+1
= t
n
+h T
n+1
= T
n
+hF(t
n
, T
n
)
0.2 94.5068
0.4 90.4279
0.6 87.2678
0.8 84.7472
1. 82.6936
1.2 80.9934
1.4 79.5681
1.6 78.3613
1.8 77.3311
2. 76.4459
14
Here, we approximate T(1) with 10,000 points!!!, that is, h = 0.0001, displaying only every
500th point. Notice how this compares with the approximation we had for T(1) using h = 0.1.
t
n+1
= t
n
+h T
n+1
= T
n
+hF(t
n
, T
n
)
0.05 98.5714
0.1 97.2459
0.15 96.0123
0.2 94.8612
0.25 93.7844
0.3 92.7749
0.35 91.8264
0.4 90.9336
0.45 90.0918
0.5 89.2967
0.55 88.5447
0.6 87.8324
0.65 87.1568
0.7 86.5153
0.75 85.9055
0.8 85.3251
0.85 84.7722
0.9 84.245
0.95 83.7419
1. 83.2614
For the record, using h = 0.000001, that is, 1,000,000 points, the approximation for T(1) was
83.2619, only o by 0.0005 degrees from the approximation with h=0.0001, or 10,000 points ,
and only 0.47 degrees from the approximation with h = 0.1.
15

Vous aimerez peut-être aussi