What will be the general solution of the differential equation d^2y/dx^2 = e^2x(12 cos3x – 5 sin3x)? (here, A and B are integration constant)

(a) y = e^x sin3x + Ax + B

(b) y = e^2x sin3x + Ax + B

(c) y = e^2x sin3x + A

(d) Data inadequate

I had been asked this question at a job interview.

This question is from Linear Second Order Differential Equations in section Differential Equations of Mathematics – Class 12

NCERT Solutions for Subject Clas 12 Math Select the correct answer from above options

Interview Questions and Answers, Database Interview Questions and Answers for Freshers and Experience

The correct option is (b) y = e^2x sin3x + Ax + B

The explanation is: Given, d^2y/dx^2 = e^2x(12 cos3x – 5 sin3x) ………(1)

Integrating (1) we get,

dy/dx = 12∫ e^2xcos3x dx – 5∫ e^2x sin3x dx

= 12 * (e^2x/2^2 + 3^2)[2cos3x + 3sin3x] – 5 * (e^2x/2^2 + 3^2)[2sin3x – 3cos3x] + A (A is integrationconstant)

So dy/dx = e^2x/13 [24 cos3x + 36 sin3x – 10 sin3x + 15 cos3x] + A

= e^2x/13(39 cos3x + 26 sin3x) + A

=> dy/dx = e^2x(3 cos3x + 2 sin3x) + A ……….(2)

Again integrating (2) we get,

y = 3*∫ e^2x cos3xdx + 2∫ e^2x sin3xdx + A ∫dx

y = 3*(e^2x/2^2 + 3^2)[2cos3x + 3sin3x] + 2*(e^2x/2^2 + 3^2)[2sin3x – 3cos3x] + Ax + B (B is integration constant)

y = e^2x/13(6 cos3x + 9 sin3x + 4 sin3x – 6 cos3x) + Ax + B

or, y = e^2x sin3x + Ax + B