7.13.25 problem 26

Internal problem ID [424]
Book : Elementary Differential Equations. By C. Henry Edwards, David E. Penney and David Calvis. 6th edition. 2008
Section : Chapter 3. Power series methods. Section 3.1 (Introduction). Problems at page 206
Problem number : 26
Date solved : Saturday, March 29, 2025 at 04:53:19 PM
CAS classification : [_quadrature]

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

Using series method with expansion around

\begin{align*} 0 \end{align*}

With initial conditions

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

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