78.14.8 problem 3 (f)

Internal problem ID [18344]
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 : Tuesday, January 28, 2025 at 11:47:45 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*}

Solution by Maple

Time used: 0.003 (sec). Leaf size: 34

dsolve(diff(y(x),x$2)-3*diff(y(x),x)+2*y(x)=1/(1+exp(-x)),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} \]

Solution by Mathematica

Time used: 0.089 (sec). Leaf size: 34

DSolve[D[y[x],{x,2}] -3*D[y[x],x]+2*y[x]==1/(1+Exp[-x]),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 ) \]