9.12 problem Problem 12

Internal problem ID [2785]

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 )} \]

Solution by Maple

Time used: 0.0 (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_{2} +2 \arctan \left ({\mathrm e}^{x}\right )\right ) {\mathrm e}^{-x}+{\mathrm e}^{x} \left (c_{1} +2 \arctan \left ({\mathrm e}^{x}\right )\right ) \]

Solution by Mathematica

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

DSolve[y''[x]-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 ) \]