← 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.
Technique
Integrating factor μ(x)=e∫(My−Nx)/Ndx=cosx; then exact-equation integration.
Solution
Write the equation as Mdx+Ndy=0 with
M=2ysinx+3y4sinxcosx,N=−(4y3cos2x+cosx).
Step 1 — Test for exactness
My=2sinx+12y3sinxcosx,Nx=4y3sinxcosx+sinx.
Since My=Nx, the equation is not exact.
Step 2 — Find an integrating factor
Test for a factor depending on x alone:
NMy−Nx=−(4y3cos2x+cosx)(2sinx+12y3sinxcosx)−(4y3sinxcosx+sinx)=−cosx(1+4y3cosx)sinx(1+8y3cosx).
This is messy, so instead use the standard form μ1dxdμ=NMy−Nx. Computing directly (sympy below) gives
NMy−Nx=−tanx,
a function of x only. Hence
μ(x)=exp(∫−tanxdx)=exp(lncosx)=cosx.
Step 3 — Make the equation exact
Multiply by μ=cosx:
M∗=cosx(2ysinx+3y4sinxcosx)=2ysinxcosx+3y4sinxcos2x,
N∗=−cosx(4y3cos2x+cosx)=−4y3cos3x−cos2x.
Now My∗=2sinxcosx+12y3sinxcos2x=Nx∗, so the equation is exact.
Step 4 — Integrate
There exists F(x,y) with Fx=M∗, Fy=N∗. Integrate N∗ in y:
F=∫N∗dy=−y4cos3x−ycos2x+h(x).
Then Fx=3y4cos2xsinx+2ycosxsinx+h′(x), which must equal M∗; this forces h′(x)=0. Hence
F=−(y4cos3x+ycos2x).
The general solution is F=const:
y4cos3x+ycos2x=Cequivalentlyycos2x(y3cosx+1)=C.
Verification
Differentiating y4cos3x+ycos2x=C implicitly and clearing cosx reproduces the original equation exactly (sympy simplify of the ratio of the differentiated form to −cosx⋅(original) gives 1):
$ 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: My∗−Nx∗=0 (sympy). ✓