23.2.18 problem 6(g)

Internal problem ID [4135]
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(g)
Date solved : Monday, January 27, 2025 at 08:38:28 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} y^{\prime \prime }-y&=2 \,{\mathrm e}^{x} \end{align*}

Solution by Maple

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

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

Solution by Mathematica

Time used: 0.018 (sec). Leaf size: 25

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