I am trying to solve an integro-differential equation and tried using one of the answers that I found in a related question:
Numerically solve an integro-differential equation
The difference is I have parameters outside the integral, so I used ParametricNDSolve instead of NDSolveValue. Here is a simplified example that captures the essence of the problem:
ydrive[t_] = Exp[-t^2/5]*Sin[2*Pi*t];(*driving term*)
reset[] := (Clear[ysol2];
ysol2[n_] :=
ysol2[n] =
ParametricNDSolve[{D[y[t], t] ==
c*y[t] + \[Lambda]*ydrive[t] +
0.1*Integrate[ysol2[n - 1][\[Lambda], c1][t], {c1, -1., 1.}],
y[-10.^2] == 0}, y, {t, -100., 100.}, {\[Lambda], c}])
reset[]
ysol2[0] = # &;(*initial guess*)
When I display even the zeroth order iteration:
ysol2[0][1., 1.][0.]
It gives an error message, "Dependent variables {y,[Lambda]} cannot depend on parameters {
[Lambda],c}."
I hope anyone can help me on this. Thank you.
{t,-100,100}
is too large, for numerical model please let consider{t,-10,10}
or even{t,-5,5}
. $\endgroup$