74.11.35 problem 47

Internal problem ID [16214]
Book : INTRODUCTORY DIFFERENTIAL EQUATIONS. Martha L. Abell, James P. Braselton. Fourth edition 2014. ElScAe. 2014
Section : Chapter 4. Higher Order Equations. Exercises 4.3, page 156
Problem number : 47
Date solved : Monday, March 31, 2025 at 02:47:04 PM
CAS classification : [[_2nd_order, _missing_x]]

\begin{align*} y^{\prime \prime }-y&=4 \end{align*}

With initial conditions

\begin{align*} y \left (0\right )&=0\\ y^{\prime }\left (0\right )&=0 \end{align*}

Maple. Time used: 0.045 (sec). Leaf size: 10
ode:=diff(diff(y(t),t),t)-y(t) = 4; 
ic:=y(0) = 0, D(y)(0) = 0; 
dsolve([ode,ic],y(t), singsol=all);
 
\[ y = -4+4 \cosh \left (t \right ) \]
Mathematica. Time used: 0.014 (sec). Leaf size: 19
ode=D[y[t],{t,2}]-y[t]==4; 
ic={y[0]==0,Derivative[1][y][0] ==0}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to 2 e^{-t} \left (e^t-1\right )^2 \]
Sympy. Time used: 0.079 (sec). Leaf size: 14
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(-y(t) + Derivative(y(t), (t, 2)) - 4,0) 
ics = {y(0): 0, Subs(Derivative(y(t), t), t, 0): 0} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = 2 e^{t} - 4 + 2 e^{- t} \]