Iterative approximation for solutions of first order ODE's

The general first order ODE has the form

                   y'  =  f (y, t)
	
\(where\ t\ is\ an\ independent\ variable\ and\ y\ is\ a\ function\ of\ t\ to\ be\ determined . \ \ In\ order\ to\ obtain\ a\ unique\ solution\ to\ this\ equation, 

        one\ needs\ to\ further\ specify\ an\ initial\ condition\) 

                  \(y \((t\_0)\)\  = \ y\_\(\(0\)\(	\)\)\)

\(for\ specific\ numbers\ \(t\_0\) 
        and\ \ y\_0 . \ \ If\ an\ exact\ formula\ for\ the\ solution\ of\ this\ initial\ value\ cannot\ be\ found, \ then\ one\ can\ try\ to\ find\)
\(it\ approximately\ by\ picking\ an\ initial\ \(guess--\) - 
            say\ y \((t)\)\  = \ 
          0\ and\ then\ defining\ a\ new\ \((and\ better)\)\ guess\ by\ setting\)

                 \(y \((t)\)\  = \ ∫\_\(t\_0\)\%t 
                f \((y \((s)\), s)\)\ ds\  + \ y\_\(\(0\)\(	\)\)\)

\(In\ this\ worksheet, \ 
        we\ demonstrate\ this\ approximation\ procedure\ in\ a\ couple\ of\ specific\ cases . \ \ 

First\ we\ consider\ the\ initial\ value\ problem\)

                \(y' = \ \(y\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ y \((0)\)\  = \ 
            1\)\)

whose solution we know to be e^
              t .   We start with  y (t)  =  
        0 as our first guess at a solution.

f[y_, t_]  :=  y

guesses  =  {0}

MatrixForm[
      guesses  =  
        Append[guesses, 
          Integrate[f[Last[guesses], t], {t, 0, t}] + 1]]

Plot[Evaluate[guesses], {t, -1, 1}]

We can see the contracting behavior of this iteration by starting with two different functions and then improving them simultaneously 
using the method described above

pair  =  {Cos[t], t + 1};
Plot[Evaluate[pair], {t, -1, 1}, 
      PlotRange -> {0, 3}]

pair  =  {Integrate[f[First[pair], t], {t, 0, t}] + 
            1,    Integrate[f[Last[pair], t], {t, 0, t}] + 1};
Plot[Evaluate[pair], {t, -1, 1}, PlotRange -> {0, 3}]

Now lets try an ODE we can't solve by hand:
	y' = y^2 + t^2                        y(0) = 1

f[y_, t_]  :=  y^2  -  t^3
guesses  =  {1}

MatrixForm[
      guesses  =  
        Append[guesses, 
          Integrate[f[Last[guesses], t], {t, 0, t}] + 1]]
Plot[Evaluate[guesses], {t, -1, 2}, 
      PlotRange  -> {0, 10}]

On what range of t values does this iteration appear to be converging?

If you're not concerned about getting an exact formular for a solution to your ODE, you can use numerical integration.  This time we choose a 
right hand side that cannot be integrated in closed form.  We use the initial values t=0 and y=1 as before.

f[y_, t_] := Sqrt[
        y^4  +  t^2]

guesses =  {Interpolation[
            Table[{t, 1}, {t, 0, 1,  .01}]]};

    plots  =  {Plot[Last[guesses][t], {t, 0, 1}]};

guesses  =  
        Append[guesses, 
          Interpolation[
            Table[{t, 
                NIntegrate[f[Last[guesses][s], t], {s, 0, t}]  +  
                  1}, {t, 0, 1,  .01}]]];
Plot[Last[guesses][t], {t, 0, 1}, 
        PlotRange -> {0, 10}];