I'm trying to solve a differential equation numerically. I've written this code but it is leading to some errors "initial history needs to be specified for all variables for delay-differential equations" however I am not intending to solve a 'delay' equation. Could someone point out my mistake(s)? Thanks.
m = 511000;
cl = 299792458;
E0 = 100*^6;
λ = 0.001;
k = 2 Pi/λ;
A = 10*^-10;
a0 = λ/4;
f[t_] := x'[t]/Sqrt[1 - (x'[t]/cl)^2]
eqns = {f'[t] == E0 Sin[((cl*t - g[t]) - a0) k], g[t] == Integrate[x'[ta], {ta, 0, t}], x[0] == a0, x'[0] == 0.97*cl}
b = NDSolve[eqns, x'[t], {t, 0, A}, MaxStepSize -> 3.3*^-12, Method -> "ExplicitEuler"]
Plot[{Evaluate[x'[t] /. b]}, {t, 0, A}, PlotRange -> All]
x[t]-a0
forIntegrate[x'[ta], {ta, 0, t}]
? $\endgroup$ – george2079 Dec 4 '15 at 19:15