15.3 problem 3

Internal problem ID [2236]

Book: Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section: Exercise 24, page 109
Problem number: 3.
ODE order: 2.
ODE degree: 1.

CAS Maple gives this as type [[_2nd_order, _linear, _nonhomogeneous]]

\[ \boxed {y^{\prime \prime }-y=\cos \left (x \right ) x^{2}} \]

Solution by Maple

Time used: 0.0 (sec). Leaf size: 30

dsolve(diff(y(x),x$2)-y(x)=x^2*cos(x),y(x), singsol=all)
 

\[ y = {\mathrm e}^{-x} c_{2} +c_{1} {\mathrm e}^{x}-\frac {\cos \left (x \right ) x^{2}}{2}+\frac {\cos \left (x \right )}{2}+x \sin \left (x \right ) \]

Solution by Mathematica

Time used: 0.02 (sec). Leaf size: 35

DSolve[y''[x]-y[x]==x^2*Cos[x],y[x],x,IncludeSingularSolutions -> True]
 

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