71.14.1 problem 7

Internal problem ID [14456]
Book : Ordinary Differential Equations by Charles E. Roberts, Jr. CRC Press. 2010
Section : Chapter 5. The Laplace Transform Method. Exercises 5.3, page 255
Problem number : 7
Date solved : Thursday, March 13, 2025 at 03:30:46 AM
CAS classification : [_quadrature]

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

Using Laplace method With initial conditions

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

Maple. Time used: 8.851 (sec). Leaf size: 15
ode:=diff(y(x),x)-2*y(x) = 6; 
ic:=y(0) = 2; 
dsolve([ode,ic],y(x),method='laplace');
 
\[ y = 2 \,{\mathrm e}^{x} \left (\cosh \left (x \right )+4 \sinh \left (x \right )\right ) \]
Mathematica. Time used: 0.03 (sec). Leaf size: 14
ode=D[y[x],x]-2*y[x]==6; 
ic={y[0]==2}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to 5 e^{2 x}-3 \]
Sympy. Time used: 0.128 (sec). Leaf size: 10
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*y(x) + Derivative(y(x), x) - 6,0) 
ics = {y(0): 2} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = 5 e^{2 x} - 3 \]