6.10.6 problem 6

Internal problem ID [1810]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 5 linear second order equations. Section 5.7 Variation of Parameters. Page 262
Problem number : 6
Date solved : Tuesday, September 30, 2025 at 05:19:47 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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