# Trouble in a delay ordinary differential equation

I have a delayed partial differential equation to be solved because MMA cannot solve directly. I just used the method of this post Solve PDE with complicated coefficient non-linearity to transform it into a system of delayed ordinary differential equations. However, when trying to solve the system of delay ordinary differential equations, I encountered an error reported by the program. It says that integral variables are not real numbers. This is the equation I tried. $$v\left( t \right) -w\left( t \right) -v''\left( t \right) =0$$ $$v (t) + 2 w (t) + w'' (t)-\exp (-\eta t)\int_ 0^t\exp (x) w (x)\, \mathrm dx = \exp (t)$$ The equations is a ordinary differential equations with delay integral, which I got arbitrarily. The key point of the equations have an integral function. Their initial condition is 0. Here is the code I tried.

ode = {v[t] - w[t] - Derivative[2][v][t] == 0, v[t] + 2*w[t] + Derivative[2][w][t] - Exp[-\[Eta]t]*Integrate[Exp[x]*w[x], {x, 0, t}] == Exp[t]};
ics = {v[0] == 0, Derivative[1][v][0] == 0, w[0] == 0, Derivative[1][w][0] == 0};
rs = Apply[Set, Flatten[NDSolve[{ode, ics}, {v, w}, {t, 0, 5}]], {1}]


Here is the result I got, which says $$x$$ isn't a real number. HELP!

• Why do you add Set@@@ in your code? What are you trying to achieve with this? Also, it's not hard to notice the solution to the system is w[t]==v[t]==0, if it should not, something is probably wrong with the system, please double check it. Dec 12, 2020 at 12:29
• Adding $v (t) + 2 w (t) + w'' (t)-\exp (-t)\int_ 0^t\exp (x) w (x)\, dx = 0$ with it's derivative results in $v(t)+w(t)+v'(t)+2w'(t)+w''(t)+w'''(t)=0$. Dec 12, 2020 at 15:03
• Use set@@@ to directly assign values to the obtained rule list. Yes, I provided an oversimplified version of the original equation, leaving out the external load input. Dec 13, 2020 at 2:37
• Then it's not a good idea to add Set@@@ before you've successfully resolved the equation. Dec 13, 2020 at 2:50
• You're right, I've learned.*.= Thanks a lot. Dec 13, 2020 at 3:10

The problem can be solved analytically with LaplaceTransform:

tode = LaplaceTransform[ode, t, s] /. Rule @@@ ics

tsol = Solve[tode, LaplaceTransform[{v[t], w[t]}, t, s]][[1, All, -1]]

{exprv, exprw} = InverseLaplaceTransform[tsol, s, t] // Simplify;

Plot[{exprv, exprw}, {t, 0, 5}]


• It seems that the problem can't solve it directly using NDSovle. Dec 13, 2020 at 3:12
• That's it! (1 upvote.) Dec 13, 2020 at 3:18