50.14.25 problem 4(a)

Internal problem ID [8063]
Book : Differential Equations: Theory, Technique, and Practice by George Simmons, Steven Krantz. McGraw-Hill NY. 2007. 1st Edition.
Section : Chapter 2. Problems for Review and Discovery. Drill excercises. Page 105
Problem number : 4(a)
Date solved : Sunday, March 30, 2025 at 12:41:54 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Using reduction of order method given that one solution is

\begin{align*} y&={\mathrm e}^{2 x} \end{align*}

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