18.03 Practice Final Examination Solutions

Spring, 1999

The first four problems all concern the initial value problem

\frac{dy}{dx} + xy = x, y(0) = 0,

but they are independent of one another.

1. This equation is separable. Find the general solution by separating variables, and then find the particular solution with y(0) = 0.

Solution. As differentials, \frac{dy}{1 − y} = x dx, so − ln |y − 1| = x^{2}/2 + c or (replacing the

excluded solution y = 1), y = 1 + ce^{−x^{2}/2}. The initial condition forces c = −1: y = 1 − e^{−x^{2}/2}.

2. It is also a first order linear equation. Find an appropriate integrating factor and solve the same initial value problem again.

Solution. We want w such that \frac{d(wy)}{dx} = w\frac{dy}{dx} + xwy. This forces \frac{dw}{dx} = xw, which is

separable. w = e^{x^{2}/2} is a solution, so the original ODE is equivalent to \frac{d(e^{x^{2}/2}y)}{dx} = e^{x^{2}/2}x.

Thus e^{x^{2}/2}y = ∫ e^{x^{2}/2}x dx = e^{x^{2}/2} + c, and hence y = 1 + ce^{−x^{2}/2} as before. c = −1 as

before.

3. Use Euler’s method to estimate y(0.2) using a stepsize of 0.1.

Solution. The ODE is dy/dx = f(x, y) with f(x, y) = x(1 − y). h = .1. Euler: y_{n+1} = y_{n} + f(x_{n}, y_{n})h. x_{0} = 0, x_{1} = .1, x_{2} = .2; y_{0} = 0, y_{1} = y_{0} + f(0, 0)(.1) = 0; y(.02) ≃ y_{2} = y_{1} + f(.1, .1)(.1) = 0 + (.1)(1)(.1) = .01.

4. Now draw an axis system (with range −3 ≤ x, y ≤ 3), sketch the isoclines for m = −1, 0, 1, and the direction field along them, and sketch a few solution curves (including the one through (0, 0)).

Solution. The isocline for slope m is the hyperbola y = 1 − m/x. When m = 0 this degenerates to the lines x = 0 and y = 1. The solution through (0, 0) is an upside-down bell curve asymtotic to the line y = 1.

5. (a) Use the Laplace transform to solve the initial value problem ẍ − x = 0, x(0) = 0, ẋ(0) = 1.

Solution. Using the t-derivative rule twice, L(f′′(t); s) = s^{2}L(f(t); s) − sf(0) − f′(0), so

applying L gives s^{2}X(s) − 1 − X(s) = 0, or X(s) = \frac{1}{s^{2} − 1} = \frac{1}{2} (\frac{1}{s − 1} − \frac{1}{s + 1}). Thus

x(t) = (1/2)(e^{t} − e^{−t}) = sinh(t).

(b) Express the solution to ẍ − x = r(t), x(0) = 0, ẋ(0) = 0, as a convolution using Duhamel’s principle. Write this convolution as an integral (from the definition).

Solution. x(t) = w(t) ∗ r(t), where w(t) is the weight function, the inverse Laplace transform of 1/p(s). We have just calculated that w(t) = sinh(t). As an integral, x(t) = ∫_{0}^{t} sinh(τ)r(t − τ) dτ.

6. Find the general solution of Ly = 0, where L is the differential operator L = (D+2I)^{5}. Solution. y = (a_{0} + a_{1}x + a_{2}x^{2} + a_{3}x^{3} + a_{4}x^{4})e^{−2x}.

7. Let A = [ \begin{matrix}a & 1 \\ −1 & 0 \end{matrix} ], where a is some real number, and consider the linear system ˙x⃗ = Ax⃗. Specify the values of a (and the answer may be “none”) for which the phase portrait exhibits each of the following. (Every number a should appear.)

(i) A nonconstant periodic orbit. Ans: a = 0 (ii) A saddle. Ans: None. (iii) A stable spiral (not a center). Ans: −2 < a < 0. (iv) An unstable spiral (not a center). Ans: 0 < a < 2.

(v) A stable proper node. Ans: a < −2. (vi) An unstable proper node. Ans: 2 < a. (vii) A stable improper node. Ans: a = −2. (viii) An unstable improper node. Ans: a = 2. Solution. The characteristic polynomial λ^{2} − aλ + 1 has roots a ± \sqrt{(a/2)^{2} − 1}. These are real and distinct if |a| > 2, and then they have the same sign since their product is the constant term 1. This gives (v) and (vi). If |a| < 2 the roots are not real; if a ≠ 0 they are also not imaginary, and this gives (iii) anad (iv). If a = 0 the roots are purely imaginary and this gives (i). If |a| = 2, the matrix has repeated roots but is not diagonal, and this gives (vii) and (viii).

8. Consider the homogeneous linear equation y′′′ + y′′ + y′ + y = 0.

(a) Determine the normal modes (i.e., the exponential solutions) of this equation. (Hint: is −1 a root of the characteristic polynomial?) Solution. p(λ) = λ^{3} + λ^{2} + λ + 1 = (λ + 1)(λ^{2} + 1), so the roots are −1, i, −i. The normal modes are thus e^{−x}, e^{ix}, and e^{−ix}.

(b) Write down three independent real solutions. Solution. e^{−x}, sin(x), cos(x).

9. Use the Laplace transform to find the solution to the same homogeneous linear equation as in 8. (but written now using t for the independent variable and x for the independent variable), x^{(3)} + ẍ + ẋ + x = 0, for which x(0) = ẋ(0) = 0, ẍ(0) = 1. Solution. Applying the formula given in 5. above to f′(t), and using the t-derivative rule yet again, L(f′′′(t); s) = s^{3}L(f(t); s) − s^{2}f(0) − sf′(0) − f′′(0): so s^{3}X(s) − 1 + s^{2}X(s) + sX(s) + X(s) = 0, or X(s) = 1/p(s) = 1/(s + 1)(s^{2} + 1). Separate this using partial fractions: \frac{1}{(s + 1)(s^{2} + 1)} = \frac{a}{s + 1} + \frac{bs + c}{s^{2} + 1}. I’ll illustrate the “cover-up method”: Multiply through by s + 1 and then set s = −1: a = 1/2. Then multiply through by

s^{2} +1 and then set s = i: bi+c = \frac{1}{1 + i} = \frac{1 − i}{2}, so b = −1/2, c = 1/2: \frac{1}{(s + 1)(s^{2} + 1)} =

\frac{1}{2} (\frac{1}{s + 1} + \frac{−s + 1}{s^{2} + 1}). Thus by the table of values, x(t) = (1/2)(e^{−t} − cos(t) + sin(t)).

10. Consider the linear autonomous system \{ \begin{matrix}ẋ & = & y \\ ẏ & = & 2x − y. \end{matrix}

(a) Write down the second-order homogeneous linear equation which leads to this system by “anti-elimination.”

Solution. ẍ + ẋ − 2x = 0.

(b) Write the system as a vector-valued differential equation of the form ˙ x⃗ = Ax⃗. Find the eigenvalues of the matrix A, and for each eigenvalue find a nonzero eigenvector. Write down the normal modes (i.e., the exponential solutions).

Solution. A = [ \begin{matrix}0 & 1 \\ 2 & −1 \end{matrix} ]. The characteristic polynomial is λ^{2} + λ − 2 = (λ − 1)(λ + 2).

The eigenvalues are λ_{1} = 1, λ_{2} = −2. An eigenvector for λ_{1} is [ \begin{matrix}1 \\ 1 \end{matrix} ], for λ_{2} is [ \begin{matrix}1 \\ −2 \end{matrix} ].

Normal modes are e^{t} [ \begin{matrix}1 \\ 1 \end{matrix} ] and e^{−2t} [ \begin{matrix}1 \\ −2 \end{matrix} ].

(c) Write down a fundamental matrix for this system, and then normalize it to find e^{At}.

Solution. Φ(t) = [ \begin{matrix}e^{t} & e^{−2t} \\ e^{t} & −2e^{−2t} \end{matrix} ]. Φ(0) = [ \begin{matrix}1 & 1 \\ 1 & −2 \end{matrix} ]; Φ(0)^{−1} = \frac{1}{2} [ \begin{matrix}2 & 1 \\ 1 & −1 \end{matrix} ]; e^{At} =

Φ(t)Φ(0)^{−1} = \frac{1}{3} [ \begin{matrix}2e^{t} + e^{−2t} & e^{t} − e^{−2t} \\ 2e^{t} − 2e^{−2t} & e^{t} + 2e^{−2t} \end{matrix} ].

Not unrelated is:

11. Consider the nonlinear autonomous system \{ \begin{matrix}ẋ & = & y − 1 \\ ẏ & = & x^{2} − y. \end{matrix}

(a) Find the critical points of this system. Compute the Jacobian, evaluate it at each critical point, and decide the type of each critical point: saddle, unstable or stable spiral, unstable or stable node.

Solution. ẋ = 0 ⇒ y = 1, and then ẏ = 0 ⇒ x = ±1. J(x, y) = [ \begin{matrix}0 & 1 \\ 2x & −1 \end{matrix} ], so

J(−1, 1) = [ \begin{matrix}0 & 1 \\ −2 & −1 \end{matrix} ]. Its characteristic polynomial λ^{2} + λ + 2 leads to a stable spiral,

which winds clockwise. J(1, 1) = [ \begin{matrix}0 & 1 \\ 2 & −1 \end{matrix} ] is the matrix we analyzed above; it gives a

saddle.

(b) Sketch the phase portrait of this system in a region including all the critical points. Mark the direction of travel on the trajectories.

12. Consider the Airy equation y′′ + xy = 0. Let ca(x) be the solution satisfying ca(0) = 1, ca′(0) = 0, and let sa(x) be the solution satisfying sa(0) = 0, sa′(0) = 1. The Wronskian of these two solutions is w(x) = ca(x)sa′(x) − ca′(x)sa(x).

Compute w′(x) and w(0), and then solve this initial value problem to find w(x). Explain why sa(a) ≠ 0 whenever ca(a) = 0. [Hint: suppose both were zero.]

Solution. w′ = ca′sa′+casa′′−ca′′sa−ca′sa′ = ca(−xsa)−(−xca)sa = 0. (This calculation works whenever there is no damping term.) Thus w is constant. Evaluating at x = 0 shows that w = 1. If sa(a) = ca(a) = 0, then both terms in the definition of w(a) would vanish.

(b) Explain why ca′(a) ≠ 0 whenever ca(a) = 0. [Hint: suppose both were zero.]

Solution. If ca′(a) = 0 = ca(0) then again both terms in the definition of w(a) would vanish.

(c) Then use this information to show that if a, b are numbers such that a < b and ca(a) = ca(b) = 0 but ca(x) ≠ 0 for all x between a and b, then there is a number c such that a < c < b and sa(c) = 0. [This is analogous to the behavior of cos(x), sin(x): their zeros alternate.]

Solution. ca′(a) ≠ 0 by (b). Suppose ca′(a) > 0. Then ca(x) > 0 in (a, b), and ca′(b) < 0. Now 1 = w(a) = −ca′(a)sa(a) implies that sa(a) < 0, and 1 = w(b) = −ca′(b)sa(b) implies that sa(b) > 0. Thus somewhere between a and b, sa must vanish (by the “intermediate value theorem”). The argument in case ca′(a) < 0 is exactly the same.

13. Let f(t) be the function which is periodic of period 2π and given by f(t) = t for −π/2 < t < π/2, f(t) = π − t for π/2 < t < 3π/2.

(a) Find the Fourier coefficients of f(t).

Solution. f(t) is odd so a_{n} = 0 for all n. b_{n} = \frac{2}{π} ∫_{0}^{π} f(t) sin(nt) dt. In the interval [0, π],

f(t) is even around π/2, while sin(nt) is odd around π/2 if n is even, and even if n is odd. Thus f(t) sin(nt) is odd around π/2 if n is even, and even if n is odd, so b_{n} = 0

for n is even and if n is odd b_{n} = \frac{4}{π} ∫_{0}^{π/2} t sin(nt) dt. When we integrate this by parts

the first term vanishes, leaving b_{n} = \frac{4}{π} [\frac{1}{n^{2}} sin(nt)]_{0}^{π/2}. The lower limit is zero, and the

upper limit depends upon the parity of (n − 1)/2: for n odd, b_{n} = \frac{4}{π} \frac{(−1)^{(n−1)/2}}{n^{2}} . With j = (n − 1)/2,

f(t) = \frac{4}{π} ∑_{n=1, odd}^{∞} \frac{(−1)^{(n−1)/2}}{n^{2}} sin(nt).

(b) Suppose a system controlled by the differential operator L = D^{2} + kI is driven by f(t). Find all solutions of Lx = f(t) which are periodic of period 2π. Your answer will depend upon k.

Solution By periodicity, x = \frac{a_{0}}{2} + ∑_{n=1}^{∞}(a_{n} cos(nt) + b_{n} sin(nt)). Differentiating twice and

adding kx, ẍ + kx = \frac{ka_{0}}{2} + ∑_{n=1}^{∞}(k − n^{2})(a_{n} cos(nt) + b_{n} sin(nt)). Equating coefficients, if k is not a square integer, a_{n} = 0, b_{n} = 0 for n even, and b_{n} = \frac{4}{π} \frac{(−1)^{(n−1)/2}}{n^{2}(k − n^{2})} if n is odd:

x = \frac{4}{π} (\frac{sin(t)}{k − 1} − \frac{sin(3t)}{9(k − 9)} + ⋯) .

If k is an odd square, there is no possible value of b_{n}, and this shows that there are no periodic solutions: an overtone of the forcing term is in resonance with the system. If k is an even square, say k = n^{2}, the corresponding Fourier coefficients a_{n}, b_{n}, are zero in the forcing term, so there is no resonance. Instead, the displayed solution is not the only periodic one, but may be altered by adding a cos(nt) + b sin(nt): the general solution is periodic.

(c) If we have a bar of metal extending from x = 0 to x = π, whose heat distribution is

governed by the equation \frac{∂u}{∂t} = \frac{∂^{2}u}{∂x^{2}}, and we keep the ends fixed at 0 degrees, what is u(x, t) if u(x, 0) = f(x)?

Solution. The coefficients b_{n} in the solution u(x, t) = ∑_{n=1}^{∞} b_{n}e^{−n^{2}t} sin(nx) are the Fourier

coefficients of the odd extension of u(x, 0) to [−π, π]; so

u(x, t) = \frac{4}{π} ∑_{n=1, odd}^{∞} \frac{(−1)^{(n−1)/2}}{n^{2}} e^{−n^{2}t} sin(nx).