# Appendix A: Regulatory functions and their derivatives¶

Because we use certain functions to describe regulation of gene expression, it is useful to have a reference for the functions and their derivatives.

Dimensional forms

In all cases, the functions are dimensionless, and the arguments of the function are given in dimensionless form. To convert to a dimensional derivative, use the chain rule. Let $$x_\mathrm{dim}$$ be the dimensional version of dimensionless $$x$$ such that $$x_\mathrm{dim} = a x$$. Then,

\begin{align} \frac{df}{\mathrm{d}x_\mathrm{dim}} = a \,\frac{\mathrm{d}f}{\mathrm{d}x}. \end{align}

Taylor series

In performing linear stability analysis, we need to express functions as Taylor series. For a univariate function (such a simple Hill functions), the Taylor series about the point $$x_0$$ is

\begin{align} f(x) = f(x_0) + \left.\frac{\mathrm{d}f}{\mathrm{d}x}\right|_{x=x_0}\,(x-x_0) + \text{higher order terms.} \end{align}

For a bivariate function the Taylor series about point $$(x_0, y_0)$$ is

\begin{align} f(x, y) = f(x_0, y_0) + \left.\frac{\partial f}{\partial x}\right|_{x=x_0, y=y_0}\,(x-x_0) + \left.\frac{\partial f}{\partial y}\right|_{x=x_0, y=y_0}\,(y-y_0)+ \text{higher order terms.} \end{align}

## Hill functions¶

### Activating Hill function¶

\begin{align} &f(x) = \frac{x^n}{1 + x^n}, \\[1em] &\frac{\mathrm{d}f}{\mathrm{d}x} = \frac{n x^{n-1}}{(1 + x^n)^2}. \end{align}

### Repressive Hill function¶

\begin{align} &f(x) = \frac{1}{1 + x^n}, \\[1em] &\frac{\mathrm{d}f}{\mathrm{d}x} = -\frac{n x^{n-1}}{(1 + x^n)^2}. \end{align}

## Two activators affecting a single gene¶

### AND logic¶

\begin{align} &f(x, y) = \frac{x^{n_x}\, y^{n_y}}{1 + x^{n_x} y^{n_y}},\\[1em] &\frac{\partial f}{\partial x} = \frac{n_x\,x^{n_x-1}\,y^{n_y}}{(1 + x^{n_x} y^{n_y})^2},\\[1em] &\frac{\partial f}{\partial y} = \frac{n_y\,x^{n_x}\,y^{n_y-1}}{(1 + x^{n_x} y^{n_y})^2}. \end{align}

### OR logic¶

\begin{align} &f(x, y) = \frac{x^{n_x} + y^{n_y}}{1 + x^{n_x} + y^{n_y}},\\[1em] &\frac{\partial f}{\partial x} = \frac{n_x\,x^{n_x-1}}{(1 + x^{n_x} + y^{n_y})^2},\\[1em] &\frac{\partial f}{\partial y} = \frac{n_y\,y^{n_y-1}}{(1 + x^{n_x} + y^{n_y})^2}. \end{align}

## Two repressors affecting a single gene¶

### AND logic¶

\begin{align} &f(x, y) = \frac{1}{(1 + x^{n_x})(1 + y^{n_y})},\\[1em] &\frac{\partial f}{\partial x} = -\frac{n_x\,x^{n_x-1}}{(1 + x^{n_x})^2\,(1 + y^{n_y})},\\[1em] &\frac{\partial f}{\partial y} = -\frac{n_y\,y^{n_y-1}}{(1 + x^{n_x})(1 + y^{n_y})^2}. \end{align}

### OR logic¶

\begin{align} &f(x, y) = \frac{1 + x^{n_x} + y^{n_y}}{(1 + x^{n_x})(1 + y^{n_y})},\\[1em] &\frac{\partial f}{\partial x} = -\frac{n_x\,x^{n_x-1}\,y^{n_y}}{(1 + x^{n_x})^2\,(1 + y^{n_y})},\\[1em] &\frac{\partial f}{\partial y} = -\frac{n_y\,x^{n_x}\,y^{n_y-1}}{(1 + x^{n_x})(1 + y^{n_y})^2}. \end{align}

## One activator and one repressor affecting the same gene¶

Here, we assign $$x$$ to be the concentration of the activator and $$y$$ to be the concentration of the repressor.

### AND logic¶

\begin{align} &f(x, y) = \frac{x^{n_x}}{1 + x^{n_x} + y^{n_y}},\\[1em] &\frac{\partial f}{\partial x} = \frac{n_x\,x^{n_x-1}(1+y^{n_y})}{(1 + x^{n_x} + y^{n_y})^2},\\[1em] &\frac{\partial f}{\partial y} = -\frac{n_y\,x^{n_x}\,y^{n_y-1}}{(1 + x^{n_x} + y^{n_y})^2}. \end{align}

### OR logic¶

\begin{align} &f(x, y) = \frac{1+x^{n_x}}{1 + x^{n_x} + y^{n_y}},\\[1em] &\frac{\partial f}{\partial x} = \frac{n_x\,x^{n_x-1}\,y^{n_y}}{(1 + x^{n_x} + y^{n_y})^2},\\[1em] &\frac{\partial f}{\partial y} = -\frac{n_y\,(1+x^{n_x})\,y^{n_y-1}}{(1 + x^{n_x} + y^{n_y})^2}. \end{align}