12.3.28 problem 36

Internal problem ID [1605]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 2, First order equations. separable equations. Section 2.2 Page 52
Problem number : 36
Date solved : Saturday, March 29, 2025 at 11:07:07 PM
CAS classification : [_rational, [_Abel, `2nd type`, `class B`]]

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

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