48.2.4 problem Example 3.21

Internal problem ID [7520]
Book : THEORY OF DIFFERENTIAL EQUATIONS IN ENGINEERING AND MECHANICS. K.T. CHAU, CRC Press. Boca Raton, FL. 2018
Section : Chapter 3. Ordinary Differential Equations. Section 3.3 SECOND ORDER ODE. Page 147
Problem number : Example 3.21
Date solved : Monday, January 27, 2025 at 03:04:20 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Solution by Maple

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

dsolve(diff(y(x),x$2)-2*diff(y(x),x)-3*y(x)=3*x+1,y(x), singsol=all)
 
\[ y = c_{2} {\mathrm e}^{-x}+{\mathrm e}^{3 x} c_{1} -x +\frac {1}{3} \]

Solution by Mathematica

Time used: 0.016 (sec). Leaf size: 28

DSolve[D[y[x],{x,2}]-2*D[y[x],x]-3*y[x]==3*x+1,y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to -x+c_1 e^{-x}+c_2 e^{3 x}+\frac {1}{3} \]