In chapter 6 we will show interactive simulations, which visualize functions in the plane, curves in space , surface and time-dependent surfaces. At this point we will give a short overview about the fundamental possibilities for visualizing functions.

Functions of one Variable

Functions $y=f\left(x\right)$ are represented graphically in a two dimensional system of coordinates, on which the independent variable is usually shown on the abscissa and the dependent variable $y=f\left(x\right)$ on the ordinate. An interval on the $x$-axis is mapped to an interval on the $y$-axis. The mapping is only unique, if there is only one function value ${y}_{1}=f\left({x}_{1}\right)$ for a certain value ${x}_{1}$ of the independent variable. If one wants to for example show a circle one has to use two unique functions ${y}_{1}$ and ${y}_{2}$ for the parts of the circle above and below the abscissa:

$${x}^{2}+{y}^{2}={r}^{2}\to {y}_{1}=+\sqrt{{r}^{2}-{x}^{2}};{y}_{2}=-\sqrt{{r}^{2}-{x}^{2}}$$

y = f(x) with Linear or Logarithmic Scaling of Axes

The special character of a function can be underlined if one uses logarithmic scaling on one or both axes. With single-logarithmic presentation exponential functions appear as lines and with double-logarithmic presentation powers as lines. In addition one can highlight regions of interest on the abscissa or ordinate using logarithmic stretching or compression. One also uses logarithmic scaling if one or both of the variables cover a very large range of values.

Fig5.4 provides a simulation showing a number of preset functions next to each other in linear-linear, linear-logarithmic and double-logarithmic scale. The formula field is editable, which allows you to study arbitrary functions in comparison.

Further details and suggestions for experiments are given in the description pages.

Parameter representation of curves in Plane and Space

To show curves in the plane, that are non unique w.r.t. the mapping from $x$ to $y$, one uses the parameter representation, where both $x$ and $y$ are unique functions of a third independent variable , namely the parameter $p$.

$$\begin{array}{c}x=f\left(p\right);y=g\left(p\right)\hfill \\ \phantom{\rule{0em}{0ex}}\phantom{\rule{0em}{0ex}}\phantom{\rule{0em}{0ex}}\phantom{\rule{0em}{0ex}}\phantom{\rule{0em}{0ex}}{p}_{1}\le p\le {p}_{2}\hfill \\ \hfill \end{array}$$

For the circle around the origin with radius $r$ this is for example

$$\begin{array}{c}x=rcos\varphi ;\phantom{\rule{0em}{0ex}}\phantom{\rule{0em}{0ex}}\phantom{\rule{0em}{0ex}}\phantom{\rule{0em}{0ex}}\phantom{\rule{0em}{0ex}}y=rsin\varphi \hfill \\ \to {x}^{2}+{y}^{2}={r}^{2}\left({sin}^{2}\varphi +{cos}^{2}\varphi \right)={r}^{2}\cdot 1={r}^{2}\hfill \\ \hfill \end{array}$$

where the parameter $\varphi $ is the angle between the radius vector to the computation point and the $x$.

Using the parameter representation one can represent functions in the plane, that cover the coordinate ranges $x$ and $y$ multiple times such as spirals.

Extending the parameter representation to the three coordinates of space one can visualize space curves in this way:

$$x=f\left(p\right);y=g\left(p\right);z=h\left(p\right)$$

Thus the number line is mapped to a line in the plane or in space.

Unique Surfaces in Space

With $z=f\left(x,y\right)$ on can represent surfaces in a three dimensional space. Thus the surface is a mapping of the $xy$-plane with a height profile that depends on $x$ and $y$. On paper one can only show two dimensional projections of this surface. The technique of simulations extend this view quite dramatically, since it allows to change the projections interactively or automatically, such that the impression of three dimensions being present is received; we will use this approach intensively in the following.

Parameter Representation of Surfaces in Three dimensional Space

Via a parameter representation with two parameters one can represent surfaces in spaces, that are not unique with respect to a plane of reference, for example the surface of a sphere or a torus with respect to the $xy$-plane. In these cases one needs ${f}_{1}\left(x,y\right)$ and ${f}_{2}\left(x,y\right)$. In parameter representation one writes:

$$x=f\left(p,q\right);y=g\left(p,q\right);z=h\left(p,q\right)$$

Thus the two number lines $p$ and $q$ are mapped to a surface that lies in space.

Functions of 3 Variables

A density distribution for example of charge or mass in space is described via a function $D$ of the three spatial coordinates $x,y$ and z, i.e.. D(x,y,z). How can such functions of 3 variables be visualized? One obviously needs another variable beyond the three space coordinates.

A qualitative option consists of assigning to a regular space grid of points a colour coding for $D\left(x,y,z\right)$ and to choose the density of points in such a way, that the space stays “transparent”. The grid is then projected on a surface and changing the projection as a function of time again increases the spatial impression.

A second option are surfaces in space on which $D\left(x,y,z\right)$ has a constant value. Then one can stagger semi transparent surfaces inside of each other or the constant value of each surface can be changed as function of time. In the moving projection both possibilities yield a quantitative picture. In the first case one uses the opacity and in the second case the time as additional variable.

A Physical event such as the ticking of the watch on my wrist takes place in a three dimensional space $\left(x,y,z\right)$ and depending on the time $t$ and can be considered as a four dimensional function $E$:

$$E=f\left(x,y,z,t\right)$$

In a simulation this can be represented for example by calculating for a cohort of three dimensional functions $E\left(x,y,z,{t}_{i}\right)$ for a number of discrete points ${t}_{i}$ in time two dimensional projections and displaying these one after the other. In general this method has of course limited applicability. It is relatively simple, when dealing with a chain of events, that have a lower dimensionality, for example in the case of a propagating surface in space during an explosion. In general one will restrict this method to a lower dimensional projection.

This is especially the case for describing phenomena in the special theory of relativity. In this theory the time $t$ joins the three spatial dimensions as “fourth dimension”. In order for this variable to have dimensions of length one usually normalizes $t$ via multiplication with the velocity of light $c=3\times 1{0}^{8}\text{m/sec}$:

$$E=f\left(x,y,z,ct\right)\text{or}E=f\left({x}_{1},{x}_{2},{x}_{3},{x}_{4}\right)\text{}$$

A four dimensional chain of events – for example an exploding supernova – can only be visualized with difficulty as a whole. To capture this phenomenon in its entirety one would like to imagine the whole explosion in a single moment. In deed Homer and the pre-socratic philosophers speculated around 500 B.C. about the god-like possibility to recognize space and time as past, present and future, as unit. Around the year 520 Boethius formulated such thoughts in his work Comfort of Philosophy.

One circumvents this problem by doing away with two space dimensions for visualizations in the theory of relativity and plotting the chain of events on a plane diagram for example with the time dimension $ct$ on the ordinate and on the abscissa the space dimensions $x$, in which the event only takes place. The event chain of a body that is moving in $x$-direction is then called world line.

This will be visualized with an example in Fig5.3, where a point object is moving with constant acceleration in $x$-direction. In red the limiting velocity of light, i.e. the worldline of light flash x = ct is shown and in black the event chain that would be possible according to classical mechanics, for which arbitrarily large velocities could be achieved and in magenta the actually possible event chain according to the theory of relativity, for which the velocity will approach the velocity of light but will not exceed it. The arrows show the respective light cones in which all events caused by the object happen – all as seen from an observer at the origin.

In this simulation the movement of the objects is shown as a function of time. Further details a given in the description of the interactive simulation.

In articles on the special theory of relativity the time is normally plotted on the ordinate and the space on the abscissa, such that the light cone opens up to the top. The classical acceleration parabola $x=\frac{b}{2}{t}^{2}$ is however open to the right.

In the following we define important properties of a function of one variable $y=f\left(x\right)$ on its domain of definition $D$. A function $f\left(x\right)$ is

- bounded, if in the interval of definition $D$ there is a maximum (supremum) and a minimum (infimum).
- one-sided continuous (non-continuous) in ${x}_{0}$, if $f\left(x\right)$ continues smoothly in one direction.
- continuous in ${x}_{0}$, if $f\left(x\right)$ continues smoothly in both directions.
- continuous in the domain of definition $D$, if $f\left(x\right)$ is continuous at all points in the domain of definition, i.e. there is no jump
- one-sided differentiable in ${x}_{0}$, if $f\left(x\right)$ has at ${x}_{0}$ a unique derivative in in one direction.
- differentiable in ${x}_{0}$, if $f\left(x\right)$ has at ${x}_{0}$ the same derivative in both directions.
- differentiable in $D$, if $f\left(\right)$ is differentiable in every point of $D$.

Corresponding examples are shown in Fig.5.6:

The slope of the curve at a point is characterized via the direction of the tangent in the point and thus by the differential quotient ${f}^{\prime}\left(x\right)$. At the maximum and minimum, i.e. at the extrema, the tangent is parallel the $x$-axis and the tangent of the slope angle is zero. At the turning point the slope attains its largest or smallest value with respect to its vicinity; in the example we have a turning point with a positive slope.

The curvature of the graph of a function on an interval is defined as follows:

Concave function graph (negative curvature): all points of the graph lie above the chord connecting the end points of the graph on the interval; the slope increases with increasing $x$.

Convex function graph (positive curvature): all points of the graph lie below the chord connecting the end points of the graph on the interval; the slope decreases with increasing $x$.

The curvature at a point $\left(x,y\right)$, considered as infinitesimal interval, is obtained as limit for vanishing width of the interval. It describes the change of the slope and therefore is equal to the second derivative ${f}^{\u2033}\left(x\right)$. Thus this quantity is as well as the curvature is a local quantity and in addition a function of $x$ itself for those functions that can be differentiated twice. At the turning point the sign of the curvature changes; the curvature and thus the second derivative ${f}^{\u2033}\left(x\right)$ vanishes at the turning point.

The red curve in the second example has a kink at ${x}_{0}$ , where no unique slope is defined, but only a right-sided and left-sided derivative exist. It is therefore only one-sided differentiable; its derivative is not continuous at ${x}_{0}$. The blue curve in the first example diverges at the end of the interval; it is not bounded and has no supremum.

Functions can be of many different types. One of those, that is often given in textbooks and is both simple and exotic, gives food for thought, but is very well defined is given by

$$\begin{array}{c}\begin{array}{cc}\hfill f\left(x\right)\phantom{\rule{0em}{0ex}}=\hfill & \hfill \left\{\begin{array}{c}1\phantom{\rule{0em}{0ex}}\phantom{\rule{0em}{0ex}}\phantom{\rule{0em}{0ex}}\text{for}\phantom{\rule{0em}{0ex}}\phantom{\rule{0em}{0ex}}x\phantom{\rule{0em}{0ex}}\phantom{\rule{0em}{0ex}}\text{irrational,}\hfill \\ 0\phantom{\rule{0em}{0ex}}\phantom{\rule{0em}{0ex}}\text{for}\phantom{\rule{0em}{0ex}}\phantom{\rule{0em}{0ex}}x\phantom{\rule{0em}{0ex}}\phantom{\rule{0em}{0ex}}\text{rational}\hfill \\ \hfill \end{array}\right\}\hfill \\ \hfill \hfill \end{array}\hfill \\ \text{Domainofdefinition:}0\le x\le 1\hfill \\ \hfill \end{array}$$

This function can obviously not be visualized graphically, since there are infinitely many rational and irrational numbers in the domain of definition, such that the values of $0$ and $1$ are nested indissolubly on the ordinate. This function is not continuous at any point and cannot be differentiated anywhere. Kochcurve

A graphically attractive exotic function is the fractal Kochkurve, that is obtained as the limit of a combination of triangular lines. This function is contrast to the above mentioned one continuous, but does not have a well defined slope and thus no derivative.

The functions that are important for physics are however mostly well-behaved, with the exception of a few points. The following section demonstrates a few typical properties.