How to use these solu­tions

These are detailed worked solu­tions to the Mixed prac­tice ques­tions of the les­son Homo­ge­neous and Lin­ear Equa­tions, with Mixed Prac­tice. Try each ques­tion your­self first, then fol­low the solu­tion step by step. The most impor­tant skill here is the first one — iden­ti­fy­ing the type of the equa­tion (sep­a­ra­ble, homo­ge­neous or lin­ear) — so every solu­tion begins by show­ing how to recog­nise it.

Ques­tion 1: A homo­ge­neous equa­tion with y/x and x/y

The prob­lem

Solve dydx=yx+xy\displaystyle \frac{dy}{dx} = \frac{y}{x} + \frac{x}{y}.

Under­stand­ing the prob­lem

We want the gen­eral solu­tion: a rela­tion between xx and yy with one arbi­trary con­stant. The right side con­tains only the ratios yx\displaystyle \tfrac{y}{x} and xy=1y/x\displaystyle \tfrac{x}{y} = \tfrac{1}{y/x}.

The idea

Since the right side depends only on yx\displaystyle \tfrac{y}{x}, the equa­tion is homo­ge­neous. Sub­sti­tute y=vxy = vx, so dydx=v+xdvdx\displaystyle \tfrac{dy}{dx} = v + x\tfrac{dv}{dx}; the vari­ables vv and xx will then sep­a­rate.

Step-by-step solu­tion

Step 1. Put y=vxy = vx. Then yx=v\displaystyle \tfrac{y}{x} = v and xy=1v\displaystyle \tfrac{x}{y} = \tfrac1v.

v+xdvdx=v+1v.\displaystyle v + x\frac{dv}{dx} = v + \frac{1}{v}.

Step 2. Can­cel vv from both sides.

xdvdx=1v.\displaystyle x\frac{dv}{dx} = \frac{1}{v}.

Step 3. Sep­a­rate the vari­ables: all vv on one side, all xx on the other.

v dv=dxx.\displaystyle v\,dv = \frac{dx}{x}.

Step 4. Inte­grate both sides.

v22=log⁡∣x∣+C.\displaystyle \frac{v^2}{2} = \log\lvert x \rvert + C.

Step 5. Put back v=yx\displaystyle v = \tfrac{y}{x} and clear frac­tions (mul­ti­ply by 2x22x^2; write the new con­stant 2C2C again as CC).

y22x2=log⁡∣x∣+C  ⟹  y2=2x2log⁡∣x∣+Cx2.\displaystyle \frac{y^2}{2x^2} = \log\lvert x \rvert + C \;\Longrightarrow\; y^2 = 2x^2\log\lvert x \rvert + Cx^2.

Check­ing the answer

Dif­fer­en­ti­ate y2=2x2log⁡∣x∣+Cx2y^2 = 2x^2\log\lvert x\rvert + Cx^2: 2yy′=4xlog⁡∣x∣+2x+2Cx2yy' = 4x\log\lvert x\rvert + 2x + 2Cx. So y′=x(2log⁡∣x∣+C)+xy\displaystyle y' = \tfrac{x(2\log\lvert x\rvert + C) + x}{y}. From the solu­tion, 2log⁡∣x∣+C=y2x2\displaystyle 2\log\lvert x\rvert + C = \tfrac{y^2}{x^2}, so y′=y2/x+xy=yx+xy\displaystyle y' = \tfrac{y^2/x + x}{y} = \tfrac{y}{x} + \tfrac{x}{y} ✓.

Answer

y2=2x2log⁡∣x∣+Cx2y^2 = 2x^2\log\lvert x \rvert + Cx^2.

Ques­tion 2: Homo­ge­neous equa­tion in dif­fer­en­tial form

The prob­lem

Solve (x−y) dy−(x+y) dx=0(x - y)\,dy - (x + y)\,dx = 0.

Under­stand­ing the prob­lem

The equa­tion is writ­ten with dif­fer­en­tials. First rewrite it as dydx=…\displaystyle \tfrac{dy}{dx} = \ldots to see its type.

The idea

Rear­rang­ing gives dydx=x+yx−y\displaystyle \tfrac{dy}{dx} = \tfrac{x + y}{x - y}: numer­a­tor and denom­i­na­tor are both of degree 11, so the equa­tion is homo­ge­neous. Use y=vxy = vx.

Step-by-step solu­tion

Step 1. Rearrange.

(x−y) dy=(x+y) dx  ⟹  dydx=x+yx−y.\displaystyle (x - y)\,dy = (x + y)\,dx \;\Longrightarrow\; \frac{dy}{dx} = \frac{x + y}{x - y}.

Step 2. Put y=vxy = vx and divide the top and bot­tom of the right side by xx.

v+xdvdx=1+v1−v.\displaystyle v + x\frac{dv}{dx} = \frac{1 + v}{1 - v}.

Step 3. Iso­late xdvdx\displaystyle x\tfrac{dv}{dx}.

xdvdx=1+v1−v−v=1+v−v+v21−v=1+v21−v.\displaystyle x\frac{dv}{dx} = \frac{1 + v}{1 - v} - v = \frac{1 + v - v + v^2}{1 - v} = \frac{1 + v^2}{1 - v}.

Step 4. Sep­a­rate the vari­ables.

1−v1+v2 dv=dxx.\displaystyle \frac{1 - v}{1 + v^2}\,dv = \frac{dx}{x}.

Step 5. Split the left side into two stan­dard inte­grals.

∫dv1+v2−∫v dv1+v2=∫dxx.\displaystyle \int\frac{dv}{1 + v^2} - \int\frac{v\,dv}{1 + v^2} = \int\frac{dx}{x}.

The first is tan⁡−1v\tan^{-1}v. For the sec­ond, the numer­a­tor vv is half the deriv­a­tive of 1+v21 + v^2, so it equals 12log⁡(1+v2)\displaystyle \tfrac12\log(1 + v^2).

tan⁡−1v−12log⁡(1+v2)=log⁡∣x∣+C.\displaystyle \tan^{-1}v - \tfrac12\log(1 + v^2) = \log\lvert x \rvert + C.

Step 6. Put v=yx\displaystyle v = \tfrac{y}{x} and com­bine the log­a­rithms: 12log⁡(1+y2x2)+log⁡∣x∣=12log⁡x2+y2x2+12log⁡x2=12log⁡(x2+y2)\displaystyle \tfrac12\log\left(1 + \tfrac{y^2}{x^2}\right) + \log\lvert x \rvert = \tfrac12\log\tfrac{x^2 + y^2}{x^2} + \tfrac12\log x^2 = \tfrac12\log(x^2 + y^2).

tan⁡−1yx=12log⁡(x2+y2)+C.\displaystyle \tan^{-1}\frac{y}{x} = \tfrac12\log(x^2 + y^2) + C.

Check­ing the answer

Dif­fer­en­ti­ate implic­itly: xy′−yx2+y2=x+yy′x2+y2\displaystyle \tfrac{xy' - y}{x^2 + y^2} = \tfrac{x + yy'}{x^2 + y^2}, so xy′−y=x+yy′xy' - y = x + yy', y′(x−y)=x+yy'(x - y) = x + y ✓.

Answer

tan⁡−1yx=12log⁡(x2+y2)+C\displaystyle \tan^{-1}\frac{y}{x} = \frac12\log(x^2 + y^2) + C.

Ques­tion 3: A lin­ear equa­tion with an expo­nen­tial

The prob­lem

Solve dydx−y=e2x\displaystyle \frac{dy}{dx} - y = e^{2x}.

Under­stand­ing the prob­lem

The equa­tion has the form dydx+P(x)y=Q(x)\displaystyle \tfrac{dy}{dx} + P(x)y = Q(x) with P(x)=−1P(x) = -1 and Q(x)=e2xQ(x) = e^{2x}. So it is lin­ear in yy.

The idea

Mul­ti­ply by the inte­grat­ing fac­tor IF=e∫P dx\displaystyle \text{IF} = e^{\int P\,dx}; then y⋅IF=∫Q⋅IF dx+C\displaystyle y\cdot\text{IF} = \int Q\cdot\text{IF}\,dx + C.

Step-by-step solu­tion

Step 1. Inte­grat­ing fac­tor.

IF=e∫(−1) dx=e−x.\displaystyle \text{IF} = e^{\int(-1)\,dx} = e^{-x}.

Step 2. Apply the for­mula.

ye−x=∫e2x⋅e−x dx+C=∫ex dx+C=ex+C.\displaystyle ye^{-x} = \int e^{2x}\cdot e^{-x}\,dx + C = \int e^{x}\,dx + C = e^x + C.

Step 3. Mul­ti­ply by exe^x.

y=e2x+Cex.y = e^{2x} + Ce^x.

Check­ing the answer

y′=2e2x+Cexy' = 2e^{2x} + Ce^x, so y′−y=2e2x+Cex−e2x−Cex=e2xy' - y = 2e^{2x} + Ce^x - e^{2x} - Ce^x = e^{2x} ✓.

Answer

y=e2x+Cexy = e^{2x} + Ce^{x}.

Ques­tion 4: A lin­ear equa­tion with an ini­tial con­di­tion

The prob­lem

Solve dydx+2yx=x\displaystyle \frac{dy}{dx} + \frac{2y}{x} = x, given y(1)=1y(1) = 1.

Under­stand­ing the prob­lem

Lin­ear form with P(x)=2x\displaystyle P(x) = \tfrac{2}{x}, Q(x)=xQ(x) = x. The con­di­tion y(1)=1y(1) = 1 fixes the con­stant, so we want a par­tic­u­lar solu­tion.

The idea

Inte­grat­ing fac­tor e∫P dx\displaystyle e^{\int P\,dx}, gen­eral solu­tion, then sub­sti­tute x=1x = 1, y=1y = 1 to find CC.

Step-by-step solu­tion

Step 1. Inte­grat­ing fac­tor (take x>0x > 0, since the con­di­tion is at x=1x = 1).

IF=e∫2xdx=e2log⁡x=elog⁡x2=x2.\displaystyle \text{IF} = e^{\int\frac{2}{x}dx} = e^{2\log x} = e^{\log x^2} = x^2.

Step 2. Apply the for­mula.

x2y=∫x⋅x2 dx+C=x44+C.\displaystyle x^2 y = \int x\cdot x^2\,dx + C = \frac{x^4}{4} + C.

Step 3. Use y(1)=1y(1) = 1.

1⋅1=14+C  ⟹  C=34.\displaystyle 1 \cdot 1 = \frac14 + C \;\Longrightarrow\; C = \frac34.

Step 4. Divide by x2x^2.

y=x24+34x2.\displaystyle y = \frac{x^2}{4} + \frac{3}{4x^2}.

Check­ing the answer

At x=1x = 1: 14+34=1\displaystyle \tfrac14 + \tfrac34 = 1 ✓. y′=x2−32x3\displaystyle y' = \tfrac{x}{2} - \tfrac{3}{2x^3} and 2yx=x2+32x3\displaystyle \tfrac{2y}{x} = \tfrac{x}{2} + \tfrac{3}{2x^3}; their sum is xx ✓.

Answer

y=x24+34x2\displaystyle y = \frac{x^2}{4} + \frac{3}{4x^2}.

Ques­tion 5: A lin­ear equa­tion with cot x

The prob­lem

Solve dydx+ycot⁡x=2cos⁡x\displaystyle \frac{dy}{dx} + y\cot x = 2\cos x.

Under­stand­ing the prob­lem

Lin­ear with P(x)=cot⁡xP(x) = \cot x and Q(x)=2cos⁡xQ(x) = 2\cos x.

The idea

Inte­grat­ing fac­tor e∫cot⁡x dx\displaystyle e^{\int\cot x\,dx}, then inte­grate Q⋅IFQ \cdot \text{IF}; the dou­ble-angle iden­tity 2sin⁡xcos⁡x=sin⁡2x2\sin x\cos x = \sin 2x makes the inte­gral easy.

Step-by-step solu­tion

Step 1. ∫cot⁡x dx=log⁡∣sin⁡x∣\displaystyle \int\cot x\,dx = \log\lvert\sin x\rvert, so

IF=elog⁡sin⁡x=sin⁡x.\text{IF} = e^{\log\sin x} = \sin x.

Step 2. Apply the for­mula.

ysin⁡x=∫2cos⁡xsin⁡x dx+C=∫sin⁡2x dx+C.\displaystyle y\sin x = \int 2\cos x\sin x\,dx + C = \int\sin 2x\,dx + C.

Step 3. Inte­grate: ∫sin⁡2x dx=−cos⁡2x2\displaystyle \int\sin 2x\,dx = -\tfrac{\cos 2x}{2}.

ysin⁡x=−cos⁡2x2+C.\displaystyle y\sin x = -\frac{\cos 2x}{2} + C.

Check­ing the answer

Dif­fer­en­ti­ate both sides: y′sin⁡x+ycos⁡x=sin⁡2xy'\sin x + y\cos x = \sin 2x. Divide by sin⁡x\sin x: y′+ycot⁡x=2cos⁡xy' + y\cot x = 2\cos x ✓.

Answer

ysin⁡x=−cos⁡2x2+C\displaystyle y\sin x = -\frac{\cos 2x}{2} + C. (Equiv­a­lently ysin⁡x=sin⁡2x+C′y\sin x = \sin^2 x + C', since −cos⁡2x2=sin⁡2x−12\displaystyle -\tfrac{\cos 2x}{2} = \sin^2 x - \tfrac12.)

Ques­tion 6: A lin­ear equa­tion after divid­ing through

The prob­lem

Solve (1+x2)dydx+2xy=11+x2\displaystyle (1 + x^2)\frac{dy}{dx} + 2xy = \frac{1}{1 + x^2}.

Under­stand­ing the prob­lem

The coef­fi­cient of dydx\displaystyle \tfrac{dy}{dx} is not 11, so we must divide by 1+x21 + x^2 to reach the stan­dard lin­ear form.

The idea

Divide, iden­tify PP and QQ, find the IF.

Step-by-step solu­tion

Step 1. Divide by 1+x21 + x^2.

dydx+2x1+x2y=1(1+x2)2.\displaystyle \frac{dy}{dx} + \frac{2x}{1 + x^2}y = \frac{1}{(1 + x^2)^2}.

So P=2x1+x2\displaystyle P = \tfrac{2x}{1 + x^2}, Q=1(1+x2)2\displaystyle Q = \tfrac{1}{(1 + x^2)^2}.

Step 2. Inte­grat­ing fac­tor. The numer­a­tor 2x2x is the deriv­a­tive of 1+x21 + x^2:

∫2x1+x2dx=log⁡(1+x2)  ⟹  IF=1+x2.\displaystyle \int\frac{2x}{1 + x^2}dx = \log(1 + x^2) \;\Longrightarrow\; \text{IF} = 1 + x^2.

Step 3. Apply the for­mula.

y(1+x2)=∫1(1+x2)2(1+x2) dx+C=∫dx1+x2+C=tan⁡−1x+C.\displaystyle y(1 + x^2) = \int\frac{1}{(1 + x^2)^2}(1 + x^2)\,dx + C = \int\frac{dx}{1 + x^2} + C = \tan^{-1}x + C.

Check­ing the answer

Notice the orig­i­nal left side is exactly ddx[(1+x2)y]\displaystyle \tfrac{d}{dx}\big[(1 + x^2)y\big]. Dif­fer­en­ti­at­ing y(1+x2)=tan⁡−1x+Cy(1 + x^2) = \tan^{-1}x + C gives (1+x2)y′+2xy=11+x2\displaystyle (1 + x^2)y' + 2xy = \tfrac{1}{1 + x^2} ✓.

Answer

y(1+x2)=tan⁡−1x+Cy(1 + x^2) = \tan^{-1}x + C.

Ques­tion 7: A homo­ge­neous equa­tion with tan(y/x)

The prob­lem

Solve dydx=yx+tan⁡yx\displaystyle \frac{dy}{dx} = \frac{y}{x} + \tan\frac{y}{x}.

Under­stand­ing the prob­lem

The right side depends only on yx\displaystyle \tfrac{y}{x}, so this is homo­ge­neous.

The idea

Sub­sti­tute y=vxy = vx, sep­a­rate, inte­grate cot⁡v\cot v.

Step-by-step solu­tion

Step 1. With y=vxy = vx:

v+xdvdx=v+tan⁡v  ⟹  xdvdx=tan⁡v.\displaystyle v + x\frac{dv}{dx} = v + \tan v \;\Longrightarrow\; x\frac{dv}{dx} = \tan v.

Step 2. Sep­a­rate: dvtan⁡v=cot⁡v dv\displaystyle \frac{dv}{\tan v} = \cot v\,dv.

cot⁡v dv=dxx.\displaystyle \cot v\,dv = \frac{dx}{x}.

Step 3. Inte­grate.

log⁡∣sin⁡v∣=log⁡∣x∣+log⁡∣C∣.\log\lvert\sin v\rvert = \log\lvert x\rvert + \log\lvert C\rvert.

(Writ­ing the con­stant as log⁡∣C∣\log\lvert C\rvert lets us com­bine the logs.)

Step 4. Com­bine and remove the log­a­rithms.

log⁡∣sin⁡v∣=log⁡∣Cx∣  ⟹  sin⁡v=Cx.\log\lvert\sin v\rvert = \log\lvert Cx\rvert \;\Longrightarrow\; \sin v = Cx.

Step 5. Put back v=yx\displaystyle v = \tfrac{y}{x}.

sin⁡yx=Cx.\displaystyle \sin\frac{y}{x} = Cx.

Check­ing the answer

Dif­fer­en­ti­ate sin⁡yx=Cx\displaystyle \sin\tfrac{y}{x} = Cx: cos⁡yx⋅xy′−yx2=C=sin⁡(y/x)x\displaystyle \cos\tfrac{y}{x}\cdot\tfrac{xy' - y}{x^2} = C = \tfrac{\sin(y/x)}{x}. So xy′−y=xtan⁡yx\displaystyle xy' - y = x\tan\tfrac{y}{x}, i.e. y′=yx+tan⁡yx\displaystyle y' = \tfrac{y}{x} + \tan\tfrac{y}{x} ✓.

Answer

sin⁡yx=Cx\displaystyle \sin\frac{y}{x} = Cx.

Ques­tion 8: A curve from its slope

The prob­lem

Find the equa­tion of the curve pass­ing through (0,1)(0, 1) whose slope at any point (x,y)(x, y) is x+yx + y.

Under­stand­ing the prob­lem

"Slope at any point is x+yx + y" means dydx=x+y\displaystyle \tfrac{dy}{dx} = x + y. The curve must also pass through (0,1)(0, 1), which fixes the con­stant.

The idea

Rewrite as dydx−y=x\displaystyle \tfrac{dy}{dx} - y = x: lin­ear with P=−1P = -1, Q=xQ = x. The inte­gral ∫xe−xdx\displaystyle \int xe^{-x}dx needs inte­gra­tion by parts.

Step-by-step solu­tion

Step 1. Stan­dard lin­ear form and IF.

dydx−y=x,IF=e−x.\displaystyle \frac{dy}{dx} - y = x, \qquad \text{IF} = e^{-x}.

Step 2. Apply the for­mula.

ye−x=∫xe−x dx+C.\displaystyle ye^{-x} = \int xe^{-x}\,dx + C.

Step 3. By parts (u=xu = x, dv=e−xdxdv = e^{-x}dx, so du=dxdu = dx, v=−e−xv = -e^{-x}):

∫xe−x dx=−xe−x+∫e−x dx=−xe−x−e−x.\displaystyle \int xe^{-x}\,dx = -xe^{-x} + \int e^{-x}\,dx = -xe^{-x} - e^{-x}.

Step 4. So ye−x=−xe−x−e−x+Cye^{-x} = -xe^{-x} - e^{-x} + C; mul­ti­ply by exe^x.

y=−x−1+Cex.y = -x - 1 + Ce^x.

Step 5. Use the point (0,1)(0, 1): 1=0−1+C1 = 0 - 1 + C, so C=2C = 2.

y=2ex−x−1.y = 2e^x - x - 1.

Check­ing the answer

y(0)=2−0−1=1y(0) = 2 - 0 - 1 = 1 ✓. y′=2ex−1y' = 2e^x - 1, and x+y=2ex−1x + y = 2e^x - 1 ✓.

Answer

y=2ex−x−1y = 2e^x - x - 1.

Ques­tion 9: New­ton's law of cool­ing

The prob­lem

New­ton's law of cool­ing says dTdt=−k(T−25)\displaystyle \frac{dT}{dt} = -k(T - 25), where TT is the tem­per­a­ture in ∘^\circC and tt the time in min­utes. A cup of tea at 85∘85^\circC cools to 55∘55^\circC in 1010 min­utes. When will it be at 40∘40^\circC?

Under­stand­ing the prob­lem

The room is at 25∘25^\circC. The rate of cool­ing is pro­por­tional to how much hot­ter the tea is than the room. We know T(0)=85T(0) = 85 and T(10)=55T(10) = 55; we must find tt with T(t)=40T(t) = 40. The con­stant kk is unknown and must be found from the data.

The idea

The equa­tion is sep­a­ra­ble in T−25T - 25. Solve it to get an expo­nen­tial, use the two data points, then solve for the required time.

Step-by-step solu­tion

Step 1. Sep­a­rate and inte­grate.

dTT−25=−k dt  ⟹  log⁡∣T−25∣=−kt+c  ⟹  T−25=Ae−kt.\displaystyle \frac{dT}{T - 25} = -k\,dt \;\Longrightarrow\; \log\lvert T - 25\rvert = -kt + c \;\Longrightarrow\; T - 25 = Ae^{-kt}.

Step 2. Use T(0)=85T(0) = 85: 85−25=A85 - 25 = A, so A=60A = 60.

T−25=60e−kt.T - 25 = 60e^{-kt}.

Step 3. Use T(10)=55T(10) = 55.

30=60e−10k  ⟹  e−10k=12.\displaystyle 30 = 60e^{-10k} \;\Longrightarrow\; e^{-10k} = \frac12.

Step 4. Set T=40T = 40.

15=60e−kt  ⟹  e−kt=14=(12)2=(e−10k)2=e−20k.\displaystyle 15 = 60e^{-kt} \;\Longrightarrow\; e^{-kt} = \frac14 = \left(\frac12\right)^2 = \left(e^{-10k}\right)^2 = e^{-20k}.

Step 5. Com­pare expo­nents: kt=20kkt = 20k, so t=20t = 20.

Check­ing the answer

The tem­per­a­ture excess halves every 1010 min­utes: 60→3060 \to 30 (at 1010 min) →15\to 15 (at 2020 min). 25+15=4025 + 15 = 40 ✓.

Answer

The tea reaches 40∘40^\circC after 2020 min­utes.

Ques­tion 10: Iden­tify the type and solve

The prob­lem

Iden­tify the type of the equa­tion dydx=ex−y\displaystyle \frac{dy}{dx} = e^{x - y} and solve it.

Under­stand­ing the prob­lem

Before solv­ing, decide which method applies. Use the law of indices ex−y=ex⋅e−ye^{x - y} = e^x\cdot e^{-y}.

The idea

The right side is a prod­uct of a func­tion of xx and a func­tion of yy, so the equa­tion is vari­ables sep­a­ra­ble (not homo­ge­neous, not lin­ear in yy).

Step-by-step solu­tion

Step 1. Rewrite: dydx=exe−y\displaystyle \frac{dy}{dx} = e^x e^{-y}.

Step 2. Sep­a­rate: mul­ti­ply both sides by ey dxe^{y}\,dx.

ey dy=ex dx.e^{y}\,dy = e^{x}\,dx.

Step 3. Inte­grate.

ey=ex+C.e^{y} = e^{x} + C.

Check­ing the answer

Dif­fer­en­ti­ate: eyy′=exe^y y' = e^x, so y′=ex−yy' = e^{x - y} ✓.

Answer

Vari­ables sep­a­ra­ble; the solu­tion is ey=ex+Ce^{y} = e^{x} + C.