Question: error: are dsolve and op incompatible?


I am bothered by an error that I don't understand. I am trying to write a procedure to solve numerically a delay differential equation "step by step" (for example y'(t)=y(t-1))

here is my code


y[0]:=t->t; #my initial condition on [-1,0]

p:=dsolve({D(x)(t)=y[0](t-1), x(t0)=x0}, x(t), numeric, parameters=[t0, x0]);


y[1]:=t->op(2,op(2,p(t)));  #y[1](t) is the value of p(t) but in a "readable" format

q:=dsolve({D(x)(t)=y[1](t-1), x(t0)=x0}, x(t), numeric, parameters=[t0,x0]);

but then I get the error message:

Error, in (y[1]) improper or or subscrit selector


I would be very happy if someone could help me to solve this problem!

Please Wait...