15.22.7 problem 7

Internal problem ID [3341]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 40, page 186
Problem number : 7
Date solved : Sunday, March 30, 2025 at 01:37:26 AM
CAS classification : [[_Riccati, _special]]

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

Using series method with expansion around

\begin{align*} 2 \end{align*}

With initial conditions

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

Maple. Time used: 0.005 (sec). Leaf size: 18
Order:=6; 
ode:=diff(y(x),x) = x^2+y(x)^2; 
ic:=y(2) = 0; 
dsolve([ode,ic],y(x),type='series',x=2);
 
\[ y = 4 \left (x -2\right )+2 \left (x -2\right )^{2}+\frac {17}{3} \left (x -2\right )^{3}+4 \left (x -2\right )^{4}+\frac {148}{15} \left (x -2\right )^{5}+\operatorname {O}\left (\left (x -2\right )^{6}\right ) \]
Mathematica. Time used: 0.015 (sec). Leaf size: 41
ode=D[y[x],x]==x^2+y[x]^2; 
ic={y[2]==0}; 
AsymptoticDSolveValue[{ode,ic},y[x],{x,2,5}]
 
\[ y(x)\to \frac {148}{15} (x-2)^5+4 (x-2)^4+\frac {17}{3} (x-2)^3+2 (x-2)^2+4 (x-2) \]
Sympy. Time used: 0.751 (sec). Leaf size: 41
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2 - y(x)**2 + Derivative(y(x), x),0) 
ics = {y(2): 0} 
dsolve(ode,func=y(x),ics=ics,hint="1st_power_series",x0=2,n=6)
 
\[ y{\left (x \right )} = -8 + 2 \left (x - 2\right )^{2} + \frac {17 \left (x - 2\right )^{3}}{3} + 4 \left (x - 2\right )^{4} + \frac {148 \left (x - 2\right )^{5}}{15} + 4 x + O\left (x^{6}\right ) \]