# Functions

## Functions

One of the key mathematical ideas in the use of math in science is the idea of a function. Functions simply mean that one thing depends on another.

The simplest math example is a single independent variable (call it $x$) and a single dependent variable (call it $y$).  The fact that $y$ takes on values that are determined by the value that $x$ has following some rule is written:

$$y=f(x)$$

We write "$y$" when we are focusing on the value that is produced and we write $f(x)$ when we are focusing on what we do to $x$  in order to get the value that we are going to put into $y$.

Of course in using math in science, things are never this simple. Our functions will contain lots of parameters that represent characteristics of the physical systems we are considering. So really our functions are not just functions of the independent variable we might be considering, but they are also functions of whatever parameters we have. We often have to pay attention to more than one variable. And even for some parameters that we think of as constants we might have to think about what happens when they change — even differentiating with respect to a constant!

## Functional Dependence: It's the relationship that matters

The critical part about a function is not just that two variables are related but how they are related.  Since in biology we often consider how systems change — how organisms grow, how species evolve — exactly how a function depends on a parameter or variable turns out to be essential in understanding what's happening. Often in biological applications of physical principles there will be competing effects that vary in different ways.  The specific way that these effects vary can be critical.

For example, in our problems about scaling (for example, the worm) one effect depends on an object's surface while another effect depends on the object's volume. If the object grows isometrically (all dimensions increase together), then the surface grows with the square of the length and the volume with the cube of the length. This may constrain the way the object can grow and can have profound implications for evolution.

Here are some of the kinds of dependencies we use in this class:

• Linear:             $f(x) = x \times$ (stuff that does not depend on $x$)
• Quadratic       $f(x) = x^2 \times$ (stuff that does not depend on $x$)
• Cubic               $f(x) = x^3 \times$ (stuff that does not depend on $x$)
• Inverse linear  $f(x) = (1/x) \times$ (stuff that does not depend on $x$ )
• Inverse square $f(x) = (1/x^2) \times$ (stuff that does not depend on $x$)
• Power law       $f(x) = x^n \times$ (stuff that does not depend on $x$)
• Exponential     $f(x) = e^x \times$ (stuff that does not depend on $x$ )

Note that the "stuff that does not depend on $x$" can be very messy and include lots of other variables and parameters! It's important that you learn to be able to choose to see some of the variables and parameters as "just constants" when you are considering the variation of a particular variable or parameter — and be able to switch which one you are focusing on!

To see an example of how this plays out, see the follow-on, Units, Scaling, and functional dependence, and the Toolbelt entry, the scaling tool

## Some warnings

Note that to have a function, we don't have to have a simple algebraic expression that works for all values of $x$ — and it doesn't even have to be defined for all values of $x$. For example, we could have a function that assigns the value of "1" to every decimal that has an even digit in its 12th place and "0" to every other one. This is still a function — though not a very useful one. We could also have functions that are defined differently in different regions.  This actually is useful. (See for example our problem on the propagation of a triangular wave. Note this problem also writes the pulse in terms of dimensionless ratios so as to get the units right and still reduce to something that looks like "math-without-units".)

Joe Redish 8/14/11

Article 268