20.4.27 problem Problem 43

Internal problem ID [3662]
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 43
Date solved : Sunday, March 30, 2025 at 02:02:37 AM
CAS classification : [[_homogeneous, `class G`], _rational, _Bernoulli]

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

Maple. Time used: 0.003 (sec). Leaf size: 27
ode:=2*x*(diff(y(x),x)+y(x)^3*x^2)+y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \frac {1}{\sqrt {\left (x^{2}+c_1 \right ) x}} \\ y &= -\frac {1}{\sqrt {\left (x^{2}+c_1 \right ) x}} \\ \end{align*}
Mathematica. Time used: 0.303 (sec). Leaf size: 40
ode=2*x*(D[y[x],x]+y[x]^3*x^2)+y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\frac {1}{\sqrt {x \left (x^2+c_1\right )}} \\ y(x)\to \frac {1}{\sqrt {x \left (x^2+c_1\right )}} \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 0.734 (sec). Leaf size: 29
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x*(x**2*y(x)**3 + Derivative(y(x), x)) + y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - \sqrt {\frac {1}{x \left (C_{1} + x^{2}\right )}}, \ y{\left (x \right )} = \sqrt {\frac {1}{x \left (C_{1} + x^{2}\right )}}\right ] \]