3

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! enter image description here

xzczd
  • 65,995
  • 9
  • 163
  • 468
mozeq
  • 295
  • 1
  • 7
  • 2
    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. – xzczd Dec 12 '20 at 12:29
  • 2
    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$. – Cesareo Dec 12 '20 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. – mozeq Dec 13 '20 at 02:37
  • Then it's not a good idea to add Set@@@ before you've successfully resolved the equation. – xzczd Dec 13 '20 at 02:50
  • You're right, I've learned.*.= Thanks a lot. – mozeq Dec 13 '20 at 03:10
  • If η is added to the coefficient of exponential function before integral function, it cannot be eliminated by derivative superposition. – mozeq Dec 13 '20 at 03:22

1 Answers1

5

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}]

enter image description here

xzczd
  • 65,995
  • 9
  • 163
  • 468