32.1.3 problem 3

Internal problem ID [7708]
Book : Engineering Mathematics. By K. A. Stroud. 5th edition. Industrial press Inc. NY. 2001
Section : Program 24. First order differential equations. Test excercise 24. page 1067
Problem number : 3
Date solved : Tuesday, September 30, 2025 at 04:56:22 PM
CAS classification : [[_linear, `class A`]]

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