89.24.16 problem 16

Internal problem ID [24853]
Book : A short course in Differential Equations. Earl D. Rainville. Second edition. 1958. Macmillan Publisher, NY. CAT 58-5010
Section : Chapter 11. Variation of parameters and other methods. Exercises at page 171
Problem number : 16
Date solved : Thursday, October 02, 2025 at 10:48:41 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-5 y^{\prime }+4 y&=\frac {6}{1+{\mathrm e}^{-2 x}} \end{align*}
Maple. Time used: 0.007 (sec). Leaf size: 35
ode:=diff(diff(y(x),x),x)-5*diff(y(x),x)+4*y(x) = 6/(1+exp(-2*x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\left (\left (x -c_2 -\ln \left (\cosh \left (x \right )\right )+1\right ) {\mathrm e}^{3 x}-c_1 +{\mathrm e}^{x}+2 \arctan \left ({\mathrm e}^{x}\right )\right ) {\mathrm e}^{x} \]
Mathematica. Time used: 0.051 (sec). Leaf size: 48
ode=D[y[x],{x,2}]-5*D[y[x],x]+4*y[x]==  6/(1+Exp[-2*x]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^x \left (-2 \arctan \left (e^x\right )+2 e^{3 x} \text {arctanh}\left (2 e^{2 x}+1\right )-e^x+c_2 e^{3 x}+c_1\right ) \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(4*y(x) - 5*Derivative(y(x), x) + Derivative(y(x), (x, 2)) - 6/(1 + exp(-2*x)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - (4*y(x)*exp(2*x) + 4*y(x) + exp(2*x)*Deriv