78.14.8 problem 3 (f)

Internal problem ID [18273]
Book : DIFFERENTIAL EQUATIONS WITH APPLICATIONS AND HISTORICAL NOTES by George F. Simmons. 3rd edition. 2017. CRC press, Boca Raton FL.
Section : Chapter 3. Second order linear equations. Section 19. The Method of Variation of Parameters. Problems at page 135
Problem number : 3 (f)
Date solved : Monday, March 31, 2025 at 05:24:29 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-3 y^{\prime }+2 y&=\frac {1}{1+{\mathrm e}^{-x}} \end{align*}

Maple. Time used: 0.002 (sec). Leaf size: 34
ode:=diff(diff(y(x),x),x)-3*diff(y(x),x)+2*y(x) = 1/(1+exp(-x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (\ln \left ({\mathrm e}^{x}+1\right ) \left ({\mathrm e}^{x}+1\right )+\left (-{\mathrm e}^{x}-1\right ) \ln \left ({\mathrm e}^{x}\right )+{\mathrm e}^{x} c_1 +c_2 -1\right ) {\mathrm e}^{x} \]
Mathematica. Time used: 0.089 (sec). Leaf size: 34
ode=D[y[x],{x,2}] -3*D[y[x],x]+2*y[x]==1/(1+Exp[-x]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^x \left (2 \left (e^x+1\right ) \text {arctanh}\left (2 e^x+1\right )+c_2 e^x-1+c_1\right ) \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*y(x) - 3*Derivative(y(x), x) + Derivative(y(x), (x, 2)) - 1/(1 + exp(-x)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - (2*y(x)*exp(x) + 2*y(x) + exp(x)*Derivative(y(x), (x, 2)) - exp(x) + Derivative(y(x), (x, 2)))/(3*(exp(x) + 1)) cannot be solved by the factorable group method