3
$\begingroup$

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

$\endgroup$
6
  • 2
    $\begingroup$ 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. $\endgroup$ – xzczd Dec 12 '20 at 12:29
  • 2
    $\begingroup$ 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$. $\endgroup$ – Cesareo Dec 12 '20 at 15:03
  • $\begingroup$ 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. $\endgroup$ – mozeq Dec 13 '20 at 2:37
  • $\begingroup$ Then it's not a good idea to add Set@@@ before you've successfully resolved the equation. $\endgroup$ – xzczd Dec 13 '20 at 2:50
  • $\begingroup$ You're right, I've learned.*.= Thanks a lot. $\endgroup$ – mozeq Dec 13 '20 at 3:10
5
$\begingroup$

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

$\endgroup$
2
  • 1
    $\begingroup$ It seems that the problem can't solve it directly using NDSovle. $\endgroup$ – mozeq Dec 13 '20 at 3:12
  • $\begingroup$ That's it! (1 upvote.) $\endgroup$ – Αλέξανδρος Ζεγγ Dec 13 '20 at 3:18

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.