44.4.4 problem 1 (d)

Internal problem ID [7017]
Book : A First Course in Differential Equations with Modeling Applications by Dennis G. Zill. 12 ed. Metric version. 2024. Cengage learning.
Section : Chapter 2. First order differential equations. Section 2.1 Solution curves without a solution. Exercises 2.1 at page 44
Problem number : 1 (d)
Date solved : Wednesday, March 05, 2025 at 04:02:31 AM
CAS classification : [_Riccati]

\begin{align*} y^{\prime }&=x^{2}-y^{2} \end{align*}

With initial conditions

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

Maple. Time used: 0.126 (sec). Leaf size: 57
ode:=diff(y(x),x) = x^2-y(x)^2; 
ic:=y(0) = 0; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = \left \{\begin {array}{cc} 0 & x =0 \\ \frac {x \left (\sqrt {2}\, \pi \operatorname {BesselI}\left (-\frac {3}{4}, \frac {x^{2}}{2}\right )-2 \operatorname {BesselK}\left (\frac {3}{4}, \frac {x^{2}}{2}\right )\right )}{\sqrt {2}\, \pi \operatorname {BesselI}\left (\frac {1}{4}, \frac {x^{2}}{2}\right )+2 \operatorname {BesselK}\left (\frac {1}{4}, \frac {x^{2}}{2}\right )} & \operatorname {otherwise} \end {array}\right . \]
Mathematica. Time used: 0.159 (sec). Leaf size: 81
ode=D[y[x],x]==x^2-y[x]^2; 
ic={y[0]==0}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {i x^2 \operatorname {BesselJ}\left (-\frac {5}{4},\frac {i x^2}{2}\right )-i x^2 \operatorname {BesselJ}\left (\frac {3}{4},\frac {i x^2}{2}\right )+\operatorname {BesselJ}\left (-\frac {1}{4},\frac {i x^2}{2}\right )}{2 x \operatorname {BesselJ}\left (-\frac {1}{4},\frac {i x^2}{2}\right )} \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2 + y(x)**2 + Derivative(y(x), x),0) 
ics = {y(0): 0} 
dsolve(ode,func=y(x),ics=ics)
 
TypeError : bad operand type for unary -: list