I've got a task to find first three terms of the perturbation series solution to:
$$y' = 1 +(1+\epsilon)y^2,\quad y(0)=1, \quad t > 0,$$
for a small $\epsilon$. I am supposed to use Mathematica document to solve that. So far, I have found a similar problem here. I solved it for $\epsilon = 0$:
sol1 = DSolve[{y'[t] == 1 + y[t]^2, y[0] == 1}, y[t], t]
and I received soultion:
{{y(t)->Tan(t+π/4)}}
so as my $y(t) = \tan(\pi/4 + t)$ I need to find now:
$$y = \tan(\pi/4 + t) + \epsilon y_1(t) + \epsilon^2 y_2(t) + \epsilon^3 y_3(t) + \ldots .$$
Because $y(0) = 1$, I need all $y_1(0) = y_2(0) = y_3(0) =... = 0 $ and substitute $y$ in my first equation and later on find terms for each power of $\epsilon$. Now my problem is how to do it? I'm not Mathematica proficient user (used it shortly ~1 year ago), so it may be simple, but I do not know how to code it in.