18.03 Problem Set 1 Solutions

Part I.

(In general, Part I solutions will be omitted, except for remarks worth seeing.)

1. EP 1.4 #1. Clearly y = 0 is a solution. (We’re led to consider this case separately, because we’ll want to divide by y.) We next look for other solutions. Then (as y ≠ 0),

\frac{1}{y} \frac{dy}{dx} = −2x.

By separation of variables, ln|y| = −x^{2}+C where C is a real number. Thus |y| = e^{−x^{2}+C}, which we can rewrite as |y| = C_{2}e^{−x^{2}} where C_{2} is a positive real number. We can also get rid of the absolute value sign, so y = C_{3}e^{−x^{2}} where C_{3} is a non-zero real number. Finally, we can combine these solutions with the solution y = 0 found earlier: in conclusion, all solutions are of the form y = C_{4}e^{−x^{2}} where C_{4} is any real number. (We check that y′ + 2xy is indeed 0 to make sure we didn’t make any arithmetic mistakes.)

EP 1.4, #2. The problem is similar to the previous one. Clearly y = 0 is a solution. We next look for other solutions. Then (as y ≠ 0), \frac{1}{y^{2}} \frac{dy}{dx} = −2x, so −\frac{1}{y} = −x^{2} + C where C is a real number. We can rewrite this as y = −\frac{1}{x^{2}+C}. Thus all solutions are given by y = 0 or y = −\frac{1}{x^{2}+C}. (Once again, we check that y′ + 2xy^{2} is indeed 0 to check for errors in computation.)

Remarks. (i) Do you see how y = 0 “fits in” with the other solutions? Hint: What happens when C gets large? Also, look at the direction field. (ii) Notice how the original differential equations in 1 and 2 look very similar, yet the solutions seem quite different.

Part II.

1. (a) Take the derivative of x^{2} + 2y^{2} = c with respect to x to get 2x + 4yy′ = 0, from which y′ = −\frac{x}{2y}. The orthogonal family of curves satisfies differential equation y′ = \frac{2y}{x}, which we can solve using separation of variables. y = 0 and x = 0 are solutions to the differential equation. (What happens when x = 0? How does this satisfy the differential equation? You aren’t responsible for understanding this, but you might want to fit it into your mental picture of how differential equations work.) We look for other solutions.

By separation of variables (for x, y ≠ 0), ln|y| = 2ln|x| + C, so |y| = e^{C}|x|^{2} = e^{C}x^{2}. We can rewrite this as y = C_{2}x^{2} where C_{2} is a positive real number. Rewrite this as y = C_{3}x^{2} where C_{3} is a non-zero real number.

Collating all solutions, the orthogonal family consists of curves y = C_{4}x^{2} where C_{4} is any real number, and the line x = 0.

(b) We start in the same way: the orthogonal family satisfies the differential equation y′ = \frac{ay}{x}. x = 0 and y = 0 are solutions, and to find other solutions we separate variables to get ln|y| = aln|x| + C, so |y| = C_{2}|x|^{a} where C_{2} is a positive real number. Rewrite this as y = C_{3}|x|^{a} where C_{3} is a non-zero real number.

Collating all solutions, the orthogonal family consists of curves y = C_{4}|x|^{a} where C_{4} is any real number, and the line x = 0. (Notice that there is still an absolute value sign around x, which was redundant and hence omitted in the previous case!)

2. (See attached figure.) The isocline for slope zero is the curve y^{3} − 3y = x. To get a nice picture of it you can notice that it crosses the line x = 0 at y = 0 and y = ±\sqrt{3}. Moreover, dx/dy = 3(y^{2} − 1) has zeros at y = ±1, or more precisely at (−1, 2) and (1, −2). As x grows, the separatrix becomes more and more horizontal but continues to have positive slope, so it is slightly above the zero isocline but the two curves are asymptotic. Similarly, as x decreases to −∞ the separatrix continues to have positive slope and so it lies slightly above the zero isocline but the two curves are asymptotic. The zero isocline runs along the crest of the hill, where the slope of cross-sections is zero.

It is an interesting fact, though not one I care to try to prove to you, that the separatrix is the only solution to the differential equation which is defined for all time. All others peel off and head for either +∞ or −∞ in finite time. The are like the solutions 2/(c−x) of the ODE dy/dx = y^{2}/2 that we studied in the first lecture: the all blow up (or down). This is quite common among nonlinear equations. Solutions with a given initial condition (x_{0}, y_{0}) are only guaranteed to exist in a small interval around x_{0}. In contrast, every initial condition in a linear first order ODE leads to a solution which does not blow up unless the coefficients do.

3. Let g be the intended final amount of savings (the “goal”, in this case 10^{6})

(a) The amount of money added to the account in a (small) unit of time Δt is only interest:

x(t + Δt) = x(t) + Ix(t)Δt.

Turn this into a differential equation:

\frac{x(t + Δt) − x(t)}{Δt} = Ix(t)

becomes \frac{dx}{dt} = Ix. Solve this differential equation to get x = Ce^{It}. We now find C, the only unknown, in terms of the “inputs” g, T, I. After time T, we have g dollars, i.e. Ce^{IT} = g, so C = ge^{−IT}. Thus (once we know I, T, and g) we know everything. In the example, IT = 2, g = 10^{6}, so C = 10^{6}e^{−2}, which is approximately 135335.28. Thus ρ_{A} = e^{2}, which is about 7.39 as desired.

(b) This time, the oey added to the account in time Δt is the interest, plus a constant contribution kΔt. Thus

x(t + Δt) = x(t) + Ix(t)Δt + kΔt

from which we get \frac{dx}{dt} − Ix = k. This is a first order equation, so we can solve it. We multiply by an integrating factor is e^{−It} to get

\frac{d}{dt} (e^{−It}x) = ke^{−It}.

Integrating and simplifying, we get x = −\frac{k}{I} + Ce^{It} as the general solution. We now have two variables to work out: the contribution k and the constant C, in terms of the inputs T, g, and I.

But 0 = x(0) = −\frac{k}{I} + C and g = x(T) = −\frac{k}{I} + e^{IT}, so C = \frac{g}{e^{IT} −1} and k = g \frac{I}{e^{IT} −1}. The total investment is kT, so

ρ_{b} = \frac{g}{kT} = \frac{e^{IT} − 1}{IT} = \frac{e^{2} − 1}{2},

as desired.

With T = 20, I = .1, and g = 10^{6}, the monthly contribution is k/12 (our time units are years), which works out to about $1304.31.

(c) The rate of contribution (in units of dollars per year) starts at some unknown k, and drops linearly to 0 at time T, so it is given by the function k(1 − t/T). Hence

x(t + Δt) = x(t) + Ix(t)Δt + k (1 − \frac{t}{T} ) Δt.

from which we get the differential equation

\frac{dx}{dt} − Ix = k (1 − \frac{t}{T} ) .

The integrating factor is again e^{−It}:

\frac{d}{dt} (e^{−It}x) = k (1 − \frac{t}{T} ) e^{−It}.

Now

x(t) = Ce^{It} + \frac{k}{IT} (t − T + \frac{1}{I}) = Ce^{It} + \frac{k}{I^{2}T} (1 − I(T − t)).

We again have two unknowns k and C (to determine in terms of the inputs g, T, and I). But we know that

g = x(T) = ce^{IT} + \frac{k}{I^{2}T}

and

0 = x(0) = c + \frac{k}{I^{2}T} (1 − IT).

Multiply the second equation by e^{IT} and subtract to get

g = \frac{k}{I^{2}T} (1 + (IT − 1)e^{IT} )

i.e.

k = g \frac{I^{2}T}{1 + (IT − 1)e^{IT}} .

The total investment is kT/2, so

ρ_{C} = g/(kT/2) = 2\frac{1 + (IT − 1)e^{IT}}{(IT)^{2}} .

When IT = 2, ρ_{C} = \frac{e^{2}+1}{2} as desired. The initial monthly contribution is k/12; with our values for I, T, g this is \frac{1}{12}10^{6} \frac{2}{1+e^{2}} which is about $ 1986.71.

Remark: Do you see why all of these answers depend only on IT and not on I and T separately?

4. This is an example of the substitution method. As y = \frac{1}{z} − x,

\frac{dy}{dx} = −\frac{1}{z^{2}} \frac{dz}{dx} − 1.

Substituting both of these equations into (1), we get:

−\frac{1}{z^{2}} \frac{dz}{dx} − 1 = (\frac{1}{z} − x)^{2} − x^{2} − 1
−\frac{1}{z^{2}} \frac{dz}{dx} = \frac{1}{z^{2}} − 2\frac{x}{z}
\frac{dz}{dx} = −1 + 2zx

We can solve this by multiplying by an integrating factor of e^{∫_{0}^{x} −2t} = e^{−x^{2}}. This gives us

\frac{d}{dx} (e^{−x^{2}}z) = e^{−x^{2}}z′ − 2xe^{−x^{2}}z = e^{−x^{2}}.

Integrating both sides gives us e^{−x^{2}}z = erf(x) + C for some real number C. Thus

\frac{1}{x + y} = z = e^{x^{2}}(erf(x) + C),

so

y = \frac{e^{−x^{2}}}{erf(x) + C} − x.

Why don’t we see the solution y = −x here? Where did we lose it? Can you see how it “fits into the family”?