78.16.7 problem 7

Internal problem ID [18386]
Book : DIFFERENTIAL EQUATIONS WITH APPLICATIONS AND HISTORICAL NOTES by George F. Simmons. 3rd edition. 2017. CRC press, Boca Raton FL.
Section : Chapter 3. Second order linear equations. Section 23. Operator Methods for Finding Particular Solutions. Problems at page 169
Problem number : 7
Date solved : Tuesday, January 28, 2025 at 11:48:42 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Solution by Maple

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

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

Solution by Mathematica

Time used: 0.022 (sec). Leaf size: 55

DSolve[D[y[x],{x,2}]-D[y[x],x]+y[x]==x^3-3*x^2+1,y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to x^3-6 x+c_1 e^{x/2} \cos \left (\frac {\sqrt {3} x}{2}\right )+c_2 e^{x/2} \sin \left (\frac {\sqrt {3} x}{2}\right )-5 \]