##### 4.1.40 $$y'(x)=x^2-y(x)^2$$

ODE
$y'(x)=x^2-y(x)^2$ ODE Classiﬁcation

[_Riccati]

Book solution method
Series solution to $$y'(x)=f(x,y(x))$$, case $$f(x,y)$$ analytic

Mathematica
cpu = 0.22425 (sec), leaf count = 117

$\left \{\left \{y(x)\to -\frac {-i x^2 \left (2 J_{-\frac {3}{4}}\left (\frac {i x^2}{2}\right )+c_1 \left (J_{-\frac {5}{4}}\left (\frac {i x^2}{2}\right )-J_{\frac {3}{4}}\left (\frac {i x^2}{2}\right )\right )\right )-c_1 J_{-\frac {1}{4}}\left (\frac {i x^2}{2}\right )}{2 x \left (J_{\frac {1}{4}}\left (\frac {i x^2}{2}\right )+c_1 J_{-\frac {1}{4}}\left (\frac {i x^2}{2}\right )\right )}\right \}\right \}$

Maple
cpu = 0.121 (sec), leaf count = 44

$\left [y \left (x \right ) = \frac {x \left (\BesselI \left (-\frac {3}{4}, \frac {x^{2}}{2}\right ) \textit {\_C1} -\BesselK \left (\frac {3}{4}, \frac {x^{2}}{2}\right )\right )}{\textit {\_C1} \BesselI \left (\frac {1}{4}, \frac {x^{2}}{2}\right )+\BesselK \left (\frac {1}{4}, \frac {x^{2}}{2}\right )}\right ]$ Mathematica raw input

DSolve[y'[x] == x^2 - y[x]^2,y[x],x]

Mathematica raw output

{{y[x] -> -1/2*(-(BesselJ[-1/4, (I/2)*x^2]*C[1]) - I*x^2*(2*BesselJ[-3/4, (I/2)*
x^2] + (BesselJ[-5/4, (I/2)*x^2] - BesselJ[3/4, (I/2)*x^2])*C[1]))/(x*(BesselJ[1
/4, (I/2)*x^2] + BesselJ[-1/4, (I/2)*x^2]*C[1]))}}

Maple raw input

dsolve(diff(y(x),x) = x^2-y(x)^2, y(x))

Maple raw output

[y(x) = x*(BesselI(-3/4,1/2*x^2)*_C1-BesselK(3/4,1/2*x^2))/(_C1*BesselI(1/4,1/2*
x^2)+BesselK(1/4,1/2*x^2))]