60.1.15 problem 15

Internal problem ID [10029]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 1, linear first order
Problem number : 15
Date solved : Sunday, March 30, 2025 at 02:54:12 PM
CAS classification : [[_1st_order, _with_linear_symmetries], _Riccati]

\begin{align*} y^{\prime }+y^{2}-2 x^{2} y+x^{4}-2 x -1&=0 \end{align*}

Maple. Time used: 0.013 (sec). Leaf size: 35
ode:=diff(y(x),x)+y(x)^2-2*x^2*y(x)+x^4-2*x-1 = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {x^{2} {\mathrm e}^{2 x}-c_1 \,x^{2}+{\mathrm e}^{2 x}+c_1}{{\mathrm e}^{2 x}-c_1} \]
Mathematica. Time used: 0.145 (sec). Leaf size: 34
ode=D[y[x],x] + y[x]^2 - 2*x^2*y[x] + x^4 -2*x-1==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to x^2-\frac {2}{1+2 c_1 e^{2 x}}+1 \\ y(x)\to x^2+1 \\ \end{align*}
Sympy. Time used: 0.276 (sec). Leaf size: 29
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**4 - 2*x**2*y(x) - 2*x + y(x)**2 + Derivative(y(x), x) - 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} x^{2} - C_{1} - x^{2} e^{2 x} - e^{2 x}}{C_{1} - e^{2 x}} \]