73.14.5 problem 21.7

Internal problem ID [15344]
Book : Ordinary Differential Equations. An introduction to the fundamentals. Kenneth B. Howell. second edition. CRC Press. FL, USA. 2020
Section : Chapter 21. Nonhomogeneous equations in general. Additional exercises page 391
Problem number : 21.7
Date solved : Monday, March 31, 2025 at 01:34:54 PM
CAS classification : [[_2nd_order, _missing_x]]

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

With initial conditions

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

Maple. Time used: 0.038 (sec). Leaf size: 18
ode:=diff(diff(y(x),x),x)-9*y(x) = 36; 
ic:=y(0) = 8, D(y)(0) = 6; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = 7 \,{\mathrm e}^{3 x}+5 \,{\mathrm e}^{-3 x}-4 \]
Mathematica. Time used: 0.014 (sec). Leaf size: 21
ode=D[y[x],{x,2}]-9*y[x]==36; 
ic={y[0]==8,Derivative[1][y][0] ==6}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to 5 e^{-3 x}+7 e^{3 x}-4 \]
Sympy. Time used: 0.118 (sec). Leaf size: 17
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-9*y(x) + Derivative(y(x), (x, 2)) - 36,0) 
ics = {y(0): 8, Subs(Derivative(y(x), x), x, 0): 6} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = 7 e^{3 x} - 4 + 5 e^{- 3 x} \]