23.3.17 problem 8(g)

Internal problem ID [4158]
Book : Theory and solutions of Ordinary Differential equations, Donald Greenspan, 1960
Section : Chapter 4. The general linear differential equation of order n. Exercises at page 63
Problem number : 8(g)
Date solved : Monday, January 27, 2025 at 08:40:58 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-6 y^{\prime }+9 y&={\mathrm e}^{x} \sin \left (x \right ) \end{align*}

Solution by Maple

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

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

Solution by Mathematica

Time used: 0.082 (sec). Leaf size: 35

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