86.7.2 problem 2

Internal problem ID [23149]
Book : An introduction to Differential Equations. By Howard Frederick Cleaves. 1969. Oliver and Boyd publisher. ISBN 0050015044
Section : Chapter 5. Linear equations of the second order with constant coefficients. Exercise 5c at page 83
Problem number : 2
Date solved : Thursday, October 02, 2025 at 09:23:30 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} y^{\prime \prime }-3 y&={\mathrm e}^{x} \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 26
ode:=diff(diff(y(x),x),x)-3*y(x) = exp(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{\sqrt {3}\, x} c_2 +{\mathrm e}^{-\sqrt {3}\, x} c_1 -\frac {{\mathrm e}^{x}}{2} \]
Mathematica. Time used: 0.075 (sec). Leaf size: 51
ode=D[y[x],{x,2}]-3*y[x]==Exp[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{2} e^{-\sqrt {3} x} \left (-e^{\left (1+\sqrt {3}\right ) x}+2 c_1 e^{2 \sqrt {3} x}+2 c_2\right ) \end{align*}
Sympy. Time used: 0.050 (sec). Leaf size: 27
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-3*y(x) - exp(x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{- \sqrt {3} x} + C_{2} e^{\sqrt {3} x} - \frac {e^{x}}{2} \]