37.2.1 problem 10.3.2

Internal problem ID [6398]
Book : Basic Training in Mathematics. By R. Shankar. Plenum Press. NY. 1995
Section : Chapter 10, Differential equations. Section 10.3, ODEs with variable Coefficients. First order. page 315
Problem number : 10.3.2
Date solved : Sunday, March 30, 2025 at 10:54:28 AM
CAS classification : [[_linear, `class A`]]

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

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