20.4.26 problem Problem 42

Internal problem ID [3661]
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.8, Change of Variables. page 79
Problem number : Problem 42
Date solved : Sunday, March 30, 2025 at 02:02:34 AM
CAS classification : [[_homogeneous, `class G`], _rational, _Bernoulli]

\begin{align*} y^{\prime }+\frac {2 y}{x}&=6 y^{2} x^{4} \end{align*}

Maple. Time used: 0.002 (sec). Leaf size: 17
ode:=diff(y(x),x)+2*y(x)/x = 6*y(x)^2*x^4; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {1}{\left (-2 x^{3}+c_1 \right ) x^{2}} \]
Mathematica. Time used: 0.143 (sec). Leaf size: 24
ode=D[y[x],x]+2/x*y[x]==6*y[x]^2*x^4; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {1}{-2 x^5+c_1 x^2} \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 0.214 (sec). Leaf size: 14
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-6*x**4*y(x)**2 + Derivative(y(x), x) + 2*y(x)/x,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {1}{x^{2} \left (C_{1} - 2 x^{3}\right )} \]