find the general solution of the equation y"-y'-2y=x^2
Auxiliary eqn (assuming a solution of the form y = A.e^(mx) )
m^2 – m – 2 = 0
(m – 2)(m + 1) = 0
m = 2, m = -1
1st solution: y1(x) = A.e^(2x) + B.e^(-x)
Assume a solution of the form, y = Cx^2 + Dx + E
Then
Y’ = 2Cx + D
Y’’ = 2C
Substituting for these differentials into the original DE, y"-y'-2y=x^2,
2C – (2Cx + D) – 2(Cx^2 + Dx + E) = x^2
-2Cx^2 – 2(C + D)x + 2C - D – 2E = x^2
Comparing coefficients of the powers of x,
-2C = 1
-2(C + D) = 0
2C – D - 2E = 0
Giving, C = - ½ , D = ½ , E = - ¾
Hence, y2(x) = - ½x^2 + ½x - ¾
The general solution is y = y1 + y2
Answer: y(x) = A.e^(2x) + B.e^(-x) - ½x^2 + ½x - ¾