20.9.12 problem Problem 12

Internal problem ID [3756]
Book : Differential equations and linear algebra, Stephen W. Goode and Scott A Annin. Fourth edition, 2015
Section : Chapter 8, Linear differential equations of order n. Section 8.7, The Variation of Parameters Method. page 556
Problem number : Problem 12
Date solved : Monday, January 27, 2025 at 07:59:53 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-y&=2 \tanh \left (x \right ) \end{align*}

Solution by Maple

Time used: 0.006 (sec). Leaf size: 27

dsolve(diff(y(x),x$2)-y(x)=2*tanh(x),y(x), singsol=all)
 
\[ y \left (x \right ) = \left (c_{1} +2 \arctan \left ({\mathrm e}^{x}\right )\right ) {\mathrm e}^{-x}+{\mathrm e}^{x} \left (c_{2} +2 \arctan \left ({\mathrm e}^{x}\right )\right ) \]

Solution by Mathematica

Time used: 0.056 (sec). Leaf size: 35

DSolve[D[y[x],{x,2}]-y[x]==2*Tanh[x],y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to e^{-x} \left (2 \left (e^{2 x}+1\right ) \arctan \left (e^x\right )+c_1 e^{2 x}+c_2\right ) \]