Question: dsolve with sum

Hi,

 

Here is my code:

###################

f:=x->piecewise(x>=-1/2 and x<=1/2,1):
eq:={diff(x(t),t)-sum(f(t-k*T),k=0..K)*x(t)=0,x(0)=0}:
sol:=dsolve(eq, numeric, parameters=[T,K]);
sol(parameters=[1,20]);
############

And the result is an error I cannot solve:

Error, (in dsolve/numeric) the following unknowns appear in the system, but are not specified as parameters: {k}
 

Then, how to modify the code?

 

Best regards

 

Jaqr

Please Wait...