Math 220, Differential Equations Fall 2011 Final Exam Solutions

advertisement
Math 220, Differential Equations
Fall 2011 Final Exam Solutions - December-2011
Landon Kavlie
These are solutions to this practice exam given in December 2011.
1. (8+12) Consider the equation
y 00 + y = t2 + et .
(1) Find the general solution to the homogeneous equation (with right hand
side replaced by 0).
(2) Find a particular solution to the inhomogeneous equation.
This is a two-step problem which really just wants you to use the method of
undetermined coefficients. To start off with, you solve the homogeneous problem.
The characteristic equation is r2 + 1 = 0. This has solutions r = ±i. So, the
homogeneous solution is given by
yh = C1 sin(t) + C2 cos(t).
For the next part, we use the method of undetermined coefficients along with
superposition to come up with this form for the particular solution.
yp = (At2 + Bt + C) + Det .
Taking two derivatives yields
yp = At2 + Bt + C + Det
yp0 = 2At + B + Det
yp00 = 2A + Det .
Now, we plug those into the original equation giving us that
2A + Det + At2 + Bt + C + Det = At2 + Bt + (2A + C) + 2Det = t2 + et .
Matching coefficients gives us that
2A = 1
(t2 )
B=0
(t1 )
(2A + C) = 0
(t0 )
2D = 1
(et ).
Thus, we find that A = 1/2, B = 0, C = −1, and D = 1/2. So, the particular
solution is given by
1
1
yp = t2 − 1 + et .
2
2
2. (10+10) Solve
(a)
y
dy
= + xex ,
dx
x
(b)
1
dy
sin(x) − yexy
=
.
dx
xexy + 1
2
For the first one, this is a first-order linear equation. So, we put it into standard
form:
1
y 0 − y = xex .
x
We then have the integrating factor
R
−1
1
1
e − x dx = e− ln(x) = eln(x ) = .
x
We then multiply the equation through by x1 , and simplify giving us the equation
0
1
y = ex .
x
Integrating both sides gives us that
1
y = ex + C.
x
So, multiplying the x to the other side gives us that
y = xex + Cx.
Now, we do the second one. It is obviously not linear due to the exy terms. Also,
there is no way to split up the x and the ys due to the exy term as well, so it is not
separable. So, that leaves exact. Time to split everything up. Cross-multiplying
gives us that
(xexy + 1)dy = (sin(x) − yexy )dx.
Moving the dx term to the left gives us that
(xexy + 1)dy + (yexy − sin(x))dx = 0.
Checking for exactness, we find that
∂
(xexy + 1) = exy + xyexy
∂x
∂
(yexy − sin(x)) = exy + xyexy .
∂y
Since the two match, the equation is exact. Thus, we can now integrate either
terms since we now know that the above equation represents dF = ∂y F + ∂x F = 0
and hence F = C. First, we integrate the first term. This gives us that
Z
F (x, y) = xexy + 1dy = exy + y + f (x) = C
To integrate the first term, I used the u-substitution u = xy. Then, du = xdy. To
find f (x), we need to take the derivative of F with respect to x finding that
yexy + f 0 (x) = yexy − sin(x).
Hence, f 0 (x) = − sin(x). Therefore, f (x) = cos(x). So, our full solution is
exy + y + cos(x) = C.
3. (20) Use the Euler method with two steps to approximate y(1), where
0
y = (1 + x)y + x2
y(0) = 1.
3
The recursive equation for Euler’s method with step-size h is given by
yn+1 = yn + hf (xn , yn ).
For this problem, we want to get from x = 0 to x = 1 in two steps. Thus, we have
that h = 1/2. So, with x0 = 0 and y0 = 1, we have that
y1 = 1 +
1
(1 + 0)1 + 02
2
3
2
3 1
y2 = +
2 2
=
=
Thus, y(1) ≈
2 !
1 3
1
1+
+
2 2
2
11
.
4
11
4 .
4. (3+12) Let p(t) be the population of some species, which satisfies the ODE
p0 = 3p − p2
(1) If p(0) = 0, what is p(t) for t > 0?
(2) Solve for p(t) for the initial condition p(0) = 1, and then evaluate the limit
of p(t) as t → ∞.
Note that p(0) = 0 gives us that p0 (0) = 0. This is a fixed point for the dynamical
system. So, if p(0) = 0, then p(t) = 0 for all t > 0.
Now, we need to actually solve the equation. Luckily, it is separable.
dp
= 3p − p2
dt
dp
= dt
3p − p2
dp
= dt
p(3 − p)
11 1 1
−
dp = dt
3p 3p−3
1
1
ln(p) − ln(p − 3) = t + C
3
3
p
1
ln
=t+C
3
p−3
p
= 3t + C
ln
p−3
p
= Ce3t .
p−3
4
Using that p(0) = 1, we have that − 12 = C. So, we have that
p
1
= − e3t
p−3
2
1
3
p = − e3t p + e3t
2
2
3 3t
1 3t
= e
p 1+ e
2
2
(3/2)e3t
.
p=
1 + (1/2)e3t
As t → ∞, this will go to (3/2)/(1/2) = 3.
5. (8+7) Solve
(a) t2 y 00 − ty 0 + y = 0,
(b) t2 y 00 + ty 0 + 4y = 0.
These are both just Cauchy-Euler equations. So, we take the same method for
each of them. To start off with, the first one gives the characteristic equation
r2 + (−1 − 1)r + 1 = r2 − 2r + 1 = (r − 1)2 = 0.
This has the double root r = 1. So, the solution is given by
y = C1 t + C2 t ln(t).
The second one has the characteristic equation
r2 + (1 − 1)r + 4 = r2 + 4 = 0.
This has the complex roots r = ±2i. So, the solution is given by
y = C1 sin(2 ln(t)) + C2 cos(2 ln(t)).
6. (3+12) Consider the ODE
y 00 + 2ty 0 − 4y = 0.
(1) Is y1 (t) = 2t2 + 1 a solution?
(2) Find the general solution. (HINT: Consider the method of reduction of
order. You may leave your answer as an integral.)
To check if y1 is a solution, you just have to plug it into the equation. Taking
dirivatives, we have that
y1 = 2t2 + 1
y10 = 4t
y100 = 4.
Then, you plug it into the equation and see if the equation is satisfied:
4 + 2t(4t) − 4(2t2 + 1) = 4 + 8t2 − 8t2 − 4 = 0.
5
So it is. Next, we need to find the general solution. That means we have to use
the method of reduction of order. That is, we will find y2 = v(t)y1 (t). Taking
derivatives, we have that
y2 = vy1
y20 = v 0 y1 + vy10
y200 = v 00 y1 + v 0 y10 + v 0 y10 + vy100 .
Plugging this into the original equations gives us that
y200 + 2ty20 − 4y2 = (v 00 y1 + 2v 0 y10 + vy100 ) + 2t(v 0 y1 + vy10 ) − 4vy1
= v(y100 + 2ty10 − 4y1 ) + v 0 (2y10 + 2ty1 ) + v 00 y1
= v 0 (2(4t) + 2t(2t2 + 1)) + v 00 (2t2 + 1)
= (2t2 + 1)v 00 + (4t3 + 10t)v 0 = 0
since y100 + 2ty10 − 4y1 = 0. Now, we replace w := v 0 . Then, our equation becomes
w0 (2t2 + 1) + (4t3 + 10t)w = 0,
a first-order linear system. So, we use the usual methods. To start, we put it in
standard form.
4t3 + 10t
w0 +
w = 0.
2t2 + 1
This gives us the integrating factor
e
R
4t3 +10t
dt
2t2 +1
= eG (t).
We will not evaluate the integrals, since the problem says we don’t have to. But,
if you prefer, G(t) = t2 + 2 ln(2t2 + 1). Next, we do the usual trick and simplify to
obtain that
h
i
weG(t)
2
0
= 0.
2
Therefore, w = Ce−G(t)R = Ce−t −2 ln(2t +1) . Finally, since we want to know what
v is, we have that v = wdt. Thus,
Z
2
2
v = C e−t −2 ln(2t +1) dt
which has no elementarysimplification. The general solution is thus
Z
2
2
y = C1 y1 + C2 y2 = C1 (2t2 + 1) + C2 (2t2 + 1) e−s −2 ln(2s +1) ds.
7. (15) Find the general solution to
y 00 − 2y 0 + y =
2et
.
t3
This is a classic example of the method of variation of parameters. One would
like to use the method of undetermined coefficients, but it doesn’t work due to the
t−3 term. So, we start by solving the homogeneous equation. This gives us the
6
characteristic equation r2 − 2r + 1 = (r − 1)2 = 0 which has the double root r = 1.
Thus, our homogeneous solution is
yh = C1 et + C2 tet .
I will set y1 := et and y2 := tet . Then, the method of variation of parameters says
that the particular solution is given by
yp = v1 y1 + v2 y2
where v1 and v2 satisfy the following equations:
v10 y1 + v20 y2 = 0
v10 y10 + v20 y20 = f /a.
In our particular problem, these equations become
v10 et + v20 tet = 0
2et
.
t3
Subtracting the first equation from the second gives us that
v10 et + v20 et + v20 tet =
v20 et =
2et
2
⇒ v20 = 3
3
t
t
after dividing through by et . Next, we integrate giving us that
1
.
t2
Substituting v20 into the first equation gives us that
v2 = −
v10 et +
2et
2 t
0 t
te
=
v
e
+
= 0.
1
t3
t2
Rearranging and dividing through by et gives us that
v10 = −
2
.
t2
Thus, we have that
v1 =
2
.
t
So, the particular solution is
2et
et
et
−
= .
t
t
t
This gives us that the general solution is given by
yp = v1 y1 + v2 y2 =
y = C1 et + C2 tet +
et
.
t
8. (15) Find the general solution to the system
0
x = 2x + y
y 0 = x + 2y.
7
Here is the systems problem. Rewriting it in the usual form with differentials,
this becomes
(D − 2)x − y = 0
−x + (D − 2)y = 0.
Applying the differential operator D − 2 to the bottom equation and adding the
two equations together gives us that
(D − 2)2 y − y = (D2 − 4D + 4)y − y = y 00 − 4y 0 + 3y = 0.
This has the characteristic equation r2 − 4r + 3 = (r − 3)(r − 1) = 0 which has
solutions r = 3, 1. Thus, we have that
y = C1 e3t + C2 et .
From the second equation, we know that
x = y 0 − 2y
= (3C1 e3t + C2 et ) − 2(C1 e3t + C2 et )
= C1 e3t − C2 et .
Therefore, we have that
x = C1 e3t − C2 et
y = C1 e3t + C2 et .
9. (15) Use Laplace transforms to solve
 00
 y + y 0 = et
y(0) = 1
 0
y (0) = 0.
To receive any credit, you must use Laplace transforms.
Taking the Laplace transform of our differential equation and using the usual
notation Y (s) := L {y}(s), we have that
1
s−1
1
2
(s + s)Y (s) − s − 1 =
s−1
1
2
(s + s)Y (s) =
+s+1
s−1
1
s+1
Y (s) =
+
(s − 1)(s2 + s) s2 + s
1
s+1
Y (s) =
+
s(s + 1)(s − 1) s(s + 1)
1
1
Y (s) =
+ .
s(s + 1)(s − 1) s
s2 Y (s) − sy(0) − y 0 (0) + sY (s) − y(0) =
8
Applying partial fractions to the first term gives us that
1 1 1
1 1
1
Y (s) = − +
+
+
s 2s+1 2s−1 s
1 1
1 1
=
+
.
2s+1 2s−1
Thus, we pull back across the Laplace transform giving us that
y=
1 −t 1 t
e + e.
2
2
10. (15) Use Laplace transforms to solve
 00
 y + 4y = δ(t − 1)
y(0) = 0
 0
y (0) = 1.
To receive any credit, you must use Laplace transforms.
Again, we takethe Laplace transform of our differential equation and using the
usual notation Y (s) := L {y}(s). This gives us that
s2 Y (s) − sy(0) − y 0 (0) + 4Y (s) = e−s
(s2 + 4)Y (s) − 1 = e−s
(s2 + 4)Y (s) = e−s + 1
1
e−s
+
s2 + 4 s2 + 4
1 2e−s
1 2
Y (s) =
+
.
2
2 s + 4 2 s2 + 4
Then, we pull back across the Laplace transform to find that
Y (s) =
y=
1
1
u(t − 1) sin(2(t − 1)) + sin(2t).
2
2
11. (15) Solve the heat equation

ut = βuxx ; 0 < x < 1, t > 0



u(0, t) = 0
u(1, t) = 0



u(x, 0) = 2 sin(πx) + sin(4πx).
Start by writing the general solution that satisfies the PDE and boundary conditions, and then find the solution that also satisfies this initial condition.
From memory, the heat equation is given by
u(x, t) =
∞
X
n=1
2
cn e−β(nπ/L) t sin((nπ/L)x).
9
Since L = 1 in this particular problem, this becomes
u(x, t) =
∞
X
cn e−βn
2
π2 t
sin(nπx).
n=1
Using the intial conditions, we have that
u(x, 0) =
∞
X
cn sin(nπx)
n=1
= 2 sin(πx) + sin(4πx).
Matching coefficients, we have that c1 = 2 and c4 = 1 and all the other cn s are
zero. This gives us that
2
2
u(x, t) = 2e−βπ t sin(πx) + e−β16π t sin(4πx).
12. (3+2+3+12) Let f (x) = 2x for 0 < x < 1.
(1) Sketch the even extension of f (x) over the range −1 < x < 1.
(2) Does the Fourier series of (the extended) f (x) involve sines, cosines, or
both?
(3) What is the average value of (the extended) f (x) over a period?
(4) Compute explicitly the Fourier series of (the extended) f (x).
The even extension is where we let f (x) = f (−x) for −1 < x < 0. The other
way of viewing this is by mirroring across the y-axis. This gives us the following
picture which I generated using sage (an open-source mathematica)
Since we are going to find the Fourier series for the even extension, this will force
f to be even over the interval −1 < x < 1. Thus, only the even terms will survive
which means that the Fourier series will only contain cos terms.
This is a particularly weird question, but ok. What they are asking is what is
the first Fourier coefficient. Anyways, we need to find the average value over the
10
interval. That is, we need to find
Z
Z
Z
1 1
1 0
1 1
f (x)dx =
f (x)dx +
f (x)dx
2 −1
2 −1
2 0
Z
Z
1 0
1 1
=
−2xdx +
2xdx
2 −1
2 0
since the length of the interval from −1 to 1 is 2. Using the substitution u = −x,
the first integral becomes
Z
Z
Z
Z
1 0
1 1
1 1
1 0
2u(−du) = −
2udu =
2udu =
2xdx
2 1
2 1
2 0
2 0
after switching the dummy variable of integration in the last step. Thus, the average
value is exactly
Z
Z 1
1
1 1
f (x)dx =
2xdx = x2 0 = 1.
2 −1
0
Alright, the Fourier series is going to be exactly the Fourier cosine series for the
non-extended function 2x. That is, we will have
∞
a0 X
+
an cos(nπx)
2
n=1
since the length of the interval is 1. Also, we will have that
Z 1
an =
2x cos(nπx)dx.
0
We already computed a0 (which must always be done in a separate case, anyways,
so I guess that’s why it was a separate part). So, it remains to compute the above
coeffients when n = 1, 2, 3, . . . . Using integration by parts, we have that
1
Z 1
Z 1
2
2
x sin(nπx) −
sin(nπx)dx
2x cos(nπx)dx =
nπ
nπ 0
0
0
1
1
2
2
x sin(nπx) + 2 2 cos(nπx)
=
nπ
n π
0
0
2
2
= 2 2 cos(nπ) − 2 2
n π
n π
using that sin(nπ) = 0. Also, using that cos(nπ) = (−1)n , this gives us that
− n24π2 n is odd
an =
0
n is even.
So, the Fourier series is given by
∞
4
1 X
−
cos((2n − 1)πx)
2 n=1 (2n − 1)2 π 2
where I used (2n − 1) in place of n to skip all of the even terms.
Download