← 2019 Paper 1

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

10 marks · Section B

Exact equations · ODEs · asked 9× in 13 yrs · Read the full method →

Question

Solve the differential equation

(2ysinx+3y4sinxcosx)dx(4y3cos2x+cosx)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(MyNx)/Ndx=cosx\mu(x)=e^{\int (M_y-N_x)/N\,dx}=\cos x; then exact-equation integration.

Solution

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

M=2ysinx+3y4sinxcosx,N=(4y3cos2x+cosx).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=2sinx+12y3sinxcosx,Nx=4y3sinxcosx+sinx.M_y=2\sin x+12y^3\sin x\cos x,\qquad N_x=4y^3\sin x\cos x+\sin x.

Since MyNxM_y\neq N_x, the equation is not exact.

Step 2 — Find an integrating factor

Test for a factor depending on xx alone:

MyNxN=(2sinx+12y3sinxcosx)(4y3sinxcosx+sinx)(4y3cos2x+cosx)=sinx(1+8y3cosx)cosx(1+4y3cosx).\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=MyNxN\dfrac1\mu\dfrac{d\mu}{dx}=\dfrac{M_y-N_x}{N}. Computing directly (sympy below) gives

MyNxN=tanx,\frac{M_y-N_x}{N}=-\tan x,

a function of xx only. Hence

μ(x)=exp ⁣(tanxdx)=exp(lncosx)=cosx.\mu(x)=\exp\!\left(\int -\tan x\,dx\right)=\exp(\ln\cos x)=\cos x.

Step 3 — Make the equation exact

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

M=cosx(2ysinx+3y4sinxcosx)=2ysinxcosx+3y4sinxcos2x,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=cosx(4y3cos2x+cosx)=4y3cos3xcos2x.N^\ast=-\cos x\,(4y^3\cos^2 x+\cos x)=-4y^3\cos^3 x-\cos^2 x.

Now My=2sinxcosx+12y3sinxcos2x=NxM^\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=NF_x=M^\ast,\ F_y=N^\ast. Integrate NN^\ast in yy:

F=Ndy=y4cos3xycos2x+h(x).F=\int N^\ast\,dy=-y^4\cos^3 x-y\cos^2 x+h(x).

Then Fx=3y4cos2xsinx+2ycosxsinx+h(x)F_x=3y^4\cos^2 x\sin x+2y\cos x\sin x+h'(x), which must equal MM^\ast; this forces h(x)=0h'(x)=0. Hence

F=(y4cos3x+ycos2x).F=-\big(y^4\cos^3 x+y\cos^2 x\big).

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

  y4cos3x+ycos2x=C  equivalentlyycos2x(y3cosx+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 y4cos3x+ycos2x=Cy^4\cos^3x+y\cos^2x=C implicitly and clearing cosx\cos x reproduces the original equation exactly (sympy simplify of the ratio of the differentiated form to cosx(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 cosx\cos x: MyNx=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 — 13 years, mapped. Get the take-away PDF free.