89.24.20 problem 20

Internal problem ID [24857]
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 : 20
Date solved : Thursday, October 02, 2025 at 10:48:44 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} 2 y-3 y^{\prime }+y^{\prime \prime }&=\frac {1}{\sqrt {1+{\mathrm e}^{-2 x}}} \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 52
ode:=diff(diff(y(x),x),x)-3*diff(y(x),x)+2*y(x) = 1/(1+exp(-2*x))^(1/2); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{x} c_2 +\frac {\sqrt {{\mathrm e}^{2 x}+1}\, \left (-\sqrt {{\mathrm e}^{2 x}+1}+\operatorname {arctanh}\left (\frac {1}{\sqrt {{\mathrm e}^{2 x}+1}}\right )\right )}{\sqrt {1+{\mathrm e}^{-2 x}}}+{\mathrm e}^{2 x} c_1 \]
Mathematica. Time used: 0.193 (sec). Leaf size: 70
ode=D[y[x],{x,2}]-3*D[y[x],x]+2*y[x]==  1/Sqrt[1+Exp[-2*x]]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^x \left (\frac {e^x \sqrt {e^{-2 x}+1} \left (\text {arctanh}\left (\sqrt {e^{2 x}+1}\right )-\sqrt {e^{2 x}+1}\right )}{\sqrt {e^{2 x}+1}}+c_2 e^x+c_1\right ) \end{align*}
Sympy. Time used: 0.423 (sec). Leaf size: 31
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/sqrt(1 + exp(-2*x)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} + \left (C_{2} - \sqrt {1 + e^{- 2 x}}\right ) e^{x} + \operatorname {asinh}{\left (e^{- x} \right )}\right ) e^{x} \]