15.2 problem 2

Internal problem ID [2235]

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: 2.
ODE order: 2.
ODE degree: 1.

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

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

Solution by Maple

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

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

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

Solution by Mathematica

Time used: 0.067 (sec). Leaf size: 41

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

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