23.2.21 problem 6(j)

Internal problem ID [4138]
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(j)
Date solved : Monday, January 27, 2025 at 08:38:35 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-2 y^{\prime }+3 y&=x^{3}+\sin \left (x \right ) \end{align*}

Solution by Maple

Time used: 0.004 (sec). Leaf size: 47

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

Solution by Mathematica

Time used: 1.388 (sec). Leaf size: 68

DSolve[D[y[x],{x,2}]-2*D[y[x],x]+3*y[x]==x^3+Sin[x],y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to \frac {x^3}{3}+\frac {2 x^2}{3}+\frac {2 x}{9}+\frac {\sin (x)}{4}+\frac {\cos (x)}{4}+c_2 e^x \cos \left (\sqrt {2} x\right )+c_1 e^x \sin \left (\sqrt {2} x\right )-\frac {8}{27} \]