78.2.17 problem 5.g

Internal problem ID [20969]
Book : A FIRST COURSE IN DIFFERENTIAL EQUATIONS FOR SCIENTISTS AND ENGINEERS. By Russell Herman. University of North Carolina Wilmington. LibreText. compiled on 06/09/2025
Section : Chapter 2, Second order ODEs. Problems section 2.6
Problem number : 5.g
Date solved : Thursday, October 02, 2025 at 07:00:49 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} y^{\prime \prime }-y&=1+{\mathrm e}^{x} \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 24
ode:=diff(diff(y(x),x),x)-y(x) = exp(x)+1; 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{-x} c_1 -1+\frac {\left (2 x +4 c_2 -1\right ) {\mathrm e}^{x}}{4} \]
Mathematica. Time used: 0.03 (sec). Leaf size: 40
ode=D[y[x],{x,2}]-y[x]==Exp[x]+1; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{4} e^{-x} \left (-4 e^x+e^{2 x} (2 x-1+4 c_1)-1+4 c_2\right ) \end{align*}
Sympy. Time used: 0.056 (sec). Leaf size: 17
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-y(x) - exp(x) + Derivative(y(x), (x, 2)) - 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{2} e^{- x} + \left (C_{1} + \frac {x}{2}\right ) e^{x} - 1 \]