83.5.6 problem 2 (a)

Internal problem ID [21941]
Book : Differential Equations By Kaj L. Nielsen. Second edition 1966. Barnes and nobel. 66-28306
Section : Chapter III. First order differential equations of the first degree. Ex. VI at page 47
Problem number : 2 (a)
Date solved : Thursday, October 02, 2025 at 08:18:44 PM
CAS classification : [_linear]

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

With initial conditions

\begin{align*} y \left (2\right )&=1 \\ \end{align*}
Maple. Time used: 0.005 (sec). Leaf size: 13
ode:=x*diff(y(x),x)+y(x) = 3*x^2; 
ic:=[y(2) = 1]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = \frac {x^{3}-6}{x} \]
Mathematica. Time used: 0.017 (sec). Leaf size: 14
ode=x*D[y[x],x]+y[x]==3*x^2; 
ic={y[2]==1}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {x^3-6}{x} \end{align*}
Sympy. Time used: 0.101 (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 = {y(2): 1} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {x^{3} - 6}{x} \]