7.2.21 problem 23

Internal problem ID [39]
Book : Elementary Differential Equations. By C. Henry Edwards, David E. Penney and David Calvis. 6th edition. 2008
Section : Chapter 1. First order differential equations. Section 1.3. Problems at page 27
Problem number : 23
Date solved : Saturday, March 29, 2025 at 04:27:06 PM
CAS classification : [_Riccati]

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

With initial conditions

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

Maple
ode:=diff(y(x),x) = x^2+y(x)^2-1; 
ic:=y(0) = 0; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ \text {No solution found} \]
Mathematica. Time used: 0.215 (sec). Leaf size: 178
ode=D[y[x],x]==x^2+y[x]^2-1; 
ic={y[0]==0}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to -\frac {2^{1 i/2} x \operatorname {Gamma}\left (\frac {1}{4}+\frac {i}{4}\right ) \operatorname {ParabolicCylinderD}\left (-\frac {1}{2}-\frac {i}{2},(-1+i) x\right )+i x \operatorname {Gamma}\left (\frac {1}{4}-\frac {i}{4}\right ) \operatorname {ParabolicCylinderD}\left (-\frac {1}{2}+\frac {i}{2},(1+i) x\right )+(1+i) \left (2^{1 i/2} \operatorname {Gamma}\left (\frac {1}{4}+\frac {i}{4}\right ) \operatorname {ParabolicCylinderD}\left (\frac {1}{2}-\frac {i}{2},(-1+i) x\right )-\operatorname {Gamma}\left (\frac {1}{4}-\frac {i}{4}\right ) \operatorname {ParabolicCylinderD}\left (\frac {1}{2}+\frac {i}{2},(1+i) x\right )\right )}{i 2^{1 i/2} \operatorname {Gamma}\left (\frac {1}{4}+\frac {i}{4}\right ) \operatorname {ParabolicCylinderD}\left (-\frac {1}{2}-\frac {i}{2},(-1+i) x\right )+\operatorname {Gamma}\left (\frac {1}{4}-\frac {i}{4}\right ) \operatorname {ParabolicCylinderD}\left (-\frac {1}{2}+\frac {i}{2},(1+i) x\right )} \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2 - y(x)**2 + Derivative(y(x), x) + 1,0) 
ics = {y(0): 0} 
dsolve(ode,func=y(x),ics=ics)
 
TypeError : bad operand type for unary -: list