59.11.1 problem 18.1 (i)

Internal problem ID [15071]
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 : Thursday, October 02, 2025 at 10:02:36 AM
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.004 (sec). Leaf size: 27
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_2 -{\mathrm e}^{3 x}+6 c_1 \right ) {\mathrm e}^{-2 x}}{6} \]
Mathematica. Time used: 0.014 (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]
 
\begin{align*} y(x)&\to -\frac {e^x}{6}+c_1 e^{-2 x}+c_2 e^{3 x} \end{align*}
Sympy. Time used: 0.101 (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} \]