0
$\begingroup$

I have modeled the interaction of two physical quantities, $S$ and $B$, by the following differential equations (the second one is a delay differential equation):

$$S'(t) = 0.31 S(t) \Big( 1 - \frac{S(t)}{6.19} \Big)- \frac{a}{1 + B(t)} S(t),$$

$$B'(t) = c (1 - B(t)) \theta(18 - t) - d B(t) S(t) - 3 c (1 - B(t - 18)),$$

where $a$, $c$, and $d$ are some constants to be determined from the experimental data and $\theta$ is the Heaviside function. The parameters are found to be: $a = 0.72$, $c = 0.19$, and $d = 0.24$; and also, the initial conditions read: $S(0) = 1.25$ and $B(0) = 1.14$.

The solutions (plotted with Mathematica) are:

Unprotect[HeavisideTheta]; HeavisideTheta[0.] = 0.5; Protect[HeavisideTheta];
so = NDSolve[{ss'[t] + 0.72/(1 + bb[t]) ss[t] - 0.31 ss[t] (1 - ss[t]/6.19) == 0, 
bb'[t] - 0.19 (1 - bb[t]) HeavisideTheta[18 - t] + 0.24 bb[t] ss[t] + 0.57 (1 - bb[t - 18]) == 0, 
ss[t /; t < 0] == 1.25, bb[t /; t < 0] == 1.14}, {ss, bb}, {t, 0, 24}];

Plot[Evaluate[bb[t] /. so], {t, 0, 24}, PlotRange -> All, AxesOrigin -> {0, 0}, PlotLabel -> "B(t)"]
Plot[Evaluate[ss[t] /. so], {t, 0, 24}, PlotRange -> All, AxesOrigin -> {0, 0}, PlotLabel -> "S(t)"]

Image 1

Everything looks good, since I'm only interested in the time interval $0 < t < 24$ and the curves correctly predict the behavior of my system (experiment). However, if we simulate the differential equations further and for a larger time interval, let's say, till $t = 30$, the solutions look like:

Image 2

This is not desirable as $B$ is a physical quantity and cannot be negative.

My question is:

How can I introduce a cut-off in my differential equations to force the $B$ solution do not cross the axis and to be bounded and remain zero at the end?

Any help is appreciated.

$\endgroup$
1
  • 3
    $\begingroup$ Since S and B are physical quantities, perhaps physics (or physical intuition) can suggest a good modification of the equations. Is there some physical phenomenon that is negligible for small t but might become important for large t ? This approach strikes me as better than just creating a mathematical modification to make the solutions stay bounded and approach 0. $\endgroup$ Commented Dec 8, 2023 at 20:42

1 Answer 1

1
$\begingroup$

You could just modify your second equation once $t>24$, e.g., $$ B'(t) = \theta(24-t) [c (1 - B(t)) \theta(18 - t) - d B(t) S(t) - 3 c (1 - B(t - 18))]-\frac{1}{2}\theta(t-24)B(t) $$ If a smoother modification is desired, one could, e.g., replace the newly introduced step functions as $\theta(x) \rightarrow (\tanh(10x)+1)/2$.

$\endgroup$
5
  • $\begingroup$ @Tim - I'm not sure what you mean - that's exactly what it (the solution) does, decay to zero, exponentially. Could you please explain? We can of course also replace the step functions by smoothed-out versions. $\endgroup$ Commented Dec 9, 2023 at 8:51
  • $\begingroup$ @Tim - I've added a comment about smoothing out the step functions. Indeed, the last term would work without the factor 1/2. This was just an ad hoc choice to keep the derivative of the solution smooth, but I merely eye-balled it - the exact choice keeping the derivative smooth may be some other number close to 1/2. $\endgroup$ Commented Dec 9, 2023 at 9:14
  • $\begingroup$ @Tim - Well, it's not really a new term, I just wrote it separately for clarity. You already have a term $-cB(t)$ that is currently active only for $t<18$, and you could view it as now being reactivated for $t>24$. Whereas all the other terms are now being cut off at $t=24$. You don't have any more freedom in choosing boundary conditions beyond the $B(0)$ and $S(0)$ you have fixed. $\endgroup$ Commented Dec 9, 2023 at 14:39
  • $\begingroup$ @Tim - I don't see how that could be done in any straightforward fashion. Shifting the argument of a function is fundamentally different from switching it on and off using step functions. $\endgroup$ Commented Dec 9, 2023 at 18:30
  • $\begingroup$ @Tim - I had a look (I'm not going to go comment over there, I'd need to open an account). I think at this point you need to take seriously Andreas Blass' comment to your original post. Your description has to be rooted in the underlying physics. Just playing purely mathematical games with the data is ultimately not fruitful. The terms in your differential equation have to be supported by some physical reasoning for the analysis to be meaningful. How do you even know your system is described by a differential equation? This is ultimately a question for a physics forum, not a mathematics one. $\endgroup$ Commented Dec 10, 2023 at 19:07

You must log in to answer this question.