60.1.101 problem 103

Internal problem ID [10115]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 1, linear first order
Problem number : 103
Date solved : Sunday, March 30, 2025 at 03:16:42 PM
CAS classification : [[_homogeneous, `class D`], _rational, _Riccati]

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

Maple. Time used: 0.004 (sec). Leaf size: 29
ode:=x*diff(y(x),x)+x*y(x)^2-(2*x^2+1)*y(x)-x^3 = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {x \left (\sqrt {2}+2 \tanh \left (\frac {\left (x^{2}+2 c_1 \right ) \sqrt {2}}{2}\right )\right ) \sqrt {2}}{2} \]
Mathematica. Time used: 0.081 (sec). Leaf size: 38
ode=x*D[y[x],x] + x*y[x]^2 - (2*x^2+1)*y[x] - x^3==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\int _1^{\frac {y(x)}{x}}\frac {1}{K[1]^2-2 K[1]-1}dK[1]=-\frac {x^2}{2}+c_1,y(x)\right ] \]
Sympy. Time used: 0.336 (sec). Leaf size: 42
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**3 + x*y(x)**2 + x*Derivative(y(x), x) - (2*x**2 + 1)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {x \left (C_{1} \left (1 - \sqrt {2}\right ) + \left (- \sqrt {2} - 1\right ) e^{\sqrt {2} x^{2}}\right )}{C_{1} - e^{\sqrt {2} x^{2}}} \]