78.1.15 problem 2 (a)

Internal problem ID [17999]
Book : DIFFERENTIAL EQUATIONS WITH APPLICATIONS AND HISTORICAL NOTES by George F. Simmons. 3rd edition. 2017. CRC press, Boca Raton FL.
Section : Chapter 1. The Nature of Differential Equations. Separable Equations. Section 2. Problems at page 9
Problem number : 2 (a)
Date solved : Monday, March 31, 2025 at 04:56:06 PM
CAS classification : [_quadrature]

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

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