Menu Close

Higher order linear equations with constant coefficients: UPSC Maths Optional PYQ Solutions (2010–2023)

All 13 questions UPSC has asked on higher order linear equations with constant coefficients in the Mathematics Optional (Paper I, Ordinary Differential Equations) from 2010 to 2023, solved step by step – latest first.

Try them yourself first: the same questions, without solutions, are on our Ordinary Differential Equations topic-wise PYQs page.

How we check these solutions

These are our own solutions, prepared with AI help. UPSC does not publish official answers. Every solution is checked a second way before it goes up, and says how:

  • ✓ Checked by computer the answer was worked out again independently with computer algebra (SymPy).
  • ✓ Proof checked step by step for “prove that” questions, every step was checked against the definitions.

Spotted a mistake or a neater method? Tell us in the comments below or through Report an error.

Jump to a question (year · question number):

2023 · 6a 2021 · 5a 2019 · 5b 2018 · 5a 2018 · 5c 2018 · 6c 2018 · 7c 2017 · 6a(i) 2017 · 6b(ii) 2016 · 5a 2012 · 6b 2011 · 6b 2010 · 8a

Cover of the UPSC Prelims Topic-wise PYQ book with detailed explanations

From the Optional Province team

Preparing for Prelims too?

Our UPSC Prelims Topic-wise PYQ Book covers every Prelims question with detailed explanations, so you can see exactly where UPSC asks from. Now available as a hard copy and an eBook.

Buy Hard Copy on AmazonBuy eBook (PDF)

Download a free sample

Solve the differential equation : d3ydx3−3d2ydx2+4dydx−2y=ex+cosx.

2023 · Paper I · Q6a · 15 marks

Solution

Complementary function. m3−3m2+4m−2=(m−1)(m2−2m+2)=0m^3-3m^2+4m-2=(m-1)(m^2-2m+2)=0, so m=1,1±im=1,\ 1\pm i: yc=c1ex+ex(c2cosx+c3sinx).y_c=c_1e^x+e^x(c_2\cos x+c_3\sin x). PI for exe^x. m=1m=1 is a simple root, so 1f(D)ex=xexf′(1)=xex3−6+4=xex.\frac{1}{f(D)}e^x=x\,\frac{e^x}{f'(1)}=x\frac{e^x}{3-6+4}=xe^x . PI for cosx\cos x. Put D2=−1D^2=-1, so D3=−DD^3=-D: 1D3−3D2+4D−2cosx=1−D+3+4D−2cosx=13D+1cosx=3D−19D2−1cosx=−3sinx−cosx−10.\frac{1}{D^3-3D^2+4D-2}\cos x=\frac{1}{-D+3+4D-2}\cos x=\frac{1}{3D+1}\cos x=\frac{3D-1}{9D^2-1}\cos x=\frac{-3\sin x-\cos x}{-10}. So this part is 3sinx+cosx10\dfrac{3\sin x+\cos x}{10}.

Complete solution: y=c1ex+ex(c2cosx+c3sinx)+xex+3sinx+cosx10.y=c_1e^x+e^x(c_2\cos x+c_3\sin x)+xe^x+\frac{3\sin x+\cos x}{10}.

✓ Checked by computer We solved the equation by computer (SymPy); its solution agrees with ours.

↑ Back to the question list

Solve the differential equation : d2ydx2+2y=x2e3x+excos2x

2021 · Paper I · Q5a · 10 marks

Solution

CF: m2+2=0m^2+2=0, so yc=c1cos2x+c2sin2xy_c=c_1\cos\sqrt2x+c_2\sin\sqrt2x.

PI for x2e3xx^2e^{3x}. Shift e3xe^{3x} through (D→D+3D\to D+3): e3x1(D+3)2+2x2=e3x111+6D+D2x2=e3x11[1−6D+D211+36D2121−⋯]x2.e^{3x}\frac{1}{(D+3)^2+2}x^2=e^{3x}\frac{1}{11+6D+D^2}x^2=\frac{e^{3x}}{11}\left[1-\frac{6D+D^2}{11}+\frac{36D^2}{121}-\cdots\right]x^2 . =e3x11[x2−12x+211+72121]=e3x11[x2−12x11+50121].=\frac{e^{3x}}{11}\left[x^2-\frac{12x+2}{11}+\frac{72}{121}\right]=\frac{e^{3x}}{11}\left[x^2-\frac{12x}{11}+\frac{50}{121}\right]. PI for excos2xe^x\cos2x. ex1(D+1)2+2cos2x=ex1D2+2D+3cos2x=ex12D−1cos2x=ex2D+14D2−1cos2x=ex−4sin2x+cos2x−17.e^x\frac{1}{(D+1)^2+2}\cos2x=e^x\frac{1}{D^2+2D+3}\cos2x=e^x\frac{1}{2D-1}\cos2x=e^x\frac{2D+1}{4D^2-1}\cos2x=e^x\frac{-4\sin2x+\cos2x}{-17}. Complete solution: y=c1cos2x+c2sin2x+e3x1331(121x2−132x+50)+ex17(4sin2x−cos2x).y=c_1\cos\sqrt2x+c_2\sin\sqrt2x+\frac{e^{3x}}{1331}\left(121x^2-132x+50\right)+\frac{e^x}{17}\left(4\sin2x-\cos2x\right).

✓ Checked by computer We solved the equation by computer (SymPy); its particular integral agrees term by term with ours.

↑ Back to the question list

Determine the complete solution of the differential equation d2ydx2−4dydx+4y=3x2e2xsin2x

2019 · Paper I · Q5b · 10 marks

Solution

CF: (D−2)2y=0(D-2)^2y=0, so yc=(c1+c2x)e2xy_c=(c_1+c_2x)e^{2x}.

PI. Shift e2xe^{2x} through (D→D+2D\to D+2): 1(D−2)23x2e2xsin2x=3e2x1D2(x2sin2x).\frac{1}{(D-2)^2}3x^2e^{2x}\sin2x=3e^{2x}\frac{1}{D^2}\left(x^2\sin2x\right). Integrate twice. First, ∫x2sin2xdx=−x2cos2x2+xsin2x2+cos2x4.\int x^2\sin2x\,dx=-\frac{x^2\cos2x}{2}+\frac{x\sin2x}{2}+\frac{\cos2x}{4}. Integrating again, ∫(−x2cos2x2+xsin2x2+cos2x4)dx=−x2sin2x4−xcos2x2+3sin2x8.\int\left(-\frac{x^2\cos2x}{2}+\frac{x\sin2x}{2}+\frac{\cos2x}{4}\right)dx=-\frac{x^2\sin2x}{4}-\frac{x\cos2x}{2}+\frac{3\sin2x}{8}. So yp=3e2x(−x2sin2x4−xcos2x2+3sin2x8).y_p=3e^{2x}\left(-\frac{x^2\sin2x}{4}-\frac{x\cos2x}{2}+\frac{3\sin2x}{8}\right). Complete solution: y=(c1+c2x)e2x−3e2x8(2x2sin2x+4xcos2x−3sin2x).y=(c_1+c_2x)e^{2x}-\frac{3e^{2x}}{8}\left(2x^2\sin2x+4x\cos2x-3\sin2x\right).

✓ Checked by computer We solved the equation by computer (SymPy); its solution agrees with ours.

↑ Back to the question list

Solve : y″−y=x2e2x

2018 · Paper I · Q5a · 10 marks

Solution

CF: yc=c1ex+c2e−xy_c=c_1e^x+c_2e^{-x}.

PI. Shift e2xe^{2x} through: e2x1(D+2)2−1x2=e2x13+4D+D2x2=e2x3[1−4D+D23+16D29−⋯]x2.e^{2x}\frac{1}{(D+2)^2-1}x^2=e^{2x}\frac{1}{3+4D+D^2}x^2=\frac{e^{2x}}{3}\left[1-\frac{4D+D^2}{3}+\frac{16D^2}{9}-\cdots\right]x^2 . =e2x3[x2−8x+23+329]=e2x27(9x2−24x+26).=\frac{e^{2x}}3\left[x^2-\frac{8x+2}{3}+\frac{32}{9}\right]=\frac{e^{2x}}{27}\left(9x^2-24x+26\right). Complete solution: y=c1ex+c2e−x+e2x27(9x2−24x+26).y=c_1e^x+c_2e^{-x}+\frac{e^{2x}}{27}\left(9x^2-24x+26\right).

✓ Checked by computer We solved the equation by computer (SymPy); its solution agrees with ours.

↑ Back to the question list

Solve : y‴−6y″+12y′−8y=12e2x+27e−x

2018 · Paper I · Q5c · 10 marks

Solution

CF: m3−6m2+12m−8=(m−2)3m^3-6m^2+12m-8=(m-2)^3, so yc=(c1+c2x+c3x2)e2xy_c=(c_1+c_2x+c_3x^2)e^{2x}.

PI for 12e2x12e^{2x}. m=2m=2 is a triple root: 1(D−2)312e2x=12e2x1D31=12e2xx36=2x3e2x.\frac{1}{(D-2)^3}12e^{2x}=12e^{2x}\frac{1}{D^3}1=12e^{2x}\frac{x^3}{6}=2x^3e^{2x}. PI for 27e−x27e^{-x}. 27e−x(−1−2)3=−e−x\dfrac{27e^{-x}}{(-1-2)^3}=-e^{-x}.

Complete solution: y=(c1+c2x+c3x2)e2x+2x3e2x−e−x.y=(c_1+c_2x+c_3x^2)e^{2x}+2x^3e^{2x}-e^{-x}.

✓ Checked by computer We solved the equation by computer (SymPy); its solution agrees with ours.

↑ Back to the question list

Solve : y″+16y=32sec2x

2018 · Paper I · Q6c · 13 marks

Solution

CF: yc=c1cos4x+c2sin4xy_c=c_1\cos4x+c_2\sin4x. Take y1=cos4xy_1=\cos4x, y2=sin4xy_2=\sin4x; W=4W=4. Use variation of parameters with R=32sec2xR=32\sec2x.

∫y2RWdx=∫8sin4xsec2xdx=∫16sin2xdx=−8cos2x.\int\frac{y_2R}{W}dx=\int8\sin4x\sec2x\,dx=\int16\sin2x\,dx=-8\cos2x . ∫y1RWdx=∫8cos4xsec2xdx=∫8(2cos2x−sec2x)dx=8sin2x−4log|sec2x+tan2x|.\int\frac{y_1R}{W}dx=\int8\cos4x\sec2x\,dx=\int8\left(2\cos2x-\sec2x\right)dx=8\sin2x-4\log|\sec2x+\tan2x| . (using cos4x=2cos22x−1\cos4x=2\cos^22x-1). So yp=−cos4x(−8cos2x)+sin4x(8sin2x−4log|sec2x+tan2x|)=8cos2x−4sin4xlog|sec2x+tan2x|.y_p=-\cos4x(-8\cos2x)+\sin4x\left(8\sin2x-4\log|\sec2x+\tan2x|\right)=8\cos2x-4\sin4x\log|\sec2x+\tan2x| . Complete solution: y=c1cos4x+c2sin4x+8cos2x−4sin4xlog|sec2x+tan2x|.y=c_1\cos4x+c_2\sin4x+8\cos2x-4\sin4x\,\log|\sec2x+\tan2x| .

✓ Checked by computer We checked by computer (SymPy): substituting the solution into the equation leaves exactly 32sec2x32\sec2x.

↑ Back to the question list

Cover of the UPSC Mains Topic-wise and Year-wise PYQs book (2013–2026)

From the Optional Province team

Strengthen your GS papers

Our UPSC Mains Topic-wise & Year-wise PYQ Book (2013–2026) maps every GS question to the syllabus, so you know what UPSC asks and how often. Now available as a hard copy and an eBook.

Buy Hard Copy on AmazonBuy eBook (PDF)

Download a free sample

Solve the initial value problem y″−5y′+4y=e2ty(0)=1912,y′(0)=83

2018 · Paper I · Q7c · 13 marks

Solution

CF: m2−5m+4=(m−1)(m−4)m^2-5m+4=(m-1)(m-4), so yc=Aet+Be4ty_c=Ae^t+Be^{4t}.

PI: e2t4−10+4=−e2t2\dfrac{e^{2t}}{4-10+4}=-\dfrac{e^{2t}}{2}.

So y=Aet+Be4t−12e2ty=Ae^t+Be^{4t}-\tfrac12e^{2t}. The conditions give A+B−12=1912,A+4B−1=83⇒A+B=2512,A+4B=113.A+B-\tfrac12=\tfrac{19}{12},\qquad A+4B-1=\tfrac83\quad\Rightarrow\quad A+B=\tfrac{25}{12},\quad A+4B=\tfrac{11}{3}. So 3B=19123B=\tfrac{19}{12}, B=1936B=\tfrac{19}{36}, A=149A=\tfrac{14}{9}: y=149et+1936e4t−12e2t.y=\frac{14}{9}e^t+\frac{19}{36}e^{4t}-\frac12e^{2t}.

✓ Checked by computer We checked by computer (SymPy): the solution satisfies the equation and both initial conditions.

↑ Back to the question list

Solve the following simultaneous linear differential equations : (D+1)y=z+ex and (D+1)z=y+ex where y and z are functions of independent variable x and D≡ddx.

2017 · Paper I · Q6a(i) · 8 marks

Solution

Subtract the equations: (D+1)(y−z)=z−y(D+1)(y-z)=z-y, so (D+2)(y−z)=0(D+2)(y-z)=0: y−z=Ae−2x.y-z=Ae^{-2x}. Add them: (D+1)(y+z)=(y+z)+2ex(D+1)(y+z)=(y+z)+2e^x, so D(y+z)=2exD(y+z)=2e^x: y+z=2ex+B.y+z=2e^x+B . Hence y=ex+B2+A2e−2x,z=ex+B2−A2e−2x,y=e^x+\frac B2+\frac A2e^{-2x},\qquad z=e^x+\frac B2-\frac A2e^{-2x}, with AA, BB arbitrary constants.

✓ Checked by computer We checked by computer (SymPy): both equations are satisfied identically.

↑ Back to the question list

Solve the following initial value differential equations : 20y″+4y′+y=0, y(0)=3.2 and y′(0)=0.

2017 · Paper I · Q6b(ii) · 7 marks

Solution

The auxiliary equation 20m2+4m+1=020m^2+4m+1=0 gives m=−4±16−8040=−110±15i.m=\frac{-4\pm\sqrt{16-80}}{40}=-\frac1{10}\pm\frac15i . So y=e−x/10(Acosx5+Bsinx5)y=e^{-x/10}\left(A\cos\dfrac x5+B\sin\dfrac x5\right).

y(0)=3.2y(0)=3.2 gives A=3.2A=3.2. y′(0)=−A10+B5=0y'(0)=-\dfrac{A}{10}+\dfrac B5=0 gives B=1.6B=1.6. Hence y=e−x/10(3.2cosx5+1.6sinx5).y=e^{-x/10}\left(3.2\cos\frac x5+1.6\sin\frac x5\right).

✓ Checked by computer We checked by computer (SymPy): the solution satisfies the equation and both initial conditions.

↑ Back to the question list

Find a particular integral of d2ydx2+y=ex/2sinx32.

2016 · Paper I · Q5a · 10 marks

Solution

Write ex/2sin3x2=Imeωxe^{x/2}\sin\dfrac{\sqrt3x}{2}=\operatorname{Im}e^{\omega x} with ω=12+32i=eiπ/3\omega=\dfrac12+\dfrac{\sqrt3}{2}i=e^{i\pi/3}. Then ω2=e2iπ/3=−12+32i\omega^2=e^{2i\pi/3}=-\dfrac12+\dfrac{\sqrt3}2i and ω2+1=12+32i=ω.\omega^2+1=\frac12+\frac{\sqrt3}{2}i=\omega . So 1D2+1eωx=eωxω=eωxω‾=ex/2(cos3x2+isin3x2)(12−32i).\frac{1}{D^2+1}e^{\omega x}=\frac{e^{\omega x}}{\omega}=e^{\omega x}\bar\omega=e^{x/2}\left(\cos\frac{\sqrt3x}2+i\sin\frac{\sqrt3x}2\right)\left(\frac12-\frac{\sqrt3}{2}i\right). Taking the imaginary part, a particular integral is yp=ex/22(sin3x2−3cos3x2).y_p=\frac{e^{x/2}}{2}\left(\sin\frac{\sqrt3x}{2}-\sqrt3\cos\frac{\sqrt3x}{2}\right).

✓ Checked by computer We checked by computer (SymPy): substituting the particular integral leaves exactly ex/2sin3x2e^{x/2}\sin\frac{\sqrt3x}{2}.

↑ Back to the question list

Find the general solution of the equation y‴−y″=12x2+6x.

2012 · Paper I · Q6b · 20 marks

Solution

CF: m3−m2=m2(m−1)m^3-m^2=m^2(m-1), so yc=c1+c2x+c3exy_c=c_1+c_2x+c_3e^x.

PI. Write D3−D2=−D2(1−D)D^3-D^2=-D^2(1-D): −1D2(1−D)−1(12x2+6x)=−1D2(1+D+D2)(12x2+6x)=−1D2(12x2+30x+30).-\frac{1}{D^2}(1-D)^{-1}(12x^2+6x)=-\frac1{D^2}\left(1+D+D^2\right)(12x^2+6x)=-\frac1{D^2}\left(12x^2+30x+30\right). Integrating twice: −(x4+5x3+15x2)-\left(x^4+5x^3+15x^2\right).

General solution: y=c1+c2x+c3ex−x4−5x3−15x2.y=c_1+c_2x+c_3e^x-x^4-5x^3-15x^2 .

✓ Checked by computer We solved the equation by computer (SymPy); its solution agrees with ours.

↑ Back to the question list

Obtain the general solution of the second order ordinary differential equation y″−2y′+2y=x+excosx, where dashes denote derivatives w.r.t. x.

2011 · Paper I · Q6b · 15 marks

Solution

CF: m2−2m+2=0m^2-2m+2=0, m=1±im=1\pm i: yc=ex(c1cosx+c2sinx)y_c=e^x(c_1\cos x+c_2\sin x).

PI for xx: 12(1−D+D22)x=12(1+D+⋯)x=x+12.\frac{1}{2\left(1-D+\frac{D^2}2\right)}x=\frac12(1+D+\cdots)x=\frac{x+1}2 . PI for excosxe^x\cos x. Shift: ex1(D+1)2−2(D+1)+2cosx=ex1D2+1cosxe^x\dfrac{1}{(D+1)^2-2(D+1)+2}\cos x=e^x\dfrac1{D^2+1}\cos x. This is the resonant case: 1D2+1cosx=x2sinx,so the PI is x2exsinx.\frac{1}{D^2+1}\cos x=\frac x2\sin x,\qquad\text{so the PI is }\frac x2e^x\sin x . General solution: y=ex(c1cosx+c2sinx)+x+12+x2exsinx.y=e^x(c_1\cos x+c_2\sin x)+\frac{x+1}{2}+\frac{x}{2}e^x\sin x .

✓ Checked by computer We solved the equation by computer (SymPy); its solution agrees with ours.

↑ Back to the question list

Use the method of undetermined coefficients to find the particular solution of y″+y=sinx+(1+x2)ex and hence find its general solution.

2010 · Paper I · Q8a · 20 marks

Solution

CF: yc=c1cosx+c2sinxy_c=c_1\cos x+c_2\sin x.

Trial solution. sinx\sin x duplicates the CF, so multiply by xx; for (1+x2)ex(1+x^2)e^x use a quadratic times exe^x: yp=x(Acosx+Bsinx)+(Cx2+Ex+F)ex.y_p=x(A\cos x+B\sin x)+(Cx^2+Ex+F)e^x . First part. (D2+1)[x(Acosx+Bsinx)]=−2Asinx+2Bcosx(D^2+1)\left[x(A\cos x+B\sin x)\right]=-2A\sin x+2B\cos x. Equate to sinx\sin x: A=−12A=-\tfrac12, B=0B=0.

Second part. (D2+1)[(Cx2+Ex+F)ex]=ex[2Cx2+(4C+2E)x+(2C+2E+2F)](D^2+1)\left[(Cx^2+Ex+F)e^x\right]=e^x\left[2Cx^2+(4C+2E)x+(2C+2E+2F)\right]. Equate to (1+x2)ex(1+x^2)e^x: 2C=1,4C+2E=0,2C+2E+2F=1⇒C=12,E=−1,F=1.2C=1,\quad4C+2E=0,\quad2C+2E+2F=1\quad\Rightarrow\quad C=\tfrac12,\ E=-1,\ F=1 . So yp=−x2cosx+(x22−x+1)ex.y_p=-\frac x2\cos x+\left(\frac{x^2}2-x+1\right)e^x . General solution: y=c1cosx+c2sinx−x2cosx+(x22−x+1)ex.y=c_1\cos x+c_2\sin x-\frac x2\cos x+\left(\frac{x^2}{2}-x+1\right)e^x .

✓ Checked by computer We checked by computer (SymPy): the coefficients found satisfy the equation exactly.

↑ Back to the question list

More on Ordinary Differential Equations

Questions: UPSC Civil Services (Main) Examination, Mathematics Paper I, 2010–2023. Solutions: Optional Province. Found an error? Tell us.

Spotted an error? Tell us.

We classify every PYQ with care, but mistakes can slip in. If a question is in the wrong topic, has a typo, the wrong year, or is missing, let us know. We review every report and update the page.

Report an Error
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted