←
Mathematics — Grade 12, Part II
DIFFERENTIAL EQUATIONS · 3 / 7
⌕
Chapter 3 of 7

DIFFERENTIAL EQUATIONS

19 sections · 7,519 words

Chapter 9: Differential Equations

38 words · 1 min read

Chapter 9

Differential Equations

Big idea: many laws of nature do not tell you a quantity directly. They tell you how fast it changes. A differential equation states such a law, and solving it recovers the quantity itself.

9.1 Introduction

387 words · 2 min read

A cup of hot drink stands in a room at 20°20°C. You notice that it cools quickly at first, and then more and more slowly. The hotter the drink is compared with the room, the faster it loses heat. A simple law says this exactly: the rate of cooling is proportional to the temperature difference. In symbols, with TT the temperature after tt minutes,

dTdt=−0.1 (T−20).\frac{dT}{dt} = -0.1\,(T - 20).

This is a differential equation: an equation that contains the derivative of an unknown function. It does not give TT. It gives a rule about how TT changes. To find TT, you have to solve the equation. If the drink starts at 80°80°C, the solution is

T(t)=20+60 e−0.1t.T(t) = 20 + 60\,e^{-0.1t}.

You can check this by differentiating: dTdt=−6 e−0.1t\frac{dT}{dt} = -6\,e^{-0.1t}, and −0.1 (T−20)=−0.1⋅60 e−0.1t=−6 e−0.1t-0.1\,(T - 20) = -0.1 \cdot 60\,e^{-0.1t} = -6\,e^{-0.1t}. They match. After 1010 minutes the temperature is T(10)=20+60e−1≈42.07°T(10) = 20 + 60e^{-1} \approx 42.07°C. The computer confirmed this by solving the equation step by step on its own, without using the formula.

The solution T = 20 + 60e^(−0.1t). It never quite reaches the room temperature (dashed line), but gets as close as you like.

You already know the simplest kind. In Chapter 7 you solved dydx=2x\frac{dy}{dx} = 2x by integrating: y=x2+Cy = x^2 + C. Every integral is the solution of a differential equation of the form dydx=f(x)\frac{dy}{dx} = f(x). The equations in this chapter are harder, because the right side may contain yy too, as in dydx=x y\frac{dy}{dx} = x\,y. You will need all your integration skills.

Differential equations appear wherever something changes according to a rule: cooling and heating, the growth of a population, a decaying radioactive sample, the motion of a falling object, the charging of a battery, the spread of a rumour.

In this chapter you will learn: how to describe a differential equation by its order and degree; what a general and a particular solution are; and three methods to solve first-order equations: variables separable, homogeneous and linear.

9.2 Basic Concepts

405 words · 2 min read

A differential equation is an equation that contains an unknown function of one variable together with its derivatives. We write the derivatives as dydx\frac{dy}{dx}, d2ydx2\frac{d^2y}{dx^2}, ... or in the short form y′y', y′′y'', ... Here are some examples:

  • dydx=2y\dfrac{dy}{dx} = 2y (the rate of growth is twice the value),
  • y′′+y=0y'' + y = 0 (the second derivative is the negative of the function),
  • x y′=y+xx\,y' = y + x.

In this chapter there is only one independent variable (such as xx or tt), so these are ordinary differential equations.

A solution of a differential equation is a function that makes the equation true when you put it in. To test a candidate, calculate its derivatives and substitute.

Test 1. Is y=3e2xy = 3e^{2x} a solution of y′=2yy' = 2y? Differentiate: y′=6e2xy' = 6e^{2x}. And 2y=6e2x2y = 6e^{2x}. They are equal for every xx, so yes. (At x=0x = 0 both sides equal 66.) What about y=e3xy = e^{3x}? Then y′=3e3xy' = 3e^{3x} but 2y=2e3x2y = 2e^{3x}, which is different, so no. The computer checked both claims at several values of xx.

Test 2. Is y=2cos⁡x+5sin⁡xy = 2\cos x + 5\sin x a solution of y′′+y=0y'' + y = 0? We get y′=−2sin⁡x+5cos⁡xy' = -2\sin x + 5\cos x and y′′=−2cos⁡x−5sin⁡xy'' = -2\cos x - 5\sin x, which is exactly −y-y. So y′′+y=0y'' + y = 0. Yes.

Take y′=2yy' = 2y again. The function y=C e2xy = C\,e^{2x} is a solution for every number CC. Each value of CC gives one curve, and every curve in the picture satisfies the same equation. The equation does not choose between them. To choose one, you need extra information, such as the value of yy at one point. That is the topic of Section 9.3.

Some solutions y = Ce^(2x) of y′ = 2y, for C = −2, −1, 1, 2. The axis y = 0 (C = 0) is a solution too.
Common mistake: thinking a differential equation has one answer. It usually has infinitely many solutions. It has a single answer only after you add conditions.

9.2.1. Order of a differential equation

164 words · 1 min read

The order of a differential equation is the order of the highest derivative that appears in it. First derivative: order 11. Second derivative: order 22. And so on. Only the highest derivative counts. The unknown function itself (order 00) and any lower derivatives do not change the order.

EquationHighest derivativeOrder
dydx=x+y\dfrac{dy}{dx} = x + yy′y'11
y′′+4y=0y'' + 4y = 0y′′y''22
y′′′+x y′′+y=sin⁡xy''' + x\,y'' + y = \sin xy′′′y'''33
(y′′)2+y′=0(y'')^2 + y' = 0y′′y''22
In simple words: the order tells you how many times you had to differentiate. It also tells you how many arbitrary constants the general solution has (Section 9.3).
Common mistake: confusing a power with an order. In (y′)3+y=0(y')^3 + y = 0 the highest derivative is y′y', so the order is 11, even though it is cubed. The small number 33 is a power, not an order.

9.2.2 Degree of a differential equation

342 words · 2 min read

The degree is defined only when the equation is a polynomial in its derivatives. Then the degree is the power of the highest-order derivative.

Before you read off the degree, clear any roots or fractions that contain derivatives, so that the equation is a polynomial in y′,y′′,…y', y'', \dots. Then look at the highest derivative and find its power.

EquationOrderDegreeWhy
y′′+3(y′)2+y=0y'' + 3(y')^2 + y = 02211highest derivative y′′y'' has power 11
(y′′)3+(y′)2+y=0(y'')^3 + (y')^2 + y = 02233highest derivative y′′y'' is cubed
y′′=1+y′y'' = \sqrt{1 + y'}22square both sides: (y′′)2=1+y′(y'')^2 = 1 + y'
sin⁡(y′)+y=x\sin(y') + y = x1not definedthe derivative is inside a sine, so it is not a polynomial
y=x y′+(y′)2y = x\,y' + (y')^212highest derivative y′y' has power 22

Notice two things. First, in sin⁡(y′)+y=x\sin(y') + y = x the derivative sits inside a sine function. A sine is not a polynomial, so the degree is not defined. Second, the power of yy itself does not matter: y′+y5=0y' + y^5 = 0 has degree 11 because y′y' appears to the first power.

Common mistake: looking at the power of yy instead of the power of the highest derivative. Also, do not forget to clear a root first. Written as y′′=1+y′y'' = \sqrt{1 + y'}, the equation looks like degree 11, but after squaring it is degree 22.

State the order and degree of each equation.

  1. y′′′+(y′)4+y=0y''' + (y')^4 + y = 0
  2. y′+ey′=xy' + e^{y'} = x
  3. y′′+(y′)3+6y=0y'' + (y')^3 + 6y = 0

Answers

  1. Order 3, degree 1. The highest derivative is y′′′y''', to the first power.
  2. Order 1, degree not defined. The derivative is inside an exponential, which is not a polynomial.
  3. Order 2, degree 1. The highest derivative is y′′y'' (power 11). The cube on y′y' is a lower derivative, so it does not matter.

EXERCISE 9.1

204 words · 1 min read
  1. State the order and the degree (if defined) of dydx+y=ex\dfrac{dy}{dx} + y = e^x.
  2. State the order and the degree (if defined) of y′′+(y′)3+6y=0y'' + (y')^3 + 6y = 0.
  3. State the order and the degree (if defined) of (y′′′)2+(y′′)3+(y′)4+y5=0(y''')^2 + (y'')^3 + (y')^4 + y^5 = 0.
  4. State the order and the degree (if defined) of y′′′+2y′′+y′=0y''' + 2y'' + y' = 0.
  5. State the order and the degree (if defined) of (y′)2+x y=0(y')^2 + x\,y = 0.
  6. State the order and the degree (if defined) of y′′=cos⁡3x+sin⁡3xy'' = \cos 3x + \sin 3x.
  7. State the order and the degree (if defined) of sin⁡(y′′)+y=0\sin(y'') + y = 0.
  8. State the order and the degree (if defined) of x (y′′)2+y (y′)3+x3=0x\,(y'')^2 + y\,(y')^3 + x^3 = 0.
  9. State the order and the degree (if defined) of y′=1+(y′′)2y' = \sqrt{1 + (y'')^2}. (Square both sides first.)
  10. State the order and the degree (if defined) of y′′+ey′=0y'' + e^{y'} = 0.

Answers

  1. Order 1, degree 1.
  2. Order 2, degree 1.
  3. Order 3, degree 2.
  4. Order 3, degree 1.
  5. Order 1, degree 2.
  6. Order 2, degree 1.
  7. Order 2, degree not defined.
  8. Order 2, degree 2.
  9. Order 2, degree 2.
  10. Order 2, degree 1.

9.3. General and Particular Solutions of a Differential Equation

518 words · 2 min read

Look at the simplest equation dydx=2x\dfrac{dy}{dx} = 2x. Integrating gives y=x2+Cy = x^2 + C. Here CC is an arbitrary constant: you may choose any number. The result is the general solution. It describes all the solutions in one formula.

A particular solution is one single solution, obtained by giving the arbitrary constants definite values. Usually you do this using a condition, for example "the curve passes through the point (1,3)(1, 3)". Then 3=12+C3 = 1^2 + C, so C=2C = 2, and the particular solution is y=x2+2y = x^2 + 2.

The general solution y = x² + C is a whole family of parabolas. The condition "passes through (1, 3)" picks out the one with C = 2.

The general solution of an equation of order nn has nn independent arbitrary constants. The order tells you how many.

  • Order 11: one constant. Example: y′=2yy' = 2y has general solution y=C e2xy = C\,e^{2x}.
  • Order 22: two constants. Example: y′′+y=0y'' + y = 0 has general solution y=Acos⁡x+Bsin⁡xy = A\cos x + B\sin x. The computer checked, for several choices of AA and BB, that this is a solution.

A second-order equation needs two conditions. For y′′+y=0y'' + y = 0, suppose we are told y(0)=1y(0) = 1 and y′(0)=2y'(0) = 2. Since y=Acos⁡x+Bsin⁡xy = A\cos x + B\sin x and y′=−Asin⁡x+Bcos⁡xy' = -A\sin x + B\cos x, putting x=0x = 0 gives A=1A = 1 and B=2B = 2. So the particular solution is y=cos⁡x+2sin⁡xy = \cos x + 2\sin x. Check: y(0)=1y(0) = 1 and y′(0)=2y'(0) = 2.

A ball is thrown straight up. Its height hh (in metres) after tt seconds follows h′′=−10h'' = -10 (gravity slows it down by 1010 m/s every second). Integrate once: h′=−10t+C1h' = -10t + C_1. Integrate again: h=−5t2+C1t+C2h = -5t^2 + C_1 t + C_2. If the ball starts at ground level with speed 2020 m/s, then h(0)=0h(0) = 0 gives C2=0C_2 = 0, and h′(0)=20h'(0) = 20 gives C1=20C_1 = 20. So h=20t−5t2h = 20t - 5t^2. The ball is highest when h′=20−10t=0h' = 20 - 10t = 0, that is at t=2t = 2, where h=20h = 20 m. It is back on the ground at t=4t = 4 s.

Start from the family y=C e2xy = C\,e^{2x}. Differentiate: y′=2C e2xy' = 2C\,e^{2x}. The right side is 2y2y, so y′=2yy' = 2y. The constant has disappeared, and we have found the differential equation that this family satisfies.

Common mistake: counting constants that are not really independent. The family y=A ex+By = A\,e^{x + B} looks like it has two constants, but ex+B=eB exe^{x + B} = e^B\,e^x, so it equals A′exA'e^x with one constant A′=AeBA' = A e^B. It really has only one constant. (The computer confirmed 2ex+0.5=2e0.5ex2e^{x + 0.5} = 2e^{0.5}e^x.) The number of independent constants must equal the order.

EXERCISE 9.2

418 words · 2 min read
  1. Show that y=2x+3xy = 2x + \dfrac{3}{x} is a solution of x y′+y=4xx\,y' + y = 4x for x>0x > 0.
  2. Show that y=C e−3xy = C\,e^{-3x} is a solution of y′+3y=0y' + 3y = 0. Find CC if y(0)=5y(0) = 5, and then find y(1)y(1).
  3. Show that y=Acos⁡2x+Bsin⁡2xy = A\cos 2x + B\sin 2x is a solution of y′′+4y=0y'' + 4y = 0. Find the solution with y(0)=3y(0) = 3 and y′(0)=−4y'(0) = -4.
  4. Show that y=xln⁡xy = x\ln x is a solution of y′=yx+1y' = \dfrac{y}{x} + 1 for x>0x > 0.
  5. Is y=sin⁡xy = \sin x a solution of y′′+y=0y'' + y = 0? Is y=x2y = x^2?
  6. Show that y=C1ex+C2e2xy = C_1 e^{x} + C_2 e^{2x} is a solution of y′′−3y′+2y=0y'' - 3y' + 2y = 0. Find the solution with y(0)=1y(0) = 1 and y′(0)=0y'(0) = 0.
  7. Find the particular solution of y′=3x2−2xy' = 3x^2 - 2x that satisfies y(1)=4y(1) = 4.
  8. A population PP grows according to dPdt=0.05 P\dfrac{dP}{dt} = 0.05\,P, with P(0)=200P(0) = 200. Show that P=200 e0.05tP = 200\,e^{0.05t} and find P(20)P(20).

Answers

  1. y′=2−3x2y' = 2 - \dfrac{3}{x^2}, so x y′=2x−3xx\,y' = 2x - \dfrac{3}{x}. Adding yy: 2x−3x+2x+3x=4x2x - \dfrac{3}{x} + 2x + \dfrac{3}{x} = 4x. It matches.
  2. y′=−3C e−3x=−3yy' = -3C\,e^{-3x} = -3y, so y′+3y=0y' + 3y = 0. From y(0)=C=5y(0) = C = 5. Then y(1)=5e−3≈0.2489y(1) = 5e^{-3} \approx 0.2489.
  3. y′′=−4Acos⁡2x−4Bsin⁡2x=−4yy'' = -4A\cos 2x - 4B\sin 2x = -4y. Using y(0)=A=3y(0) = A = 3 and y′(0)=2B=−4y'(0) = 2B = -4, we get A=3A = 3 and B=−2B = -2. So y=3cos⁡2x−2sin⁡2xy = 3\cos 2x - 2\sin 2x.
  4. y′=ln⁡x+1y' = \ln x + 1. And yx+1=ln⁡x+1\dfrac{y}{x} + 1 = \ln x + 1. They are equal.
  5. y=sin⁡xy = \sin x: y′′=−sin⁡xy'' = -\sin x, so y′′+y=0y'' + y = 0. Yes. y=x2y = x^2: y′′=2y'' = 2, so y′′+y=2+x2≠0y'' + y = 2 + x^2 \ne 0. No.
  6. y′=C1ex+2C2e2xy' = C_1 e^x + 2C_2 e^{2x} and y′′=C1ex+4C2e2xy'' = C_1 e^x + 4C_2 e^{2x}. Then y′′−3y′+2y=(1−3+2)C1ex+(4−6+2)C2e2x=0y'' - 3y' + 2y = (1 - 3 + 2)C_1 e^x + (4 - 6 + 2)C_2 e^{2x} = 0. From the conditions, C1+C2=1C_1 + C_2 = 1 and C1+2C2=0C_1 + 2C_2 = 0, so C2=−1C_2 = -1 and C1=2C_1 = 2. The solution is y=2ex−e2xy = 2e^x - e^{2x} (it gives y(0)=1y(0) = 1, y′(0)=0y'(0) = 0).
  7. Integrating, y=x3−x2+Cy = x^3 - x^2 + C. At x=1x = 1: 0+C=40 + C = 4, so C=4C = 4. The solution is y=x3−x2+4y = x^3 - x^2 + 4.
  8. P′=0.05⋅200 e0.05t=0.05 PP' = 0.05 \cdot 200\,e^{0.05t} = 0.05\,P, and P(0)=200P(0) = 200. So it is the solution. P(20)=200e≈543.66P(20) = 200e \approx 543.66.

9.4. Methods of Solving First Order, First Degree Differential Equations

292 words · 1 min read

From here on we study equations of order 11 and degree 11. They can be written as dydx=f(x,y)\dfrac{dy}{dx} = f(x, y). There is no single method that solves all of them, but three types cover most of what you will meet. Learn to recognise the type first.

TypeIt looks likeMethodSection
Variables separabledydx=f(x) g(y)\dfrac{dy}{dx} = f(x)\,g(y)put all yy on one side, all xx on the other, integrate9.4.1
Homogeneousdydx=F ⁣(yx)\dfrac{dy}{dx} = F\!\left(\dfrac{y}{x}\right)substitute y=vxy = vx, then separate9.4.2
Lineardydx+P(x) y=Q(x)\dfrac{dy}{dx} + P(x)\,y = Q(x)multiply by an integrating factor9.4.3

An equation dydx=f(x,y)\dfrac{dy}{dx} = f(x, y) is homogeneous if replacing xx by λx\lambda x and yy by λy\lambda y does not change ff: f(λx,λy)=f(x,y)f(\lambda x, \lambda y) = f(x, y). This works exactly when ff can be written using only the ratio yx\frac{y}{x}. The computer tried several values of λ\lambda on each function:

f(x,y)f(x, y)Unchanged by x→λxx \to \lambda x, y→λyy \to \lambda y?Homogeneous?
x+yx\dfrac{x + y}{x}yesYes
x2+y2xy\dfrac{x^2 + y^2}{xy}yesYes
yx+tan⁡yx\dfrac{y}{x} + \tan\dfrac{y}{x}yesYes
x+yx + yno (it becomes λ(x+y)\lambda(x + y))No
x+yxy\dfrac{x + y}{xy}no (it becomes 1λ⋅x+yxy\frac{1}{\lambda}\cdot\frac{x + y}{xy})No
In simple words: if you can divide top and bottom by a power of xx and be left with only yx\frac{y}{x}, the equation is homogeneous.

Some equations belong to more than one type. For instance dydx=yx\frac{dy}{dx} = \frac{y}{x} is separable, homogeneous and linear. Use whichever method you find easiest.

9.4.1 Differential equations with variables separable

613 words · 3 min read

A first-order equation is variables separable if it can be written as

dydx=f(x) g(y),\frac{dy}{dx} = f(x)\,g(y),

a product of a function of xx only and a function of yy only. Then you can move everything with yy to one side and everything with xx to the other, and integrate each side.

The steps:

  1. Divide by g(y)g(y) and "multiply by dxdx" to separate: dyg(y)=f(x) dx\dfrac{dy}{g(y)} = f(x)\,dx.
  2. Integrate both sides: ∫dyg(y)=∫f(x) dx+C\displaystyle\int\frac{dy}{g(y)} = \int f(x)\,dx + C. One constant is enough.
  3. If you can, solve for yy. If not, leave the answer as a relation between xx and yy (an implicit solution).

Solve dydx=x y\dfrac{dy}{dx} = x\,y. Separate: dyy=x dx\dfrac{dy}{y} = x\,dx. Integrate: ln⁡∣y∣=x22+c\ln|y| = \dfrac{x^2}{2} + c. Then ∣y∣=ec ex2/2|y| = e^c\,e^{x^2/2}, so

y=C ex2/2.y = C\,e^{x^2/2}.

Here C=±ecC = \pm e^c may be positive or negative. The value C=0C = 0 (the solution y=0y = 0) also works. The computer checked this for C=2C = 2 and C=−3C = -3.

Solve dydx=1+y21+x2\dfrac{dy}{dx} = \dfrac{1 + y^2}{1 + x^2}. Separate: dy1+y2=dx1+x2\dfrac{dy}{1 + y^2} = \dfrac{dx}{1 + x^2}. Integrate: tan⁡−1y=tan⁡−1x+c\tan^{-1}y = \tan^{-1}x + c. Take the tangent of both sides and use the addition formula for tangent, writing k=tan⁡ck = \tan c:

y=x+k1−kx.y = \frac{x + k}{1 - kx}.

With k=2k = 2, the computer confirmed that y=x+21−2xy = \frac{x + 2}{1 - 2x} satisfies the equation at several points (away from x=12x = \frac{1}{2}).

Solve dydx=−xy\dfrac{dy}{dx} = -\dfrac{x}{y}. Separate: y dy=−x dxy\,dy = -x\,dx. Integrate: y22=−x22+c\dfrac{y^2}{2} = -\dfrac{x^2}{2} + c, which gives

x2+y2=C.x^2 + y^2 = C.

This is an implicit solution: a family of circles centred at the origin. The upper half of the circle with C=25C = 25 is the function y=25−x2y = \sqrt{25 - x^2}, and the computer confirmed that it satisfies the equation, and that the slope of the circle at the points (3,4)(3, 4), (4,3)(4, 3), (−3,4)(-3, 4) and (0,5)(0, 5) is −xy-\frac{x}{y}.

The solutions x² + y² = C of dy/dx = −x/y are circles. Each circle is one particular solution.

Solve dydx=y2\dfrac{dy}{dx} = y^2. Separate: dyy2=dx\dfrac{dy}{y^2} = dx. Integrate: −1y=x+c-\dfrac{1}{y} = x + c, so y=−1x+cy = -\dfrac{1}{x + c}. But we divided by y2y^2, which is not allowed if y=0y = 0. And y=0y = 0 is a solution of the equation (both sides are 00). It cannot be obtained from y=−1x+cy = -\frac{1}{x + c} for any cc. The computer confirmed that both y=−1x+2y = -\frac{1}{x + 2} and y=0y = 0 are solutions.

Return to the drink of Section 9.1: dTdt=−0.1 (T−20)\dfrac{dT}{dt} = -0.1\,(T - 20), T(0)=80T(0) = 80. Separate: dTT−20=−0.1 dt\dfrac{dT}{T - 20} = -0.1\,dt. Integrate: ln⁡∣T−20∣=−0.1t+c\ln|T - 20| = -0.1t + c. So T=20+A e−0.1tT = 20 + A\,e^{-0.1t}. From T(0)=80T(0) = 80 we get A=60A = 60. When does the drink reach 30°30°C? Solve 60e−0.1t=1060e^{-0.1t} = 10: t=10ln⁡6≈17.92t = 10\ln 6 \approx 17.92 minutes. A step-by-step numerical solution gives T=30T = 30 at that time.

Common mistakes: (1) adding a constant on both sides (one CC is enough); (2) dividing by an expression that could be zero without checking whether it gives an extra solution; (3) trying to separate an equation like dydx=x+y\frac{dy}{dx} = x + y, which is not a product, so it is not separable.

EXERCISE 9.3

368 words · 2 min read
  1. Solve dydx=yx\dfrac{dy}{dx} = \dfrac{y}{x} for x>0x > 0.
  2. Solve dydx=ex−y\dfrac{dy}{dx} = e^{x - y}.
  3. Solve (1+x2)dydx=x y(1 + x^2)\dfrac{dy}{dx} = x\,y.
  4. Solve dydx=2x (y+1)\dfrac{dy}{dx} = 2x\,(y + 1) with y(0)=1y(0) = 1.
  5. Solve dydx=ycos⁡x\dfrac{dy}{dx} = y\cos x with y(0)=2y(0) = 2.
  6. Solve xdydx+y=0x\dfrac{dy}{dx} + y = 0 for x>0x > 0. What is the solution through (1,4)(1, 4)?
  7. Solve dydx=y2x\dfrac{dy}{dx} = \dfrac{y^2}{x} for x>0x > 0. Is there a solution that this method misses?
  8. A population of bacteria satisfies dNdt=0.03 N\dfrac{dN}{dt} = 0.03\,N, with N(0)=500N(0) = 500. Find N(30)N(30).
  9. Find the curve through (0,4)(0, 4) whose slope at every point is −xy-\dfrac{x}{y}. (Take y>0y > 0.)

Answers

  1. Separate: dyy=dxx\dfrac{dy}{y} = \dfrac{dx}{x}. So ln⁡∣y∣=ln⁡x+c\ln|y| = \ln x + c, which gives y=Cxy = Cx.
  2. Write ex−y=exe−ye^{x - y} = e^x e^{-y}. Separate: ey dy=ex dxe^y\,dy = e^x\,dx. So ey=ex+Ce^y = e^x + C, and y=ln⁡(ex+C)y = \ln(e^x + C). (The computer checked this for C=1C = 1.)
  3. Separate: dyy=x1+x2 dx\dfrac{dy}{y} = \dfrac{x}{1 + x^2}\,dx. Then ln⁡∣y∣=12ln⁡(1+x2)+c\ln|y| = \dfrac{1}{2}\ln(1 + x^2) + c, so y=C1+x2y = C\sqrt{1 + x^2}.
  4. Separate: dyy+1=2x dx\dfrac{dy}{y + 1} = 2x\,dx. So ln⁡∣y+1∣=x2+c\ln|y + 1| = x^2 + c and y+1=Cex2y + 1 = Ce^{x^2}. From y(0)=1y(0) = 1: 2=C2 = C. The solution is y=2ex2−1y = 2e^{x^2} - 1.
  5. Separate: dyy=cos⁡x dx\dfrac{dy}{y} = \cos x\,dx. So ln⁡∣y∣=sin⁡x+c\ln|y| = \sin x + c and y=Cesin⁡xy = Ce^{\sin x}. From y(0)=2y(0) = 2: C=2C = 2. The solution is y=2esin⁡xy = 2e^{\sin x}.
  6. Separate: dyy=−dxx\dfrac{dy}{y} = -\dfrac{dx}{x}. So ln⁡∣y∣=−ln⁡x+c\ln|y| = -\ln x + c, and y=Cxy = \dfrac{C}{x} (that is, xy=Cxy = C). Through (1,4)(1, 4): C=4C = 4, so y=4xy = \dfrac{4}{x}.
  7. Separate: dyy2=dxx\dfrac{dy}{y^2} = \dfrac{dx}{x}. So −1y=ln⁡x+c-\dfrac{1}{y} = \ln x + c, which gives y=−1ln⁡x+Cy = -\dfrac{1}{\ln x + C}. The method divides by y2y^2, and it misses the solution y=0y = 0.
  8. Separate: dNN=0.03 dt\dfrac{dN}{N} = 0.03\,dt, so N=Ce0.03tN = Ce^{0.03t}, and C=500C = 500. Then N(30)=500e0.9≈1229.8N(30) = 500e^{0.9} \approx 1229.8.
  9. From Example 3, x2+y2=Cx^2 + y^2 = C. At (0,4)(0, 4): C=16C = 16 (the point gives y=4y = 4 at x=0x = 0). The curve is the upper half of the circle, y=16−x2y = \sqrt{16 - x^2}.

9.4.2 Homogeneous differential equations

606 words · 3 min read

An equation dydx=f(x,y)\dfrac{dy}{dx} = f(x, y) is homogeneous when ff depends only on the ratio yx\dfrac{y}{x}, that is, f(λx,λy)=f(x,y)f(\lambda x, \lambda y) = f(x, y) (Section 9.4). It is not separable directly, but a change of variable makes it so.

The method. Put y=v xy = v\,x, where vv is a new unknown function of xx. By the product rule,

dydx=v+x dvdx.\frac{dy}{dx} = v + x\,\frac{dv}{dx}.

Substitute into the equation. The ratio yx\frac{y}{x} becomes just vv, and the result is a separable equation in vv and xx. Solve it, then replace vv by yx\frac{y}{x}.

Solve dydx=x+yx\dfrac{dy}{dx} = \dfrac{x + y}{x}. Here x+yx=1+yx=1+v\dfrac{x + y}{x} = 1 + \dfrac{y}{x} = 1 + v. So v+xdvdx=1+vv + x\dfrac{dv}{dx} = 1 + v, which gives xdvdx=1x\dfrac{dv}{dx} = 1, that is dv=dxxdv = \dfrac{dx}{x}. Integrate: v=ln⁡∣x∣+Cv = \ln|x| + C. Replace v=yxv = \frac{y}{x}:

y=x (ln⁡∣x∣+C).y = x\,(\ln|x| + C).

The computer checked y=x(ln⁡x+2)y = x(\ln x + 2) against the equation for several x>0x > 0.

Solutions y = x(ln x + C) of dy/dx = (x + y)/x, for C = −1, 0, 1, 2.

Solve dydx=x2+y2xy\dfrac{dy}{dx} = \dfrac{x^2 + y^2}{xy}. Divide top and bottom by x2x^2: the right side is 1+v2v\dfrac{1 + v^2}{v}. So v+xdvdx=1+v2vv + x\dfrac{dv}{dx} = \dfrac{1 + v^2}{v}, hence xdvdx=1+v2v−v=1vx\dfrac{dv}{dx} = \dfrac{1 + v^2}{v} - v = \dfrac{1}{v}. Separate: v dv=dxxv\,dv = \dfrac{dx}{x}. Integrate: v22=ln⁡∣x∣+c\dfrac{v^2}{2} = \ln|x| + c. So y2=x2 (2ln⁡∣x∣+C)y^2 = x^2\,(2\ln|x| + C). For x>0x > 0 and y>0y > 0:

y=x2ln⁡x+C.y = x\sqrt{2\ln x + C}.

Solve dydx=yx+tan⁡yx\dfrac{dy}{dx} = \dfrac{y}{x} + \tan\dfrac{y}{x}. Then v+xdvdx=v+tan⁡vv + x\dfrac{dv}{dx} = v + \tan v, so xdvdx=tan⁡vx\dfrac{dv}{dx} = \tan v. Separate: cot⁡v dv=dxx\cot v\,dv = \dfrac{dx}{x}. Integrate: ln⁡∣sin⁡v∣=ln⁡∣x∣+c\ln|\sin v| = \ln|x| + c, so sin⁡v=Cx\sin v = Cx. Hence sin⁡yx=Cx\sin\dfrac{y}{x} = Cx, or y=xsin⁡−1(Cx)y = x\sin^{-1}(Cx).

Solve xdydx=y+x2+y2x\dfrac{dy}{dx} = y + \sqrt{x^2 + y^2} for x>0x > 0. Divide by xx: dydx=v+1+v2\dfrac{dy}{dx} = v + \sqrt{1 + v^2}. So v+xdvdx=v+1+v2v + x\dfrac{dv}{dx} = v + \sqrt{1 + v^2}, which gives dv1+v2=dxx\dfrac{dv}{\sqrt{1 + v^2}} = \dfrac{dx}{x}. Integrate: sinh⁡−1v=ln⁡x+c\sinh^{-1}v = \ln x + c, which gives v=sinh⁡(ln⁡x+c)v = \sinh(\ln x + c). Writing K=ecK = e^c and using sinh⁡u=eu−e−u2\sinh u = \frac{e^u - e^{-u}}{2}:

y=Kx2−1K2.y = \frac{K x^2 - \frac{1}{K}}{2}.

With K=1K = 1 this is y=x2−12y = \frac{x^2 - 1}{2}, and with K=2K = 2 it is y=x2−14y = x^2 - \frac{1}{4}. The computer checked both against the original equation.

Find the solution of dydx=x+yx\dfrac{dy}{dx} = \dfrac{x + y}{x} with y(1)=2y(1) = 2. From Example 1, y=x(ln⁡x+C)y = x(\ln x + C). At x=1x = 1: 2=1⋅(0+C)2 = 1\cdot(0 + C), so C=2C = 2. Then y(e)=e (1+2)=3e≈8.1548y(e) = e\,(1 + 2) = 3e \approx 8.1548. A step-by-step numerical solution of the equation from x=1x = 1 to x=ex = e agrees.

Common mistakes: (1) forgetting that dydx=v+xdvdx\frac{dy}{dx} = v + x\frac{dv}{dx}, not just xdvdxx\frac{dv}{dx}; (2) not simplifying the right side to a function of vv alone: if an xx is left over, the equation was not homogeneous; (3) forgetting to put v=yxv = \frac{y}{x} back at the end.

EXERCISE 9.4

462 words · 2 min read
  1. Solve dydx=x−yx\dfrac{dy}{dx} = \dfrac{x - y}{x} for x>0x > 0.
  2. Solve dydx=y+2xx\dfrac{dy}{dx} = \dfrac{y + 2x}{x} for x>0x > 0.
  3. Solve dydx=x2+2y2xy\dfrac{dy}{dx} = \dfrac{x^2 + 2y^2}{xy} for x>0x > 0, y>0y > 0.
  4. Solve dydx=yx+sin⁡yx\dfrac{dy}{dx} = \dfrac{y}{x} + \sin\dfrac{y}{x} for x>0x > 0.
  5. Which of these are homogeneous: (a) dydx=x2+y2xy\dfrac{dy}{dx} = \dfrac{x^2 + y^2}{xy}, (b) dydx=xy\dfrac{dy}{dx} = \dfrac{x}{y}, (c) dydx=x2−y22xy\dfrac{dy}{dx} = \dfrac{x^2 - y^2}{2xy}, (d) dydx=x3+y3x2y2\dfrac{dy}{dx} = \dfrac{x^3 + y^3}{x^2y^2}, (e) dydx=x+3y\dfrac{dy}{dx} = \dfrac{x + 3}{y}?
  6. Solve dydx=3x+2yx\dfrac{dy}{dx} = \dfrac{3x + 2y}{x} with y(1)=0y(1) = 0.
  7. Solve dydx=yx+y2x2\dfrac{dy}{dx} = \dfrac{y}{x} + \dfrac{y^2}{x^2} for x≥1x \ge 1.
  8. Solve dydx=x2+y2xy\dfrac{dy}{dx} = \dfrac{x^2 + y^2}{xy} with y(1)=1y(1) = 1 and find y(e)y(e).

Answers

  1. x−yx=1−v\dfrac{x - y}{x} = 1 - v, so v+xdvdx=1−vv + x\dfrac{dv}{dx} = 1 - v and xdvdx=1−2vx\dfrac{dv}{dx} = 1 - 2v. Separate: dv1−2v=dxx\dfrac{dv}{1 - 2v} = \dfrac{dx}{x}. Integrate: −12ln⁡∣1−2v∣=ln⁡x+c-\dfrac{1}{2}\ln|1 - 2v| = \ln x + c, so 1−2v=Kx21 - 2v = \dfrac{K}{x^2} and y=x2−K2xy = \dfrac{x^2 - K}{2x}. (The computer checked K=1K = 1.)
  2. y+2xx=v+2\dfrac{y + 2x}{x} = v + 2, so xdvdx=2x\dfrac{dv}{dx} = 2, v=2ln⁡x+Cv = 2\ln x + C, and y=x (2ln⁡x+C)y = x\,(2\ln x + C).
  3. The right side is 1+2v2v\dfrac{1 + 2v^2}{v}, so xdvdx=1+v2vx\dfrac{dv}{dx} = \dfrac{1 + v^2}{v}. Separate: v dv1+v2=dxx\dfrac{v\,dv}{1 + v^2} = \dfrac{dx}{x}. Then 12ln⁡(1+v2)=ln⁡x+c\dfrac{1}{2}\ln(1 + v^2) = \ln x + c, so 1+v2=Kx21 + v^2 = Kx^2 and y=xKx2−1y = x\sqrt{Kx^2 - 1}. (Checked for K=2K = 2.)
  4. xdvdx=sin⁡vx\dfrac{dv}{dx} = \sin v. Separate: csc⁡v dv=dxx\csc v\,dv = \dfrac{dx}{x}. Integrate: ln⁡∣tan⁡v2∣=ln⁡x+c\ln\left|\tan\dfrac{v}{2}\right| = \ln x + c, so tan⁡y2x=Cx\tan\dfrac{y}{2x} = Cx and y=2xtan⁡−1(Cx)y = 2x\tan^{-1}(Cx). (Checked for C=1C = 1.)
  5. (a), (b), (c) are homogeneous: each is unchanged when x→λxx \to \lambda x, y→λyy \to \lambda y. (d) is not: the right side becomes 1λ⋅x3+y3x2y2\frac{1}{\lambda}\cdot\frac{x^3 + y^3}{x^2y^2} (degree 33 on top, degree 44 below). (e) is not: the number 33 breaks it.
  6. The right side is 3+2v3 + 2v, so xdvdx=3+vx\dfrac{dv}{dx} = 3 + v. Separate: dv3+v=dxx\dfrac{dv}{3 + v} = \dfrac{dx}{x}. Integrate: 3+v=Kx3 + v = Kx, so y=Kx2−3xy = Kx^2 - 3x. From y(1)=K−3=0y(1) = K - 3 = 0: K=3K = 3. The solution is y=3x2−3xy = 3x^2 - 3x.
  7. v+xdvdx=v+v2v + x\dfrac{dv}{dx} = v + v^2, so dvv2=dxx\dfrac{dv}{v^2} = \dfrac{dx}{x}. Then −1v=ln⁡x+C-\dfrac{1}{v} = \ln x + C, so y=−xln⁡x+Cy = -\dfrac{x}{\ln x + C}. (Checked for C=1C = 1.)
  8. From Example 2, y2=x2(2ln⁡x+C)y^2 = x^2(2\ln x + C). At (1,1)(1, 1): 1=C1 = C. So y=x2ln⁡x+1y = x\sqrt{2\ln x + 1} and y(e)=e3≈4.7082y(e) = e\sqrt{3} \approx 4.7082. A step-by-step numerical solution agrees.

9.4.3 Linear differential equations

669 words · 3 min read

A first-order equation is linear if it can be written in the standard form

dydx+P y=Q,\frac{dy}{dx} + P\,y = Q,

where PP and QQ are functions of xx only (or constants). "Linear" means that yy and dydx\frac{dy}{dx} appear only to the first power and are not multiplied together.

Define the integrating factor I=e∫P dxI = e^{\int P\,dx}. It has the useful property I′=P II' = P\,I. Now multiply the whole equation by II and use the product rule:

ddx(y I)=y′I+y I′=I (y′+P y)=I Q.\frac{d}{dx}(y\,I) = y'I + y\,I' = I\,(y' + P\,y) = I\,Q.

The left side is the derivative of a single product. So we can integrate both sides:

y I=∫Q I dx+C.y\,I = \int Q\,I\,dx + C.

The steps:

  1. Write the equation in the standard form y′+Py=Qy' + Py = Q (divide by the coefficient of y′y' if needed).
  2. Find I=e∫P dxI = e^{\int P\,dx}. You do not need a constant here.
  3. Multiply the equation by II, and integrate: y I=∫Q I dx+Cy\,I = \int Q\,I\,dx + C.
  4. Divide by II to get yy.

The computer checked the property I′=P II' = P\,I for each integrating factor used below.

Solve dydx+2y=e−x\dfrac{dy}{dx} + 2y = e^{-x}. Here P=2P = 2, so I=e2xI = e^{2x}. Then (y e2x)′=e2xe−x=ex(y\,e^{2x})' = e^{2x}e^{-x} = e^{x}. Integrate: y e2x=ex+Cy\,e^{2x} = e^x + C. So

y=e−x+C e−2x.y = e^{-x} + C\,e^{-2x}.

Solutions y = e^(−x) + Ce^(−2x) for C = −2, −1, 0, 1, 2. The part with C dies away quickly, so all solutions follow the same curve for large x.

Solve dydx+yx=x2\dfrac{dy}{dx} + \dfrac{y}{x} = x^2 for x>0x > 0. Here P=1xP = \frac{1}{x}, so I=eln⁡x=xI = e^{\ln x} = x. Then (x y)′=x⋅x2=x3(x\,y)' = x\cdot x^2 = x^3. Integrate: x y=x44+Cx\,y = \dfrac{x^4}{4} + C, so y=x34+Cxy = \dfrac{x^3}{4} + \dfrac{C}{x}.

Solve (1+x2)dydx+2x y=11+x2(1 + x^2)\dfrac{dy}{dx} + 2x\,y = \dfrac{1}{1 + x^2}. Divide by 1+x21 + x^2 to reach the standard form: P=2x1+x2P = \dfrac{2x}{1 + x^2}, so I=eln⁡(1+x2)=1+x2I = e^{\ln(1 + x^2)} = 1 + x^2. Then (y (1+x2))′=11+x2\big(y\,(1 + x^2)\big)' = \dfrac{1}{1 + x^2}, so y (1+x2)=tan⁡−1x+Cy\,(1 + x^2) = \tan^{-1}x + C and

y=tan⁡−1x+C1+x2.y = \frac{\tan^{-1}x + C}{1 + x^2}.

A balance BB (in units) grows continuously at the rate 0.10.1 per year, and also receives steady deposits of 55 units per year. Then dBdt=0.1B+5\dfrac{dB}{dt} = 0.1B + 5, or dBdt−0.1B=5\dfrac{dB}{dt} - 0.1B = 5. Here P=−0.1P = -0.1 and I=e−0.1tI = e^{-0.1t}. So (B e−0.1t)′=5e−0.1t(B\,e^{-0.1t})' = 5e^{-0.1t}, and B e−0.1t=−50e−0.1t+CB\,e^{-0.1t} = -50e^{-0.1t} + C. Therefore B=Ce0.1t−50B = Ce^{0.1t} - 50. If B(0)=100B(0) = 100, then C=150C = 150 and B=150e0.1t−50B = 150e^{0.1t} - 50. After 1010 years, B(10)=150e−50≈357.74B(10) = 150e - 50 \approx 357.74. A step-by-step numerical solution agrees.

Sometimes it is easier to treat xx as the unknown and yy as the variable. The equation dxdy+P1 x=Q1\dfrac{dx}{dy} + P_1\,x = Q_1, with P1,Q1P_1, Q_1 functions of yy, is solved in exactly the same way, with I=e∫P1 dyI = e^{\int P_1\,dy}. For example, dxdy+x=y\dfrac{dx}{dy} + x = y has I=eyI = e^y, so x ey=(y−1)ey+Cx\,e^y = (y - 1)e^y + C and x=y−1+Ce−yx = y - 1 + Ce^{-y}. (The computer checked C=2C = 2.)

Common mistakes: (1) forgetting to divide by the coefficient of y′y' first, so that PP is wrong; (2) leaving out the constant CC when integrating Q IQ\,I; (3) dividing only part of the right side by II at the end. Divide every term, including CC.

EXERCISE 9.5

380 words · 2 min read
  1. Solve dydx+3y=e2x\dfrac{dy}{dx} + 3y = e^{2x}.
  2. Solve dydx+2yx=x\dfrac{dy}{dx} + \dfrac{2y}{x} = x for x>0x > 0.
  3. Solve dydx+ycot⁡x=2cos⁡x\dfrac{dy}{dx} + y\cot x = 2\cos x for 0<x<π0 < x < \pi.
  4. Solve dydx−y=sin⁡x\dfrac{dy}{dx} - y = \sin x.
  5. Solve dydx+y=x\dfrac{dy}{dx} + y = x with y(0)=1y(0) = 1, and find y(2)y(2).
  6. Solve dxdy+2x=e−y\dfrac{dx}{dy} + 2x = e^{-y}, treating xx as the unknown.
  7. A capacitor charges according to dqdt+2q=4\dfrac{dq}{dt} + 2q = 4, with q(0)=0q(0) = 0. Find q(t)q(t) and q(1)q(1).
  8. Solve xln⁡x dydx+y=2ln⁡xx\ln x\,\dfrac{dy}{dx} + y = 2\ln x for x>1x > 1.

Answers

  1. I=e3xI = e^{3x}. (y e3x)′=e5x(y\,e^{3x})' = e^{5x}, so y e3x=e5x5+Cy\,e^{3x} = \dfrac{e^{5x}}{5} + C and y=e2x5+C e−3xy = \dfrac{e^{2x}}{5} + C\,e^{-3x}.
  2. P=2xP = \frac{2}{x}, so I=x2I = x^2. (x2y)′=x3(x^2y)' = x^3, so x2y=x44+Cx^2 y = \dfrac{x^4}{4} + C and y=x24+Cx2y = \dfrac{x^2}{4} + \dfrac{C}{x^2}.
  3. P=cot⁡xP = \cot x, so I=eln⁡sin⁡x=sin⁡xI = e^{\ln\sin x} = \sin x. (ysin⁡x)′=2sin⁡xcos⁡x=sin⁡2x(y\sin x)' = 2\sin x\cos x = \sin 2x, so ysin⁡x=−cos⁡2x2+Cy\sin x = -\dfrac{\cos 2x}{2} + C and y=C−12cos⁡2xsin⁡xy = \dfrac{C - \frac{1}{2}\cos 2x}{\sin x}. (Checked for C=1C = 1.)
  4. I=e−xI = e^{-x}. (y e−x)′=e−xsin⁡x(y\,e^{-x})' = e^{-x}\sin x. Integrating by parts twice (Chapter 7), ∫e−xsin⁡x dx=−e−x(sin⁡x+cos⁡x)2\int e^{-x}\sin x\,dx = -\dfrac{e^{-x}(\sin x + \cos x)}{2}. So y=−sin⁡x+cos⁡x2+C exy = -\dfrac{\sin x + \cos x}{2} + C\,e^{x}.
  5. I=exI = e^x. (y ex)′=x ex(y\,e^x)' = x\,e^x, so y ex=(x−1)ex+Cy\,e^x = (x - 1)e^x + C and y=x−1+Ce−xy = x - 1 + Ce^{-x}. From y(0)=−1+C=1y(0) = -1 + C = 1: C=2C = 2. Then y(2)=1+2e−2≈1.2707y(2) = 1 + 2e^{-2} \approx 1.2707. (A step-by-step numerical solution agrees.)
  6. I=e2yI = e^{2y}. (x e2y)′=ey(x\,e^{2y})' = e^{y}, so x e2y=ey+Cx\,e^{2y} = e^y + C and x=e−y+C e−2yx = e^{-y} + C\,e^{-2y}. (Checked for C=2C = 2.)
  7. I=e2tI = e^{2t}. (q e2t)′=4e2t(q\,e^{2t})' = 4e^{2t}, so q e2t=2e2t+Cq\,e^{2t} = 2e^{2t} + C. With q(0)=0q(0) = 0: C=−2C = -2. So q=2(1−e−2t)q = 2(1 - e^{-2t}) and q(1)=2(1−e−2)≈1.7293q(1) = 2(1 - e^{-2}) \approx 1.7293. As tt grows, qq approaches 22.
  8. Divide by xln⁡xx\ln x: y′+yxln⁡x=2xy' + \dfrac{y}{x\ln x} = \dfrac{2}{x}. P=1xln⁡xP = \dfrac{1}{x\ln x}, so I=eln⁡ln⁡x=ln⁡xI = e^{\ln\ln x} = \ln x. (yln⁡x)′=2ln⁡xx(y\ln x)' = \dfrac{2\ln x}{x}, so yln⁡x=(ln⁡x)2+Cy\ln x = (\ln x)^2 + C and y=ln⁡x+Cln⁡xy = \ln x + \dfrac{C}{\ln x}.

Miscellaneous Examples

622 words · 3 min read

Find the curve through (1,e)(1, e) whose slope at every point (x,y)(x, y) is yx2\dfrac{y}{x^2}. Separate: dyy=dxx2\dfrac{dy}{y} = \dfrac{dx}{x^2}. Integrate: ln⁡∣y∣=−1x+c\ln|y| = -\dfrac{1}{x} + c, so y=Ce−1/xy = Ce^{-1/x}. At (1,e)(1, e): e=Ce−1e = Ce^{-1}, so C=e2C = e^2. Hence y=e2−1/xy = e^{2 - 1/x}. Check: at x=1x = 1 this gives 2.71832.7183, which is ee.

A radioactive sample decays at a rate proportional to the amount present: dNdt=−kN\dfrac{dN}{dt} = -kN. Its half-life is 55 days. How much remains after 1515 days? The solution is N=N0e−ktN = N_0 e^{-kt}. Half-life 55 means e−5k=12e^{-5k} = \frac{1}{2}, so k=ln⁡25k = \frac{\ln 2}{5}. After 1515 days, N=N0e−3ln⁡2=N0(12)3=0.125 N0N = N_0 e^{-3\ln 2} = N_0\left(\frac{1}{2}\right)^3 = 0.125\,N_0. That is 18\frac{1}{8} of the original amount, as you expect from three halvings. A step-by-step numerical solution agrees.

Solve dydx=2x+yx+2y\dfrac{dy}{dx} = \dfrac{2x + y}{x + 2y}. Put y=vxy = vx: v+xdvdx=2+v1+2vv + x\dfrac{dv}{dx} = \dfrac{2 + v}{1 + 2v}, so xdvdx=2−2v21+2vx\dfrac{dv}{dx} = \dfrac{2 - 2v^2}{1 + 2v}. Separate: 1+2v1−v2 dv=2 dxx\dfrac{1 + 2v}{1 - v^2}\,dv = \dfrac{2\,dx}{x}. Use partial fractions: 1+2v(1−v)(1+v)=3/21−v−1/21+v\dfrac{1 + 2v}{(1 - v)(1 + v)} = \dfrac{3/2}{1 - v} - \dfrac{1/2}{1 + v}. Integrate and tidy up:

(x−y)3 (x+y)=K.(x - y)^3\,(x + y) = K.

This is an implicit solution. The computer checked, at the points (2,0)(2, 0), (8.5,7.5)(8.5, 7.5) and (2.125,−1.875)(2.125, -1.875) of the curve with K=16K = 16, that its slope equals 2x+yx+2y\frac{2x + y}{x + 2y}.

Solve dydx=yx(x+1)\dfrac{dy}{dx} = \dfrac{y}{x(x + 1)} for x>0x > 0. Separate: dyy=dxx(x+1)=(1x−1x+1)dx\dfrac{dy}{y} = \dfrac{dx}{x(x + 1)} = \left(\dfrac{1}{x} - \dfrac{1}{x + 1}\right)dx. Integrate: ln⁡∣y∣=ln⁡x−ln⁡(x+1)+c\ln|y| = \ln x - \ln(x + 1) + c. So y=C xx+1y = \dfrac{C\,x}{x + 1}.

A tank holds 5050 litres of pure water. Salt water with 33 grams of salt per litre flows in at 22 litres per minute, and the well-mixed liquid flows out at 22 litres per minute. Let SS be the grams of salt in the tank after tt minutes. Salt comes in at 3×2=63 \times 2 = 6 g/min. Salt leaves at S50×2=0.04 S\frac{S}{50} \times 2 = 0.04\,S g/min. So

dSdt+0.04 S=6,S(0)=0.\frac{dS}{dt} + 0.04\,S = 6, \qquad S(0) = 0.

This is linear with I=e0.04tI = e^{0.04t}. Then (S e0.04t)′=6e0.04t(S\,e^{0.04t})' = 6e^{0.04t}, so S e0.04t=150e0.04t+CS\,e^{0.04t} = 150e^{0.04t} + C. With S(0)=0S(0) = 0: C=−150C = -150. So S=150 (1−e−0.04t)S = 150\,(1 - e^{-0.04t}). After 2525 minutes, S=150(1−e−1)≈94.82S = 150(1 - e^{-1}) \approx 94.82 grams. In the long run the tank holds 150150 g, which is 5050 L ×\times 33 g/L, the concentration of the incoming water.

S(t) = 150(1 − e^(−0.04t)) approaches 150 g, the amount that matches the incoming concentration.

Solve dydx=ex+y\dfrac{dy}{dx} = e^{x + y}. Write ex+y=exeye^{x + y} = e^x e^y and separate: e−y dy=ex dxe^{-y}\,dy = e^x\,dx. Integrate: −e−y=ex+c-e^{-y} = e^x + c, so e−y=C−exe^{-y} = C - e^x and y=−ln⁡(C−ex)y = -\ln(C - e^x). This exists only while C−ex>0C - e^x > 0. For C=3C = 3, the solution stops at x=ln⁡3x = \ln 3, where yy goes to infinity. The computer checked y=−ln⁡(3−ex)y = -\ln(3 - e^x) for x<ln⁡3x < \ln 3. Solutions of differential equations do not always exist for all xx.

Miscellaneous Exercise on Chapter 9

569 words · 3 min read
  1. State the order and degree (if defined) of (a) (y′′)2+cos⁡(y′)=0(y'')^2 + \cos(y') = 0 and (b) y′′′=(y′′)2+sin⁡(y′′′)y''' = (y'')^2 + \sin(y''').
  2. Show that y=Ax+Bxy = Ax + \dfrac{B}{x} is a solution of x2y′′+xy′−y=0x^2y'' + xy' - y = 0. Find the particular solution with y(1)=5y(1) = 5 and y′(1)=−1y'(1) = -1.
  3. Solve dydx=y2sin⁡x\dfrac{dy}{dx} = y^2\sin x. Is there a solution that your method misses?
  4. Solve dydx=x2−y22xy\dfrac{dy}{dx} = \dfrac{x^2 - y^2}{2xy}.
  5. Solve dydx+2y=sin⁡x\dfrac{dy}{dx} + 2y = \sin x.
  6. Solve xdydx+y=x exx\dfrac{dy}{dx} + y = x\,e^x with y(1)=1y(1) = 1 and find y(2)y(2).
  7. A drink at 90°90°C stands in a room at 22°22°C. After 55 minutes it is 70°70°C. Assuming Newton's law of cooling, dTdt=−k(T−22)\dfrac{dT}{dt} = -k(T - 22), find kk and the time it takes to reach 40°40°C.
  8. Show that y=exsin⁡xy = e^x\sin x and y=excos⁡xy = e^x\cos x are solutions of y′′−2y′+2y=0y'' - 2y' + 2y = 0. Find the solution y=A excos⁡x+B exsin⁡xy = A\,e^x\cos x + B\,e^x\sin x with y(0)=2y(0) = 2 and y′(0)=3y'(0) = 3.

Answers

  1. (a) Order 2, degree 2: the highest derivative is y′′y'', squared; the cosine only contains a lower derivative. (b) Order 3, degree not defined: the highest derivative y′′′y''' is inside a sine, so the equation is not a polynomial in it.
  2. y′=A−Bx2y' = A - \dfrac{B}{x^2} and y′′=2Bx3y'' = \dfrac{2B}{x^3}. Then x2y′′+xy′−y=2Bx+Ax−Bx−Ax−Bx=0x^2y'' + xy' - y = \dfrac{2B}{x} + Ax - \dfrac{B}{x} - Ax - \dfrac{B}{x} = 0. From the conditions, A+B=5A + B = 5 and A−B=−1A - B = -1, so A=2A = 2, B=3B = 3. The solution is y=2x+3xy = 2x + \dfrac{3}{x}.
  3. Separate: dyy2=sin⁡x dx\dfrac{dy}{y^2} = \sin x\,dx. So −1y=−cos⁡x+c-\dfrac{1}{y} = -\cos x + c, which gives y=1cos⁡x+Cy = \dfrac{1}{\cos x + C}. The method misses y=0y = 0, which is also a solution. (Checked: C=2C = 2 and y=0y = 0.)
  4. With y=vxy = vx: xdvdx=1−3v22vx\dfrac{dv}{dx} = \dfrac{1 - 3v^2}{2v}. Separate: 2v dv1−3v2=dxx\dfrac{2v\,dv}{1 - 3v^2} = \dfrac{dx}{x}. Integrate: −13ln⁡∣1−3v2∣=ln⁡∣x∣+c-\dfrac{1}{3}\ln|1 - 3v^2| = \ln|x| + c. So (1−3v2)x3=K(1 - 3v^2)x^3 = K, that is x3−3xy2=Kx^3 - 3xy^2 = K. (The computer checked the slope at four points of the curve x3−3xy2=−2x^3 - 3xy^2 = -2.)
  5. I=e2xI = e^{2x}. (y e2x)′=e2xsin⁡x(y\,e^{2x})' = e^{2x}\sin x, and ∫e2xsin⁡x dx=e2x(2sin⁡x−cos⁡x)5\int e^{2x}\sin x\,dx = \dfrac{e^{2x}(2\sin x - \cos x)}{5} (by parts twice). So y=2sin⁡x−cos⁡x5+Ce−2xy = \dfrac{2\sin x - \cos x}{5} + Ce^{-2x}. (Checked for C=1C = 1.)
  6. Divide by xx: y′+yx=exy' + \dfrac{y}{x} = e^x, so I=xI = x. (xy)′=x ex(xy)' = x\,e^x, so xy=(x−1)ex+Cxy = (x - 1)e^x + C. From y(1)=1y(1) = 1: C=1C = 1. So y=(x−1)ex+1xy = \dfrac{(x - 1)e^x + 1}{x} and y(2)=e2+12≈4.1945y(2) = \dfrac{e^2 + 1}{2} \approx 4.1945. (A step-by-step numerical solution agrees.)
  7. T=22+68e−ktT = 22 + 68e^{-kt}. At t=5t = 5: 48=68e−5k48 = 68e^{-5k}, so k=15ln⁡6848≈0.0697k = \dfrac{1}{5}\ln\dfrac{68}{48} \approx 0.0697. For T=40T = 40: 18=68e−kt18 = 68e^{-kt}, so t=1kln⁡6818≈19.08t = \dfrac{1}{k}\ln\dfrac{68}{18} \approx 19.08 minutes. (A step-by-step numerical solution confirms both temperatures.)
  8. Both were checked by substitution (for y=exsin⁡xy = e^x\sin x: y′=ex(sin⁡x+cos⁡x)y' = e^x(\sin x + \cos x), y′′=2excos⁡xy'' = 2e^x\cos x, and y′′−2y′+2y=0y'' - 2y' + 2y = 0). From y(0)=A=2y(0) = A = 2. Also y′=ex((A+B)cos⁡x+(B−A)sin⁡x)y' = e^x\big((A + B)\cos x + (B - A)\sin x\big), so y′(0)=A+B=3y'(0) = A + B = 3 and B=1B = 1. The solution is y=ex(2cos⁡x+sin⁡x)y = e^x(2\cos x + \sin x), with y(0)=2y(0) = 2 and y′(0)=3y'(0) = 3.

Summary

193 words · 1 min read
  • A differential equation contains an unknown function and its derivatives. Its order is the order of the highest derivative. Its degree is the power of the highest derivative, when the equation is a polynomial in the derivatives (otherwise the degree is not defined).
  • A solution is a function that makes the equation true. The general solution of an equation of order nn has nn independent arbitrary constants. A particular solution fixes the constants using conditions.
  • Variables separable: dydx=f(x) g(y)\dfrac{dy}{dx} = f(x)\,g(y). Write dyg(y)=f(x) dx\dfrac{dy}{g(y)} = f(x)\,dx and integrate both sides. Check whether g(y)=0g(y) = 0 gives an extra solution.
  • Homogeneous: dydx=F ⁣(yx)\dfrac{dy}{dx} = F\!\left(\dfrac{y}{x}\right), that is, f(λx,λy)=f(x,y)f(\lambda x, \lambda y) = f(x, y). Put y=vxy = vx, so dydx=v+xdvdx\dfrac{dy}{dx} = v + x\dfrac{dv}{dx}, separate, integrate, and replace vv by yx\dfrac{y}{x}.
  • Linear: dydx+P y=Q\dfrac{dy}{dx} + P\,y = Q. The integrating factor is I=e∫P dxI = e^{\int P\,dx}, and the solution is y I=∫Q I dx+Cy\,I = \int Q\,I\,dx + C. If the equation has xx as the unknown, dxdy+P1 x=Q1\dfrac{dx}{dy} + P_1\,x = Q_1, use I=e∫P1 dyI = e^{\int P_1\,dy}.
  • Always check: differentiate your solution and substitute it back into the equation.

Historical Note

269 words · 1 min read

Differential equations grew out of calculus. Their story begins in the late 17th century.

  • 1675: Gottfried Wilhelm Leibniz (1646–1716) wrote the integral sign ∫\int and the symbol dydy for the first time, in a note on integrating yy. The birth of the subject is often dated to this year. Leibniz wanted to find a curve from a rule about its tangents, which is exactly a differential equation.
  • 1690: Jakob Bernoulli (1654–1705) used the word "integral" for what we now call a solution. The word solution came later: it was used by Joseph-Louis Lagrange (1736–1813) in 1774, and Henri Poincaré (1854–1912) argued strongly for it. The name "separation of variables" is due to Johann Bernoulli (1667–1748), the younger brother of Jakob.
  • 1691 and later: Leibniz found the method of separating variables, then a method for homogeneous equations (about a year later), and soon after a method for linear first-order equations. All three methods of this chapter came from one person within about 25 years of the first equation.
  • Around 1715: Johann Bernoulli studied the innocent-looking equation x2y′′=2yx^2 y'' = 2y and found solutions of surprisingly different shapes. You can see why: it has the solutions y=x2y = x^2 and y=1xy = \frac{1}{x}, and every combination y=Ax2+Bxy = Ax^2 + \frac{B}{x} also works. With B=0B = 0 the graph is a parabola; with A=0A = 0 it is a hyperbola; with both, a cubic-type curve. (The computer checked all three types.)
  • 20th century: mathematicians turned to qualitative analysis: studying how solutions behave (do they settle down, grow, oscillate?) without finding a formula. This is now essential in physics, biology and engineering.
Up next
Continue to the next chapter