38.3.1 problem 1

Internal problem ID [6479]
Book : Engineering Mathematics. By K. A. Stroud. 5th edition. Industrial press Inc. NY. 2001
Section : Program 25. Second order differential equations. Test Excercise 25. page 1093
Problem number : 1
Date solved : Sunday, March 30, 2025 at 11:05:11 AM
CAS classification : [[_2nd_order, _missing_x]]

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

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