I'm trying to solve numerically the following system of delay differential equations
$$\dot{x} = \lambda x(t)+ \omega y(t) - K(t) (x(t)- x(t-\tau)) \\ \dot{y} = -\omega x(t) + \lambda y(t) - K(t) (y(t)- y(t-\tau)) \\ \dot{K} = \gamma ((x(t)-x(t-\tau))(x(t)-2x(t-\tau)+x(t-2\tau)) + (y(t)-y(t-\tau) (y(t)-2y(t-\tau)+y(t-2\tau)))$$
with history functions $x(t)=y(t)=0$ for $t<0$ and $K(t)=0$ for $t\leq2\tau$ and initial conditions $x(0)=0.02$, $y(0)=0$.
I first tried to do it with $x(0)=0$ which should result in $x(t)=y(t)=K(t)=0$ for all $t$ but I already get an error message saying that (at least) one derivative at $t=0$ is non-numerical. Here is my code
lam = 0.5; om = Pi; tau = 1; gam = 1;
NDSolve[{x'[t] == lam x[t] + om y[t] - k[t] (x[t] - x[t - tau]),
y'[t] == -om x[t] + lam y[t] - k[t] (y[t] - y[t - tau]),
k'[t] == gam ((x[t] - x[t - tau]) (x[t] - 2 x[t - tau] +
x[t - 2 tau]) + (y[t] - y[t - tau]) (y[t] - 2 y[t - tau] +
y[t - 2 tau])), x[t /; t <= 0] == 0,
y[t /; t <= 0] == 0, k[t /; t <= 2 tau] == 0}, {x, y, k}, {t, - tau, 40}]
k[t /; t <= 2 tau] == 0
tok[t /; t <= 0] == 0
it seems to work. $\endgroup$k[t /; t <= 0] == HeavisideTheta[t - 2 tau]
you get a solution, but all values of y,y,k are zero. If you applyReduce[{eqs, t == -1}]
there seem to occur condtradictions. $\endgroup$