x=x0-J/f; non \

se poi posti le function e in programma main lo posso provare

inoltre a me sembra che
codice:
f=fun(x0,t);
vada dentro il while