The solvepde function was introduced in MATLAB R2016a. I am able to solve my system of PDEs if there are no time delays involved. Does anyone know how to include time delays in the solvepde function?

  • 1
    $\begingroup$ What is a "time delay?" That is not a term I am familiar with. $\endgroup$ – Bill Greene Mar 19 '16 at 12:37
  • $\begingroup$ Time delay is best explained by looking at examples of delay differential equations (DDEs) using the MATLAB function ddesd for general delays. I want to know if such an approach can be used to solve delayed PDEs? $\endgroup$ – Sven Delport Mar 21 '16 at 10:19
  • $\begingroup$ Welcome to Scicomp.SE! You will have a better chance of getting answers if you describe in much more detail what you're trying to solve, ideally using mathematical notation. If it's really just about using a specific feature of Matlab, the question is off-topic here and should be asked at Matlab Answers (especially if it's about a new feature in a just released version). $\endgroup$ – Christian Clason Mar 21 '16 at 18:09

If you have constant time delays, you can introduce new variables for the delayed variables. For example, you can let $y = x(t-\tau)$. Then by the chain rule you get $\dot{y} = \dot{x}(t-\tau)$... so you end up with a lot of extra variables, but it will work if you aren't changing your timesteps around and make them a multiple / divisor of $\tau$ (if you have multiple $\tau$, then it has to be a common divisor or common multiple). If you set a good initial condition on $y$ you know have a system of non-delay equations which it can solve with chosen fixed timesteps.

If your delay equations are more complex, then the solver needs to take this into account. solvepde does not do that, so I would not recommend it for this case.

(Almost forgot to note, if you use a divisor of $\tau$, then you need $\tau / h$ new variables in order to always hit one you know... this is easier to implement as an array that shifts everything down 1 rather than with a whole bunch of variables in a standard solver like solvepde, but YMMV)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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