20.5.3 problem Problem 3

Internal problem ID [3686]
Book : Differential equations and linear algebra, Stephen W. Goode and Scott A Annin. Fourth edition, 2015
Section : Chapter 1, First-Order Differential Equations. Section 1.9, Exact Differential Equations. page 91
Problem number : Problem 3
Date solved : Sunday, March 30, 2025 at 02:05:44 AM
CAS classification : [_linear]

\begin{align*} y+3 x^{2}+x y^{\prime }&=0 \end{align*}

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