8.11.2 problem 2

Internal problem ID [870]
Book : Differential equations and linear algebra, 3rd ed., Edwards and Penney
Section : Section 5.5, Nonhomogeneous equations and undetermined coefficients Page 351
Problem number : 2
Date solved : Monday, January 27, 2025 at 03:10:57 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Solution by Maple

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

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

Solution by Mathematica

Time used: 0.014 (sec). Leaf size: 30

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