40.10.3 problem 12

Internal problem ID [6725]
Book : Schaums Outline. Theory and problems of Differential Equations, 1st edition. Frank Ayres. McGraw Hill 1952
Section : Chapter 15. Linear equations with constant coefficients (Variation of parameters). Supplemetary problems. Page 98
Problem number : 12
Date solved : Wednesday, March 05, 2025 at 02:40:25 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Maple. Time used: 0.003 (sec). Leaf size: 57
ode:=diff(diff(y(x),x),x)-4*diff(y(x),x)+3*y(x) = 1/(1+exp(-x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\ln \left (1+{\mathrm e}^{-x}\right ) {\mathrm e}^{x}}{2}-\frac {\ln \left ({\mathrm e}^{x}+1\right ) {\mathrm e}^{3 x}}{2}+\frac {\left (4 c_1 +2 \ln \left ({\mathrm e}^{x}\right )\right ) {\mathrm e}^{3 x}}{4}+\frac {{\mathrm e}^{2 x}}{2}+\frac {\left (4 c_2 -1\right ) {\mathrm e}^{x}}{4} \]
Mathematica. Time used: 0.328 (sec). Leaf size: 49
ode=D[y[x],{x,2}]-4*D[y[x],x]+3*y[x]==1/(1+Exp[-x]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {1}{4} e^x \left (-4 \left (e^{2 x}-1\right ) \text {arctanh}\left (2 e^x+1\right )+2 e^x+4 c_2 e^{2 x}-1+4 c_1\right ) \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(3*y(x) - 4*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) - (3*y(x)*exp(x) + 3*y(x) + exp(x)*Derivative(y(x), (x, 2)) - exp(x) + Derivative(y(x), (x, 2)))/(4*(exp(x) + 1)) cannot be solved by the factorable group method