81.12.3 problem 16-3

Internal problem ID [21656]
Book : The Differential Equations Problem Solver. VOL. I. M. Fogiel director. REA, NY. 1978. ISBN 78-63609
Section : Chapter 16. Variation of Parameters. Page 375.
Problem number : 16-3
Date solved : Thursday, October 02, 2025 at 07:59:31 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} 2 y-3 y^{\prime }+y^{\prime \prime }&=\frac {1}{1+{\mathrm e}^{-x}} \end{align*}
Maple. Time used: 0.003 (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.023 (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]
 
\begin{align*} 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 ) \end{align*}
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