74.18.23 problem 29

Internal problem ID [16509]
Book : INTRODUCTORY DIFFERENTIAL EQUATIONS. Martha L. Abell, James P. Braselton. Fourth edition 2014. ElScAe. 2014
Section : Chapter 4. Higher Order Equations. Chapter 4 review exercises, page 219
Problem number : 29
Date solved : Monday, March 31, 2025 at 02:55:06 PM
CAS classification : [[_2nd_order, _missing_y]]

\begin{align*} y^{\prime \prime }-2 y^{\prime }&=\frac {1}{1+{\mathrm e}^{2 t}} \end{align*}

Maple. Time used: 0.002 (sec). Leaf size: 106
ode:=diff(diff(y(t),t),t)-2*diff(y(t),t) = 1/(1+exp(2*t)); 
dsolve(ode,y(t), singsol=all);
 
\[ y = -\frac {i \pi \,{\mathrm e}^{2 t} \left (\operatorname {csgn}\left (2 i \cosh \left (t \right )\right ) \operatorname {csgn}\left (i {\mathrm e}^{-t}\right )-1\right ) \operatorname {csgn}\left (i \left (1+{\mathrm e}^{2 t}\right )\right )}{8}+\frac {i \pi \,\operatorname {csgn}\left (i {\mathrm e}^{-t}\right ) {\mathrm e}^{2 t}}{8}+\frac {\left (2 \,{\mathrm e}^{2 t}+2\right ) \ln \left (1+{\mathrm e}^{2 t}\right )}{8}-\frac {i \pi \,\operatorname {csgn}\left (2 i \cosh \left (t \right )\right ) {\mathrm e}^{2 t}}{8}+\frac {\left (-2 t -2 \ln \left ({\mathrm e}^{t}\right )+4 c_1 -2 \ln \left (2\right )-2\right ) {\mathrm e}^{2 t}}{8}-\frac {t}{2}+c_2 \]
Mathematica. Time used: 0.16 (sec). Leaf size: 61
ode=D[y[t],{t,2}]-2*D[y[t],t]==1/(1+Exp[2*t]); 
ic={}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to \frac {1}{8} \left (\left (4 e^{2 t}+2\right ) \text {arctanh}\left (2 e^{2 t}+1\right )-4 t+\log \left (-4 e^{2 t} \left (e^{2 t}+1\right )\right )+4 c_1 e^{2 t}+8 c_2\right ) \]
Sympy. Time used: 0.840 (sec). Leaf size: 39
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(-2*Derivative(y(t), t) + Derivative(y(t), (t, 2)) - 1/(exp(2*t) + 1),0) 
ics = {} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = C_{1} + C_{2} e^{2 t} + \frac {e^{2 t} \log {\left (1 + e^{- 2 t} \right )}}{4} + \frac {\log {\left (1 + e^{- 2 t} \right )}}{4} \]