← 2015 Paper 1
UPSC 2015 Maths Optional Paper 1 Q5a — Step-by-Step Solution
10 marks · Section B
Linear first-order · ODEs · asked 5× in 13 yrs · Read the full method →
Question
Solve the differential equation:
xcosxdxdy+y(xsinx+cosx)=1.
Technique
Linear first-order ODE; integrating factor μ=exp(∫Pdx)=xsecx; after multiplying, the RHS simplifies to sec2x, integrable by inspection.
Solution
Strategy. Divide by xcosx to get standard linear form y′+P(x)y=Q(x), find integrating factor. Watch for a clever rearrangement — the coefficient xsinx+cosx is exactly dxd(xsinx)… let’s check.
Note dxd(xsinx)=sinx+xcosx. That’s not quite xsinx+cosx. But dxd(something involving xsecx)? Let’s compute dxd(y⋅xsecx)=xsecx⋅y′+y(secx+xsecxtanx). Multiply through by cosx: not matching directly.
Try the standard approach.
Divide by xcosx (assuming xcosx=0):
dxdy+xcosxxsinx+cosxy=xcosx1.
dxdy+(tanx+x1)y=xsecx.
So P(x)=tanx+1/x, Q(x)=secx/x.
Step 3 — Integrating factor
μ(x)=exp∫Pdx=exp(∫tanxdx+∫x1dx)=exp(−ln∣cosx∣+ln∣x∣)=∣cosx∣∣x∣.
Drop absolute values: μ=cosxx=xsecx.
Step 4 — Multiply and integrate
dxd(μy)=μQ=xsecx⋅xsecx=sec2x.
Therefore
μy=∫sec2xdx=tanx+C.
xsecx⋅y=tanx+C.
Step 5 — Solve for y
y=xsecxtanx+C=xcosx(tanx+C)=xsinx+Ccosx.
Answer
y=xsinx+Ccosx.