y"-y=3x²eˣ.
Let y=y₁+y₂. The derivatives of y are the sum of the derivatives of the components y₁ and y₂.
If y₁"-y₁=0 and y₂"-y₂=3x²eˣ, then the original equation is satisfied.
y₁"-y₁=0 is solved by solving r²-1=(r+1)(r-1), so r=-1 and 1 which provides us with the characteristic solution y₁=Aeˣ+Be⁻ˣ where A and B are constants.
We might suppose that y₂=(a+bx+cx²)eˣ, where a, b, c are constants, but if we consider the derivative y₂", we can see we have cx²eˣ in this derivative and this will cancel the cx²eˣ term in y₂. Let’s suppose then that y₂=(ax+bx²+cx³)eˣ, then the cubic terms will cancel out when we apply the second order DE. Another reason for this is that we already have an eˣ in y₁ with a constant coefficient.
y₂'=(ax+bx²+cx³)eˣ+(a+2bx+3cx²)eˣ,
y₂"=(ax+bx²+cx³)eˣ+2(a+2bx+3cx²)eˣ+(2b+6cx)eˣ.
y₂"-y₂=2(a+2bx+3cx²)eˣ+(2b+6cx)eˣ≡3x²eˣ.
Equating coefficients:
6c=3, 2a+2b=0, 4b+6c=0⇒c=½, b=-¾, a=¾.
So y₂=(¾x-¾x²+½x³)eˣ and
y=Aeˣ+Be⁻ˣ+(¾x-¾x²+½x³)eˣ or
y=(A+¾x-¾x²+½x³)eˣ+Be⁻ˣ.
CHECK:
y'=(A+¾x-¾x²+½x³)eˣ+(¾-(3/2)x+(3/2)x²)eˣ-Be⁻ˣ,
y"=(A+¾x-¾x²+½x³)eˣ+2(¾-(3/2)x+(3/2)x²)eˣ+(-(3/2)+3x)eˣ+Be⁻ˣ.
y"-y=2(¾-(3/2)x+(3/2)x²)eˣ+(-(3/2)+3x)eˣ⇒
y"-y=3x²eˣ.