4.25.3 \(a^2 y(x)+y''(x)=x^2+x+1\)

ODE
\[ a^2 y(x)+y''(x)=x^2+x+1 \] ODE Classification

[[_2nd_order, _with_linear_symmetries]]

Book solution method
TO DO

Mathematica
cpu = 0.00386767 (sec), leaf count = 36

\[\left \{\left \{y(x)\to \frac {a^2 \left (x^2+x+1\right )-2}{a^4}+c_2 \sin (a x)+c_1 \cos (a x)\right \}\right \}\]

Maple
cpu = 0.021 (sec), leaf count = 38

\[ \left \{ y \left ( x \right ) ={\frac {\cos \left ( ax \right ) {\it \_C1}\,{a}^{4}+\sin \left ( ax \right ) {\it \_C2}\,{a}^{4}-2+ \left ( {x}^{2}+x+1 \right ) {a}^{2}}{{a}^{4}}} \right \} \] Mathematica raw input

DSolve[a^2*y[x] + y''[x] == 1 + x + x^2,y[x],x]

Mathematica raw output

{{y[x] -> (-2 + a^2*(1 + x + x^2))/a^4 + C[1]*Cos[a*x] + C[2]*Sin[a*x]}}

Maple raw input

dsolve(diff(diff(y(x),x),x)+a^2*y(x) = x^2+x+1, y(x),'implicit')

Maple raw output

y(x) = (cos(a*x)*_C1*a^4+sin(a*x)*_C2*a^4-2+(x^2+x+1)*a^2)/a^4