Problem 2.2: Event handling for discontinuous derivatives


This problem is still a draft.

Throughout Chapter 2, we used a Guassian function to represent a pulse of input signal \(s\). One of the reasons we chose to use a Gaussian function was to ensure that the function would be smooth, i.e. its derivative is always continuous. What if, however, we instead wanted to model how our system would respond to a step increase and decrease of the inducer? In that case, our \(s(t)\) timecourse would encode a \(\tau\)-width pulse that begins at time \(t_0\) as

\begin{align} s(t) = \left\{\begin{array}{lll} 1 & & t_0 \leq t \leq t_0 + \tau \\[0.5em] 0 & & \text{otherwise}. \end{array}\right. \end{align}

This function has a discontinuous derivative at \(t = t_0\) and \(t = t_0 + \tau\). In this exercise, we will walk through the construction of a solver for stepwises pulses in \(s\) and demonstrate the problems associated with non-smooth functions. We will then walk through the procedure of event handling, which is a way to resolve these smoothness issues.

  1. Write a naive function that directly encodes stepwise s(t)

  2. Feed the stepwise s(t) function into a solver for the negative autoregulation and unregulated systems. Direct the student to a parameter regime where it breaks.

  3. Guide the student in writing a new solver for stepwise s(t) that uses event handling to do three separate integrations that are chained together in the final result

  4. Show that the problematic regime from Step 2 is no longer an issue