# Problem with continuity of a piecewise function

I am stuck with a homework problem which is about the modelling of tumor growth by ODEs.

The function $A(t)$ is the amount of drugs in the patients blood. During some intervals (namely, $(n,n+\tau)$, the drug is added with an infusion, and in $(n+\tau,n+1)$ it is only used up by the body ($\tau<1)$.

The function that then describes this is given by:

$$A(t)=\begin{cases} \frac{a_*}{\lambda}+\left( A_n-\frac{a_*}{\lambda} \right) e^{-\lambda(t-n)}, & \text{for }n\leq t \leq n+\tau \\ \left[ \frac{a_*}{\lambda}+\left( A_n-\frac{a_*}{\lambda}\right)e^{-\lambda \tau}\right] e^{-\lambda(t-n-\tau)} & \text{else} \end{cases}$$

And the task is to check that this is true. This includes checking for continuity at $t=n, t=n+\tau$. So when I plug in $n+\tau$, I get $$\frac{a_*}{\lambda}+ \left( A_n-\frac{a_*}{\lambda}\right)e^{-\lambda \tau}$$ on both sides, but at $t=n$ I get only: $$\frac{a_*}{\lambda}+A_n-\frac{a_*}{\lambda}=e^{\lambda \tau}\frac{a_*}{\lambda}+A_n-\frac{a_*}{\lambda}$$, which is not equal obviously. The things is, the function $A(t)$ is given (I did not have to find it, just check it), so there should not be a mistake. But where else is the problem?

Also, on a sidenote, the problem asks me to draw a circuit diagram of the ODE model $N(t),A(t)$, where $N$ is the # of cells in the tumor. What exactly is a circuit diagram? Would that be the same as a network diagram?

-

Your work shows no indication of any meaning for the symbol `n', and I believe this is the source of your confusion.

The drug is re-introduced at regular times (namely, at time $t=0, 1, 2, \ldots$ time units). Notice that plugging in $n$ gives

$$A(n) = \frac{a_*}{\lambda} + A_n - \frac{a_*}{\lambda} = A_n$$

From this, we conclude that at the beginning of each time interval, the value currently in the body is $A(n) = A_n$, but this will vary with $n$. In other words, there are a lot of $A_n$ values, $A_0, A_1, A_2, \ldots$.

Now, you correctly checked that there is continuity at the moments $t=n+\tau$ at the END of each infusion period. The reason you are having trouble with the continuity at the BEGINNING of each infusion period is as follows: continuity is determined by the LIMIT of a function, not by just plugging values into a function. The limit of $A(t)$ as you approach $t=n$ (the beginning of an infusion period) from values of $t$ larger than $n$ is given by the first part of the formula, and you can compute it to be $A_n$. However, the limit of $A(t)$ as you approach $t=n$ from values of $t$ less than $n$ is given by the second part of your formula USING $A_{n-1}$ IN PLACE OF $A_n$. This is because just prior to $t=n$, you are still in the infusion period that began at time $t=n-1$, and that whole period is described by the formula \begin{equation*} A(t) = \begin{cases} \frac{a_*}{\lambda} + \left( A_{n-1} - \frac{a_*}{\lambda} \right)e^{-\lambda(t-(n-1))} &\text{ for $n-1 \leq t \leq n-1+\tau$}\\ \left[ \frac{a_*}{\lambda} + \left( A_{n-1} - \frac{a_*}{\lambda} \right)e^{-\lambda t}\right] e^{-\lambda(t-(n-1)-\tau)} &\text{ for $n-1+\tau < t < n$} \end{cases} \end{equation*}

So taking the limit as t approaches $n$ from below using the second part of this formula gives

$$\left( \frac{a_*}{\lambda} \left( e^{\lambda \tau} -1 \right) + A_{n-1} \right) e^{-\lambda}$$

Saying that this should equal the limit $A_n$ as $t$ approaches $n$ from above simply amounts to giving a formula for $A_n$ in terms of $A_{n-1}$. (In other words, you do not need to "check" continuity at the beginning of the infusion period, because $A_n$ is different than $A_{n-1}$. Rather, think of continuity as an assumption you will impose that will allow you to determine $A_n$ from $A_{n-1}$.)

-
That makes perfect sense, thank you so much! :) – Marie. P. Apr 22 '12 at 13:40