Two more stan­dard tricks

Not every first-order equa­tion sep­a­rates neatly. Two com­mon types that do not can still be cracked with a stan­dard trick each. Homo­ge­neous equa­tions give way to the sub­sti­tu­tion y=vxy = vx, and lin­ear equa­tions give way to an inte­grat­ing fac­tor. We will prac­tise both and then fin­ish with a mixed set.

Homo­ge­neous equa­tions

dydx=F(yx)\displaystyle \tfrac{dy}{dx} = F\left(\tfrac{y}{x}\right), so the right side depends only on yx\displaystyle \tfrac{y}{x} (put another way, it is a ratio of homo­ge­neous func­tions of the same degree). The trick is to put y=vxy = vx, so that dydx=v+xdvdx\displaystyle \tfrac{dy}{dx} = v + x\tfrac{dv}{dx}. After that, the vari­ables sep­a­rate on their own.

Exam­ple 1. dydx=x+yx\displaystyle \tfrac{dy}{dx} = \tfrac{x + y}{x}. Sub­sti­tut­ing, v+xv′=1+vv + xv' = 1 + v, so xv′=1xv' = 1, v=log⁡∣x∣+Cv = \log\lvert x \rvert + C: y=xlog⁡∣x∣+Cxy = x\log\lvert x \rvert + Cx.

Exam­ple 2. dydx=x2+y22xy\displaystyle \tfrac{dy}{dx} = \tfrac{x^2 + y^2}{2xy}. Here v+xv′=1+v22v\displaystyle v + xv' = \tfrac{1 + v^2}{2v}, so xv′=1−v22v\displaystyle xv' = \tfrac{1 - v^2}{2v}; ∫2v dv1−v2=∫dxx\displaystyle \int\tfrac{2v\,dv}{1 - v^2} = \int\tfrac{dx}{x} gives −log⁡∣1−v2∣=log⁡∣x∣+c-\log\lvert 1 - v^2 \rvert = \log\lvert x \rvert + c, i.e. x2−y2=Cxx^2 - y^2 = Cx.

Lin­ear equa­tions

dydx+P(x)y=Q(x)\displaystyle \tfrac{dy}{dx} + P(x)y = Q(x). Mul­ti­ply through by the inte­grat­ing fac­tor IF=e∫P dx\displaystyle \text{IF} = e^{\int P\,dx}. Like magic, the left side becomes ddx(y⋅IF)\displaystyle \tfrac{d}{dx}(y \cdot \text{IF}):

y⋅IF=∫Q⋅IF dx+C.\displaystyle y \cdot \text{IF} = \int Q \cdot \text{IF}\,dx + C.

Exam­ple 3. dydx+2y=ex\displaystyle \tfrac{dy}{dx} + 2y = e^{x}. Here IF =e2x= e^{2x}, so ye2x=∫e3x dx=e3x3+C\displaystyle ye^{2x} = \int e^{3x}\,dx = \tfrac{e^{3x}}{3} + C; y=ex3+Ce−2x\displaystyle y = \tfrac{e^x}{3} + Ce^{-2x}.

Exam­ple 4. xdydx+y=x3\displaystyle x\tfrac{dy}{dx} + y = x^3, i.e. y′+yx=x2\displaystyle y' + \tfrac{y}{x} = x^2. Here IF =x= x, and xy=x44+C\displaystyle xy = \tfrac{x^4}{4} + C.

Exam­ple 5. dydx+ytan⁡x=sec⁡x\displaystyle \tfrac{dy}{dx} + y\tan x = \sec x with y(0)=1y(0) = 1. Here IF =sec⁡x= \sec x, so ysec⁡x=∫sec⁡2x dx=tan⁡x+C\displaystyle y\sec x = \int\sec^2 x\,dx = \tan x + C. The con­di­tion gives C=1C = 1, and so y=sin⁡x+cos⁡xy = \sin x + \cos x.

Exam­ple 6. A tank holds 100100 L of brine with 2020 kg of salt. Fresh water flows in at 55 L/min and the mix­ture flows out at the same rate. If SS is the salt present, it leaves at a rate pro­por­tional to the con­cen­tra­tion, so dSdt=−5S100\displaystyle \tfrac{dS}{dt} = -\tfrac{5S}{100}, which gives S=20e−t/20S = 20e^{-t/20}. After 2020 min­utes about 7.367.36 kg remains.

Graph of the salt S = 20 e to the power -t/20 in the 100 L tank against time t in minutes: it starts at 20 kg and decays to about 7.36 kg at t = 20 minutes, then keeps falling.
The salt in the tank decays expo­nen­tially: about 7.36 kg is left after 20 min­utes.

Mixed prac­tice

  1. Solve dydx=yx+xy\displaystyle \tfrac{dy}{dx} = \tfrac{y}{x} + \tfrac{x}{y}.
  2. Solve (x−y) dy−(x+y) dx=0(x - y)\,dy - (x + y)\,dx = 0.
  3. Solve dydx−y=e2x\displaystyle \tfrac{dy}{dx} - y = e^{2x}.
  4. Solve dydx+2yx=x\displaystyle \tfrac{dy}{dx} + \tfrac{2y}{x} = x with y(1)=1y(1) = 1.
  5. Solve dydx+ycot⁡x=2cos⁡x\displaystyle \tfrac{dy}{dx} + y\cot x = 2\cos x.
  6. Solve (1+x2)dydx+2xy=11+x2\displaystyle (1 + x^2)\tfrac{dy}{dx} + 2xy = \tfrac{1}{1 + x^2}.
  7. Solve dydx=yx+tan⁡yx\displaystyle \tfrac{dy}{dx} = \tfrac{y}{x} + \tan\tfrac{y}{x}.
  8. Find the curve through (0,1)(0, 1) whose slope at any point is x+yx + y.
  9. New­ton's law of cool­ing: dTdt=−k(T−25)\displaystyle \tfrac{dT}{dt} = -k(T - 25). A cup at 85∘85^\circC cools to 55∘55^\circC in 1010 min­utes. When is it at 40∘40^\circC?
  10. Iden­tify the type and solve: dydx=ex−y\displaystyle \tfrac{dy}{dx} = e^{x - y}.

Answers to check against

Show answers
  1. vv′x=1vv' x = 1 after sub­sti­tu­tion: y2=2x2log⁡∣x∣+Cx2y^2 = 2x^2\log\lvert x \rvert + Cx^2.
  2. dydx=x+yx−y\displaystyle \tfrac{dy}{dx} = \tfrac{x + y}{x - y}: tan⁡−1yx=12log⁡(x2+y2)+C\displaystyle \tan^{-1}\tfrac{y}{x} = \tfrac{1}{2}\log(x^2 + y^2) + C.
  3. IF e−xe^{-x}: y=e2x+Cexy = e^{2x} + Ce^x.
  4. IF x2x^2: x2y=x44+C\displaystyle x^2y = \tfrac{x^4}{4} + C, C=34\displaystyle C = \tfrac{3}{4}: y=x24+34x2\displaystyle y = \tfrac{x^2}{4} + \tfrac{3}{4x^2}.
  5. IF sin⁡x\sin x: ysin⁡x=∫sin⁡2x dx=−cos⁡2x2+C\displaystyle y\sin x = \int\sin 2x\,dx = -\tfrac{\cos 2x}{2} + C.
  6. IF 1+x21 + x^2: y(1+x2)=tan⁡−1x+Cy(1 + x^2) = \tan^{-1}x + C.
  7. xv′=tan⁡vx v' = \tan v: sin⁡yx=Cx\displaystyle \sin\tfrac{y}{x} = Cx.
  8. y′−y=xy' - y = x: y=Cex−x−1y = Ce^x - x - 1, C=2C = 2: y=2ex−x−1y = 2e^x - x - 1.
  9. T−25=60e−ktT - 25 = 60e^{-kt}; e−10k=12\displaystyle e^{-10k} = \tfrac{1}{2}; 40−25=15=60⋅14\displaystyle 40 - 25 = 15 = 60 \cdot \tfrac{1}{4}: t=20t = 20 min­utes.
  10. It is sep­a­ra­ble, and the solu­tion is ey=ex+Ce^y = e^x + C.