4.24.32 \(y''(x)+y(x)=a x\)

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

[[_2nd_order, _with_linear_symmetries]]

Book solution method
TO DO

Mathematica
cpu = 0.149393 (sec), leaf count = 19

\[\{\{y(x)\to a x+c_1 \cos (x)+c_2 \sin (x)\}\}\]

Maple
cpu = 0.019 (sec), leaf count = 16

\[[y \left (x \right ) = \sin \left (x \right ) \textit {\_C2} +\textit {\_C1} \cos \left (x \right )+a x]\] Mathematica raw input

DSolve[y[x] + y''[x] == a*x,y[x],x]

Mathematica raw output

{{y[x] -> a*x + C[1]*Cos[x] + C[2]*Sin[x]}}

Maple raw input

dsolve(diff(diff(y(x),x),x)+y(x) = a*x, y(x))

Maple raw output

[y(x) = sin(x)*_C2+_C1*cos(x)+a*x]