# fisrt 5th iterations of a sequence of functions: integro-differential equations [closed]

Please I am struggling to compute with mathematica the first 5th iterations of the sequence of functions $u[n,t]$ satisfying the integro-differential equation

Patrick

• u0[x_] := -x/6 + 2/3; u1[x_] := u0[x] + Integrate[(t-1) (2-x) (u0''[t] - u0[t]^3 + u0[t] u0'[t]), {t, 1, x}] + Integrate[(x-1) (2-t) (u0''[t] - u0[t]^3 + u0[t] u0'[t]), {t, x, 2}]; u1[x] shows me u1. Then u2[x_] := u1[x] + Integrate[(t-1) (2-x) (u1''[t] - u1[t]^3 + u1[t] u1'[t]), {t, 1, x}] + Integrate[(x - 1) (2 - t) (u1''[t] - u1[t]^3 + u1[t] u1'[t]), {t, x, 2}]; u2[x] shows me u2. Repeat for u3, u4, ... – Bill Jul 12 '18 at 14:43
• @Bill if that is an answer, why don't you post it as such? – rhermans Jul 12 '18 at 14:51

Perhaps little bit more comfortable than Bill's answer:

igl[x_, u_(* function*)] :=u[x] +
Integrate[(t - 1) (2 - x) (u''[t] - u[t]^3 + u[t] u'[t]), {t,1, x}] +
Integrate[(x - 1) (2 - t) (u''[t] - u[t]^3 + u[t] u'[t]), {t, x, 2}]
u0[x_] := -x/6 + 2/3
u1[x_] :=igl[x,u0 ]
u2[x_] :=igl[x,u1]
(* ... *)


A much nicer program could be somthing like

NestList[Evaluate[igl[x, #&]]  , u0 , 1]


but it doesn't run...

• How about something along the lines of u[0][x_]:=-x/6 + 2/3 and u[n_][x_]:=igl[x,u[n-1]] (untested)? – AccidentalFourierTransform Jul 12 '18 at 15:37
• @AccidentalFourierTransform: It works, thank you! But I'm still wondering why NestList[ igl[x, # & ] , -x/6 + 2/3 , 1] doesn't work. – Ulrich Neumann Jul 12 '18 at 15:44
• Thank you very much guys for your help. It is working :) – Patrick Jul 12 '18 at 21:30