23.2.14 problem 6(c)

Internal problem ID [4131]
Book : Theory and solutions of Ordinary Differential equations, Donald Greenspan, 1960
Section : Chapter 3. Linear differential equations of second order. Exercises at page 31
Problem number : 6(c)
Date solved : Monday, January 27, 2025 at 08:37:06 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+y&=x^{3}+x \end{align*}

Solution by Maple

Time used: 0.003 (sec). Leaf size: 19

dsolve(diff(y(x),x$2)+y(x)=x^3+x,y(x), singsol=all)
 
\[ y \left (x \right ) = c_{2} \sin \left (x \right )+\cos \left (x \right ) c_{1} +x^{3}-5 x \]

Solution by Mathematica

Time used: 0.013 (sec). Leaf size: 22

DSolve[D[y[x],{x,2}]+y[x]==x^3+x,y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to x^3-5 x+c_1 \cos (x)+c_2 \sin (x) \]