15.22.6 problem 6

Internal problem ID [3340]
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 : 6
Date solved : Tuesday, March 04, 2025 at 04:36:25 PM
CAS classification : [_quadrature]

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

Using series method with expansion around

\begin{align*} 1 \end{align*}

With initial conditions

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

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