23.1.286 problem 280

Internal problem ID [4893]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 1. THE DIFFERENTIAL EQUATION IS OF FIRST ORDER AND OF FIRST DEGREE, page 223
Problem number : 280
Date solved : Tuesday, September 30, 2025 at 08:55:51 AM
CAS classification : [_linear]

\begin{align*} \left (-x^{2}+1\right ) y^{\prime }&=1-x^{2}+y \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 30
ode:=(-x^2+1)*diff(y(x),x) = 1-x^2+y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (\sqrt {-x^{2}+1}+\arcsin \left (x \right )+c_1 \right ) \left (x +1\right )}{\sqrt {-x^{2}+1}} \]
Mathematica. Time used: 0.044 (sec). Leaf size: 57
ode=(1-x^2)*D[y[x],x]==1-x^2+y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \exp \left (\int _1^x\frac {1}{1-K[1]^2}dK[1]\right ) \left (\int _1^x\exp \left (-\int _1^{K[2]}\frac {1}{1-K[1]^2}dK[1]\right )dK[2]+c_1\right ) \end{align*}
Sympy. Time used: 7.397 (sec). Leaf size: 228
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2 + (1 - x**2)*Derivative(y(x), x) - y(x) - 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \begin {cases} \frac {C_{1} \sqrt {x + 1}}{- i \sqrt {1 - x} + \sqrt {x - 1} + \sqrt {x + 1} \left (\begin {cases} \frac {\sqrt {x - 1}}{\sqrt {x + 1}} & \text {for}\: \left |{x + 1}\right | > 2 \\\frac {i \sqrt {1 - x}}{\sqrt {x + 1}} & \text {otherwise} \end {cases}\right )} - \frac {i \sqrt {1 - x}}{- i \sqrt {1 - x} + \sqrt {x - 1} + \sqrt {x + 1} \left (\begin {cases} \frac {\sqrt {x - 1}}{\sqrt {x + 1}} & \text {for}\: \left |{x + 1}\right | > 2 \\\frac {i \sqrt {1 - x}}{\sqrt {x + 1}} & \text {otherwise} \end {cases}\right )} + \frac {\sqrt {x + 1} \int \frac {x^{2}}{x \sqrt {x - 1} \sqrt {x + 1} + \sqrt {x - 1} \sqrt {x + 1}}\, dx}{- i \sqrt {1 - x} + \sqrt {x - 1} + \sqrt {x + 1} \left (\begin {cases} \frac {\sqrt {x - 1}}{\sqrt {x + 1}} & \text {for}\: \left |{x + 1}\right | > 2 \\\frac {i \sqrt {1 - x}}{\sqrt {x + 1}} & \text {otherwise} \end {cases}\right )} & \text {for}\: x \geq -3 \wedge x \leq 1 \\\text {NaN} & \text {otherwise} \end {cases} \]