38.4.9 problem 9

Internal problem ID [6495]
Book : Engineering Mathematics. By K. A. Stroud. 5th edition. Industrial press Inc. NY. 2001
Section : Program 25. Second order differential equations. Further problems 25. page 1094
Problem number : 9
Date solved : Monday, January 27, 2025 at 02:08:22 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Solution by Maple

Time used: 0.002 (sec). Leaf size: 34

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

Solution by Mathematica

Time used: 0.023 (sec). Leaf size: 48

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