71.8.7 problem 4 (c)

Internal problem ID [14362]
Book : Ordinary Differential Equations by Charles E. Roberts, Jr. CRC Press. 2010
Section : Chapter 2. The Initial Value Problem. Exercises 2.4.4, page 115
Problem number : 4 (c)
Date solved : Wednesday, March 05, 2025 at 10:48:28 PM
CAS classification : [_linear]

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

With initial conditions

\begin{align*} y \left (2\right )&=1 \end{align*}

Maple. Time used: 1.982 (sec). Leaf size: 141
ode:=diff(y(x),x) = y(x)/(-x^2+1)+x^(1/2); 
ic:=y(2) = 1; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = \frac {2 i \left (x +1\right ) \left (\operatorname {EllipticE}\left (\sqrt {3}, \frac {\sqrt {2}}{2}\right ) \sqrt {2}\, \sqrt {3}-\frac {\operatorname {EllipticF}\left (\sqrt {3}, \frac {\sqrt {2}}{2}\right ) \sqrt {2}\, \sqrt {3}}{3}-\sqrt {2}+\frac {1}{2}\right ) \sqrt {3}}{3 \sqrt {-x^{2}+1}}+\frac {-2 \sqrt {x +1}\, \sqrt {-2 x +2}\, \sqrt {-x}\, \operatorname {EllipticF}\left (\sqrt {x +1}, \frac {\sqrt {2}}{2}\right )+6 \sqrt {x +1}\, \sqrt {-2 x +2}\, \sqrt {-x}\, \operatorname {EllipticE}\left (\sqrt {x +1}, \frac {\sqrt {2}}{2}\right )+2 x^{3}-2 x}{\sqrt {x}\, \left (3 x -3\right )} \]
Mathematica. Time used: 0.099 (sec). Leaf size: 63
ode=D[y[x],x]==y[x]/(1-x^2)+Sqrt[x]; 
ic={y[2]==1}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \exp \left (\int _2^x\frac {1}{1-K[1]^2}dK[1]\right ) \left (\int _2^x\exp \left (-\int _2^{K[2]}\frac {1}{1-K[1]^2}dK[1]\right ) \sqrt {K[2]}dK[2]+1\right ) \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-sqrt(x) + Derivative(y(x), x) - y(x)/(1 - x**2),0) 
ics = {y(2): 1} 
dsolve(ode,func=y(x),ics=ics)
 
ValueError : Couldnt solve for initial conditions