9.12 problem Problem 12

Internal problem ID [2276]

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.
ODE order: 2.
ODE degree: 1.

CAS Maple gives this as type [[_2nd_order, _linear, _nonhomogeneous]]

\[ \boxed {y^{\prime \prime }-y-2 \tanh \left (x \right )=0} \]

Solution by Maple

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

dsolve(diff(y(x),x$2)-y(x)=2*tanh(x),y(x), singsol=all)
 

\[ y \left (x \right ) = {\mathrm e}^{-x} c_{2} +c_{1} {\mathrm e}^{x}+2 \arctan \left ({\mathrm e}^{x}\right ) \left ({\mathrm e}^{x}+{\mathrm e}^{-x}\right ) \]

Solution by Mathematica

Time used: 0.027 (sec). Leaf size: 28

DSolve[y''[x]-y[x]==2*Tanh[x],y[x],x,IncludeSingularSolutions -> True]
 

\begin{align*} y(x)\to 4 \arctan \left (e^x\right ) \cosh (x)+c_1 e^x+c_2 e^{-x} \\ \end{align*}