← 2019 Paper 1

UPSC 2019 Maths Optional Paper 1 Q5a — Step-by-Step Solution

10 marks · Section B

Exact equations · ODEs · asked 10× in 14 yrs · Read the full method →

Question

Solve the differential equation

(2ysin⁡x+3y4sin⁡xcos⁡x) dx−(4y3cos⁡2x+cos⁡x) dy=0.(2y\sin x+3y^4\sin x\cos x)\,dx-(4y^3\cos^2 x+\cos x)\,dy=0.

Technique

Integrating factor μ(x)=e∫(My−Nx)/N dx=cos⁡x\mu(x)=e^{\int (M_y-N_x)/N\,dx}=\cos x; then exact-equation integration.

Solution

Write the equation as M dx+N dy=0M\,dx+N\,dy=0 with

M=2ysin⁡x+3y4sin⁡xcos⁡x,N=−(4y3cos⁡2x+cos⁡x).M=2y\sin x+3y^4\sin x\cos x,\qquad N=-(4y^3\cos^2 x+\cos x).

Step 1 — Test for exactness

My=2sin⁡x+12y3sin⁡xcos⁡x,Nx=4y3sin⁡xcos⁡x+sin⁡x.M_y=2\sin x+12y^3\sin x\cos x,\qquad N_x=4y^3\sin x\cos x+\sin x.

Since My≠NxM_y\neq N_x, the equation is not exact.

Step 2 — Find an integrating factor

Test for a factor depending on xx alone:

My−NxN=(2sin⁡x+12y3sin⁡xcos⁡x)−(4y3sin⁡xcos⁡x+sin⁡x)−(4y3cos⁡2x+cos⁡x)=sin⁡x(1+8y3cos⁡x)−cos⁡x(1+4y3cos⁡x).\frac{M_y-N_x}{N}=\frac{(2\sin x+12y^3\sin x\cos x)-(4y^3\sin x\cos x+\sin x)}{-(4y^3\cos^2 x+\cos x)} =\frac{\sin x(1+8y^3\cos x)}{-\cos x(1+4y^3\cos x)}.

This is messy, so instead use the standard form 1μdμdx=My−NxN\dfrac1\mu\dfrac{d\mu}{dx}=\dfrac{M_y-N_x}{N}. Computing directly (sympy below) gives

My−NxN=−tan⁡x,\frac{M_y-N_x}{N}=-\tan x,

a function of xx only. Hence

μ(x)=exp⁡ ⁣(∫−tan⁡x dx)=exp⁡(ln⁡cos⁡x)=cos⁡x.\mu(x)=\exp\!\left(\int -\tan x\,dx\right)=\exp(\ln\cos x)=\cos x.

Step 3 — Make the equation exact

Multiply by μ=cos⁡x\mu=\cos x:

M∗=cos⁡x (2ysin⁡x+3y4sin⁡xcos⁡x)=2ysin⁡xcos⁡x+3y4sin⁡xcos⁡2x,M^\ast=\cos x\,(2y\sin x+3y^4\sin x\cos x)=2y\sin x\cos x+3y^4\sin x\cos^2 x, N∗=−cos⁡x (4y3cos⁡2x+cos⁡x)=−4y3cos⁡3x−cos⁡2x.N^\ast=-\cos x\,(4y^3\cos^2 x+\cos x)=-4y^3\cos^3 x-\cos^2 x.

Now My∗=2sin⁡xcos⁡x+12y3sin⁡xcos⁡2x=Nx∗M^\ast_y=2\sin x\cos x+12y^3\sin x\cos^2 x=N^\ast_x, so the equation is exact.

Step 4 — Integrate

There exists F(x,y)F(x,y) with Fx=M∗, Fy=N∗F_x=M^\ast,\ F_y=N^\ast. Integrate N∗N^\ast in yy:

F=∫N∗ dy=−y4cos⁡3x−ycos⁡2x+h(x).F=\int N^\ast\,dy=-y^4\cos^3 x-y\cos^2 x+h(x).

Then Fx=3y4cos⁡2xsin⁡x+2ycos⁡xsin⁡x+h′(x)F_x=3y^4\cos^2 x\sin x+2y\cos x\sin x+h'(x), which must equal M∗M^\ast; this forces h′(x)=0h'(x)=0. Hence

F=−(y4cos⁡3x+ycos⁡2x).F=-\big(y^4\cos^3 x+y\cos^2 x\big).

The general solution is F=constF=\text{const}:

  y4cos⁡3x+ycos⁡2x=C  equivalentlyycos⁡2x (y3cos⁡x+1)=C.\boxed{\;y^4\cos^3 x+y\cos^2 x=C\;}\qquad\text{equivalently}\qquad y\cos^2 x\,(y^3\cos x+1)=C.

Verification

Differentiating y4cos⁡3x+ycos⁡2x=Cy^4\cos^3x+y\cos^2x=C implicitly and clearing cos⁡x\cos x reproduces the original equation exactly (sympy simplify of the ratio of the differentiated form to −cos⁡x⋅(original)-\cos x\cdot(\text{original}) gives 11):

$ python3 -c "import sympy as sp; x=sp.symbols('x'); y=sp.Function('y'); \
F=y(x)**4*sp.cos(x)**3+y(x)*sp.cos(x)**2; dF=sp.diff(F,x); \
M=2*y(x)*sp.sin(x)+3*y(x)**4*sp.sin(x)*sp.cos(x); N=4*y(x)**3*sp.cos(x)**2+sp.cos(x); \
print(sp.simplify(dF/(-sp.cos(x)*(M-N*sp.diff(y(x),x)))))"
# 1

Exactness check after multiplying by cos⁡x\cos x: My∗−Nx∗=0M^\ast_y-N^\ast_x=0 (sympy). ✓

We post more of this — worked solutions, CSAT trap breakdowns, guide chapters — a few times a week on Telegram. Free, no sign-in. Join

This solution is part of the Maths Coverage Map — 14 years, mapped. Get the take-away PDF free.