78.10.6 problem 6 (a)

Internal problem ID [18196]
Book : DIFFERENTIAL EQUATIONS WITH APPLICATIONS AND HISTORICAL NOTES by George F. Simmons. 3rd edition. 2017. CRC press, Boca Raton FL.
Section : Chapter 3. Second order linear equations. Section 15. The General Solution of the Homogeneous Equation. Problems at page 117
Problem number : 6 (a)
Date solved : Monday, March 31, 2025 at 05:22:29 PM
CAS classification : [[_2nd_order, _missing_x]]

\begin{align*} y^{\prime \prime }+y^{\prime }-2 y&=0 \end{align*}

With initial conditions

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

Maple. Time used: 0.050 (sec). Leaf size: 15
ode:=diff(diff(y(x),x),x)+diff(y(x),x)-2*y(x) = 0; 
ic:=y(0) = 8, D(y)(0) = 2; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = 6 \,{\mathrm e}^{x}+2 \,{\mathrm e}^{-2 x} \]
Mathematica. Time used: 0.012 (sec). Leaf size: 18
ode=D[y[x],{x,2}] +D[y[x],x]-2*y[x]==0; 
ic={y[0]==8,Derivative[1][y][0]==2}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to 2 e^{-2 x}+6 e^x \]
Sympy. Time used: 0.131 (sec). Leaf size: 14
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*y(x) + Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {y(0): 8, Subs(Derivative(y(x), x), x, 0): 2} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = 6 e^{x} + 2 e^{- 2 x} \]