65.11.1 problem 18.1 (i)

Internal problem ID [13711]
Book : AN INTRODUCTION TO ORDINARY DIFFERENTIAL EQUATIONS by JAMES C. ROBINSON. Cambridge University Press 2004
Section : Chapter 18, The variation of constants formula. Exercises page 168
Problem number : 18.1 (i)
Date solved : Wednesday, March 05, 2025 at 10:13:25 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} y^{\prime \prime }-y^{\prime }-6 y&={\mathrm e}^{x} \end{align*}

Maple. Time used: 0.006 (sec). Leaf size: 25
ode:=diff(diff(y(x),x),x)-diff(y(x),x)-6*y(x) = exp(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {\left (-6 \,{\mathrm e}^{5 x} c_{1} +{\mathrm e}^{3 x}-6 c_{2} \right ) {\mathrm e}^{-2 x}}{6} \]
Mathematica. Time used: 0.022 (sec). Leaf size: 29
ode=D[y[x],{x,2}]-D[y[x],x]-6*y[x]==Exp[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to -\frac {e^x}{6}+c_1 e^{-2 x}+c_2 e^{3 x} \]
Sympy. Time used: 0.169 (sec). Leaf size: 20
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-6*y(x) - exp(x) - Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{- 2 x} + C_{2} e^{3 x} - \frac {e^{x}}{6} \]