75.1.14 problem 16

Internal problem ID [16598]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Section 1. Basic concepts and definitions. Exercises page 18
Problem number : 16
Date solved : Thursday, March 13, 2025 at 08:25:34 AM
CAS classification : [_separable]

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

Maple. Time used: 0.002 (sec). Leaf size: 18
ode:=(-x^2+1)*diff(y(x),x)+x*y(x) = 2*x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \sqrt {x -1}\, \sqrt {x +1}\, c_{1} +2 \]
Mathematica. Time used: 0.037 (sec). Leaf size: 24
ode=(1-x^2)*D[y[x],x]+x*y[x]==2*x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to 2+c_1 \sqrt {x^2-1} \\ y(x)\to 2 \\ \end{align*}
Sympy. Time used: 0.294 (sec). Leaf size: 14
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*y(x) - 2*x + (1 - x**2)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} \sqrt {x^{2} - 1} + 2 \]