64.12.13 problem 13

Internal problem ID [13446]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 4, Section 4.4. Variation of parameters. Exercises page 162
Problem number : 13
Date solved : Monday, March 31, 2025 at 07:58:07 AM
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: 36
ode:=diff(diff(y(x),x),x)+3*diff(y(x),x)+2*y(x) = 1/(exp(x)+1); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (-{\mathrm e}^{-x} c_1 +x -\ln \left ({\mathrm e}^{x}\right )+\ln \left (1+{\mathrm e}^{x}\right ) \left ({\mathrm e}^{-x}+1\right )+c_2 \right ) {\mathrm e}^{-x} \]
Mathematica. Time used: 0.06 (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^{-2 x} \left (\left (e^x+1\right ) \log \left (e^x+1\right )+(-1+c_2) e^x+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/(exp(x) + 1),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)) - Derivative(y(x), (x, 2)) + 1)/(3*(exp(x) + 1)) cannot be solved by the factorable group method