← 2015 Paper 1

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

10 marks · Section B

Linear first-order · ODEs · asked 6× in 14 yrs · Read the full method →

Question

Solve the differential equation:

xcos⁡x dydx+y(xsin⁡x+cos⁡x)=1.x\cos x\,\dfrac{dy}{dx}+y(x\sin x+\cos x)=1.

Technique

Linear first-order ODE; integrating factor μ=exp⁡(∫P dx)=xsec⁡x\mu=\exp(\int P\,dx)=x\sec x; after multiplying, the RHS simplifies to sec⁡2x\sec^2 x, integrable by inspection.

Solution

Strategy. Divide by xcos⁡xx\cos x to get standard linear form y′+P(x)y=Q(x)y'+P(x)y=Q(x), find integrating factor. Watch for a clever rearrangement — the coefficient xsin⁡x+cos⁡xx\sin x+\cos x is exactly ddx(xsin⁡x)\dfrac{d}{dx}(x\sin x)… let’s check.

Step 1 — Recognise exact form

Note ddx(xsin⁡x)=sin⁡x+xcos⁡x\dfrac{d}{dx}(x\sin x)=\sin x+x\cos x. That’s not quite xsin⁡x+cos⁡xx\sin x+\cos x. But ddx(something involving xsec⁡x)\dfrac{d}{dx}(\text{something involving }x\sec x)? Let’s compute ddx(y⋅xsec⁡x)=xsec⁡x⋅y′+y(sec⁡x+xsec⁡xtan⁡x)\dfrac{d}{dx}(y\cdot x\sec x)=x\sec x\cdot y'+y(\sec x+x\sec x\tan x). Multiply through by cos⁡x\cos x: not matching directly.

Try the standard approach.

Step 2 — Standard form

Divide by xcos⁡xx\cos x (assuming xcos⁡x≠0x\cos x\ne 0):

dydx+xsin⁡x+cos⁡xxcos⁡x y=1xcos⁡x.\dfrac{dy}{dx}+\dfrac{x\sin x+\cos x}{x\cos x}\,y=\dfrac{1}{x\cos x}. dydx+(tan⁡x+1x)y=sec⁡xx.\dfrac{dy}{dx}+\bigl(\tan x+\tfrac{1}{x}\bigr)y=\dfrac{\sec x}{x}.

So P(x)=tan⁡x+1/xP(x)=\tan x+1/x, Q(x)=sec⁡x/xQ(x)=\sec x/x.

Step 3 — Integrating factor

μ(x)=exp⁡ ⁣∫P dx=exp⁡(∫tan⁡x dx+∫1x dx)=exp⁡(−ln⁡∣cos⁡x∣+ln⁡∣x∣)=∣x∣∣cos⁡x∣.\mu(x)=\exp\!\int P\,dx=\exp\bigl(\int\tan x\,dx+\int\tfrac{1}{x}\,dx\bigr)=\exp(-\ln|\cos x|+\ln|x|)=\dfrac{|x|}{|\cos x|}.

Drop absolute values: μ=xcos⁡x=xsec⁡x\mu=\dfrac{x}{\cos x}=x\sec x.

Step 4 — Multiply and integrate

ddx(μy)=μQ=xsec⁡x⋅sec⁡xx=sec⁡2x.\dfrac{d}{dx}(\mu y)=\mu Q=x\sec x\cdot\dfrac{\sec x}{x}=\sec^2 x.

Therefore

μy=∫sec⁡2x dx=tan⁡x+C.\mu y=\int\sec^2 x\,dx=\tan x+C. xsec⁡x⋅y=tan⁡x+C.x\sec x\cdot y=\tan x+C.

Step 5 — Solve for yy

y=tan⁡x+Cxsec⁡x=cos⁡x(tan⁡x+C)x=sin⁡x+Ccos⁡xx.y=\dfrac{\tan x+C}{x\sec x}=\dfrac{\cos x(\tan x+C)}{x}=\dfrac{\sin x+C\cos x}{x}.

Answer

  y=sin⁡x+Ccos⁡xx.  \boxed{\;y=\dfrac{\sin x+C\cos x}{x}.\;}
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.