Picard iteration, integral evaluation I have been asked to

calculate the first few Picard iterations of function $$y'= 1+y^2,$$ applying Picard iteration starting with $y_0(x) = 0$ for all $x \in (−1, 1)$, i.e. calculate the functions $y_1, y_2, y_3$ and $y_4$ on $(−1, 1)$.

Does this mean I evaluate the integrals in the Picard iterations from $-1$ to $1$, or do I do it like normal from $0$ to some $x\,$?
It does say previously in the question that $y(0)=0$.
 A: The solution to this ODE is
$$y(x) = \tan(x)$$
A plot of this shows

This is why they are limiting the range to $x \in (−1, 1)$.
A series expansion of $\tan(x)$ gives (plot this over that range)
$$x+\frac{x^3}{3}+\frac{2 x^5}{15}+\frac{17 x^7}{315}+O\left(x^9\right)$$
So, just perform the Picard iteration normally as

*

*$(1)$ Choose an initial guess, $y_0(x)$.


*$(2)$ For $n = 1, 2, 3, . . .$, set $y_{n+1}(x) = \displaystyle \int_{s=0}^x f(s, y_n(s)) ds$.
Then, see if you can generate the series shown above from the three iterations.
A: If it is $y(0) = 0$, which you say, it is clearly from $0$ to $x$.
If $y(x_0) = z_0$, then the iteration is $y_0 := z_0$ and
$$
y_{n+1} = z_0 + \int^x_{x_0} 1+y_n^2(s)~\mathrm{d}s.
$$
A: Consider the Cauchy problem $\begin{cases} y'=f(x,y),\\ y(x_{0})=y_{0}\end{cases}$ where $f:\begin{cases} \nabla\subseteq \mathbb{R}^{2} &\longrightarrow \mathbb{R},\\ (x,y)&\longmapsto 1+y^{2}\end{cases}$ and $y_{0}=0$ and assuming $x_{0}:=0$ (if you want consider $x_{0}$ arbitrary inside $]-1,1[$ is similar the iteration) and for all $x\in I:=\left]-1,1\right[$. Consider the Picard's iteration with the sequence of functions $y_{n}: I\longrightarrow \mathbb{R}$ for $n=0,1,2,3,\ldots$ definited iteratively as follows $$y_{0}(x)=y_{0}, \quad \forall x\in I,$$ $$y_{n+1}=y_{0}+\int_{x_{0}}^{x}f(s,y_{n}(s))\, {\rm d}s,\quad \forall x\in I,\quad \forall n=0,1,2,\ldots$$
Starting the Picard's iteration:


*$y_{0}(x)=0$.

*$\boxed{n=0}:$ $$\displaystyle y_{0+1}(x)=y_{0}+\int_{x_{0}}^{x}f(s,y_{0}(s))\, {\rm d}s=0+\int_{0}^{x}(1+0^{2})\, {\rm d}s=x$$

*$\boxed{n=1}:$ $$\displaystyle y_{1+1}(x)=y_{0}+\int_{x_{0}}^{x}f(s,y_{1}(s))\, {\rm d}s=0+\int_{0}^{x}(1+s^{2})\,{\rm d}s=x+\frac{x^{3}}{3}$$

*$\boxed{n=2}:$
\begin{align*}
 y_{2+1}(x)&=y_{0}+\int_{x_{0}}^{x}f(s,y_{2}(s))\, {\rm d}s\\&=0+\int_{0}^{x}\left(1+\left(s+\frac{s^{3}}{3}\right)^{2}\right)\, {\rm d}s\\&=x+\frac{x^{3}}{3}+\frac{2x^{5}}{15}+\frac{x^{7}}{63}
\end{align*}

*$\boxed{n=3}:$
\begin{align*} y_{3+1}(x)&=y_{0}+\int_{x_{0}}^{x}f(s,y_{3}(s))\, {\rm d}s\\ &=0+\int_{0}^{x}\left(1+\left(s+\frac{s^{3}}{3}+\frac{2s^{5}}{15}+\frac{s^{7}}{63} \right)^{2} \right)\, {\rm d}s\\ &=x+\frac{x^3}{3}+\frac{2 x^5}{15}+\frac{17 x^7}{315}+\frac{38 x^9}{2835}+\frac{134 x^{11}}{51975}+\frac{4 x^{13}}{12285}+\frac{x^{15}}{59535}\end{align*}
Picard's iteration says the sequence $(y_{n})_{n\geqslant 0}$ converge uniformly over $I$ to the solution and in this case we can see $$y(x)=\tan(x)=x+\frac{x^{3}}{3}+\frac{2x^{5}}{15}+\cdots=\sum_{n=1}^{+\infty}|B_{2n}|\frac{4^{n}(4^{n}-1)}{(2n)!}x^{2n-1}, \quad x\in \left]-\frac{\pi}{2},\frac{\pi}{2}\right[$$but in your case over $I$ there's not problem just make a plot for see it.

