Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to find non-trivial solutions of the ODE $\lambda u'(x) = u(x+R) - u(x)$ using Mathematica.

In particular, I am using the command

 DSolve[a*y'[x] == y[x + r] - y[x], y[x], x]

which for a standard (i.e., non-delayed, non-anticipated ODE) works fine.

In this case I got the error

DSolve::litarg: "To avoid possible ambiguity, the arguments of the dependent variable in !({a\\ *SuperscriptBox[\"y\", \"[Prime]\", MultilineFunction->None][x] == (-y[x]) + y[r + x]}) should literally match the independent variables."

Any advice?

share|improve this question
Have you read the documentation yet? – Mr.Wizard Dec 23 '12 at 16:55
@Mr.Wizard, sorry, thanks for the doc link. Indeed I googled the error; although I found general answers which I am too newbie o be able to uderstand. Be patient. – Acorbe Dec 23 '12 at 17:00
@Mr.Wizard that doc page doesn't really help solve the DDE – acl Dec 23 '12 at 17:04
I suggest you look at this doc page – m_goldberg Dec 24 '12 at 0:56
up vote 8 down vote accepted

This is a delay differential equation, not an ODE. Mathematica can numerically solve DDEs with constant delays, eg, scaling u and x to reduce your DDE to $u'(x)=u(x+1)-u(x)$, we can do

sln = NDSolve[{u'[x] == u[x - 1] - u[x], 
       u[x /; x <= 0] == x^2}, u, {x, -1, 5}];
Plot[u[x] /. sln, {x, -1, 1}]

Mathematica graphics

share|improve this answer
No way to have some sort of general integral, I guess, right? – Acorbe Dec 23 '12 at 16:58
not that I know of – acl Dec 23 '12 at 16:58
Thanks for the precious help, btw. – Acorbe Dec 23 '12 at 20:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.