← 2023 Paper 1
UPSC 2023 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
Obtain the solution of the initial-value problem dxdy−2xy=2, y(0)=1 in the form
y=ex2[1+πerf(x)].
Technique
Linear ODE with integrating factor e−x2; integrate the RHS to introduce the error function erf.
Solution
Step 1 — Linear ODE; find integrating factor.
The ODE is y′−2xy=2, a first-order linear ODE.
Integrating factor: μ(x)=exp(−∫2xdx)=e−x2.
Multiply through:
e−x2dxdy−2xe−x2y=2e−x2⇒dxd(e−x2y)=2e−x2.
Step 2 — Integrate.
e−x2y=∫2e−x2dx+C.
Recall erf(x)=π2∫0xe−t2dt. So ∫2e−x2dx=πerf(x)+const.
Therefore e−x2y=πerf(x)+C.
Step 3 — Apply initial condition y(0)=1.
At x=0: e0⋅1=1=π⋅erf(0)+C=0+C, so C=1.
Hence
y=ex2[πerf(x)+1]=ex2[1+πerf(x)].