60.1.147 problem 150

Internal problem ID [10161]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 1, linear first order
Problem number : 150
Date solved : Sunday, March 30, 2025 at 03:20:41 PM
CAS classification : [_linear]

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

Maple. Time used: 0.002 (sec). Leaf size: 23
ode:=(x^2+1)*diff(y(x),x)+2*x*y(x)-2*x^2 = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {2 x^{3}+3 c_1}{3 x^{2}+3} \]
Mathematica. Time used: 0.035 (sec). Leaf size: 25
ode=(x^2+1)*D[y[x],x] + 2*x*y[x] - 2*x^2==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {2 x^3+3 c_1}{3 x^2+3} \]
Sympy. Time used: 0.236 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*x**2 + 2*x*y(x) + (x**2 + 1)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} + \frac {2 x^{3}}{3}}{x^{2} + 1} \]