Functions

Definition and notation of a function

Functions, in physics or biology also known as formulas, rules or laws, are one of the most important "creatures" in mathematics. Generally speaking, functions can be thought of as little machines, which accept an input and, according to some fixed rule, produce an output:

input xfrule: 10  xoutput y\begin{array}{cl} \text{input }x & \\ \large\downarrow & \\ \boxed{\large f} & \text{rule: 10 $\cdot$ x}\\ \large\downarrow & \\ \text{output }y & \\ \end{array}

This machine has a name, ff. Also note that in maths, the input is typically denoted by xx, and the output is typically denoted by yy. The rule of this machine is 10x10\cdot x, that is, "multiply the input by 1010. So if the input is 33, the output is 310=303\cdot 10=30:

input x=3frule: 10  xoutput y=30\begin{array}{cl} \text{input } x=3 & \\ \large\downarrow & \\ \boxed{\large f} & \text{rule: 10 $\cdot$ x}\\ \large\downarrow & \\ \text{output } y=30 & \\ \end{array}

Here is a machine gg that uses different letters for input and output:

input tgrule: 4.05t2output s\begin{array}{cl} \text{input } t & \\ \large\downarrow & \\ \boxed{\large g} & \text{rule: $4.05\cdot t^2$}\\ \large\downarrow & \\ \text{output } s & \\ \end{array}

This machine calculates the distance ss that a free falling stone has travelled during the time tt. You probably already know this rule form physics.

Some words about the notation. There are different ways how we can describe a function without actually drawing the machine. For the two machines ff and gg above we can write:

  1. We can write y=10xy=10\cdot x and s=4.05t2s=4.05\cdot t^2. This notation does not give you the name of the function. But it tells you what variable you use for the input and the output, and it states the rule of the machine.

  2. f(x)=10xf(x)=10\cdot x and g(t)=4.05t2g(t)=4.05\cdot t^2. This notation gives you the name of machine, and also the rule. It also tells you what variable you use for the input, but not for the output. In addition, if we write

    f(3)=310=30f(3)=3\cdot 10 = 30

    we mean that input of the machine is 33, and the result is 3030.

Both notations are called the function equation of the function. We will mostly use the second notation, but in physics you will probably use the first method more often, because the variables for input and output varies a lot. In maths, we typically just use xx and yy.

Exercise 1
  1. Consider the function given in the diagram below. Draw the function equation and determine h(3)h(3).

    uhrule: square inputv\begin{array}{cl} u & \\ \large\downarrow & \\ \boxed{\large h} & \text{rule: square input}\\ \large\downarrow & \\ v & \\ \end{array}
  2. A function has the function equation k(x)=x1k(x)=x-1. Draw the machine.

Solution
  1. The function equation of hh is h(u)=u2h(u)=u^2 (or v=u2v=u^2), and h(3)=32=9h(3)=3^2=9.

  2. The machine diagram is

    xkrule: x-1y\begin{array}{cl} x & \\ \large\downarrow & \\ \boxed{\large k} & \text{rule: x-1}\\ \large\downarrow & \\ y & \\ \end{array}

    We gave the output variable the name yy.

Properties of functions, domain and range

Are there rules which are not allowed to use in functions? Yes, because we require from functions that every input must have exactly one output. What is not allowed is for an input to produce two or even more outputs, or no output at all.

For example, let's have a look at the following machine:

xfrule: find all y with y2=xy\begin{array}{cl} x & \\ \large\downarrow & \\ \boxed{\large f} & \text{rule: find all $y$ with $y^2=x$}\\ \large\downarrow & \\ y & \\ \end{array}

The input x=4x=4 has two outputs, y=2y=-2 and y=2y=2 (because 22=42^2=4 and (2)2=4(-2)^2=4):

4frule: find all y with y2=42,2\begin{array}{cl} 4 & \\ \large\downarrow & \\ \boxed{\large f} & \text{rule: find all $y$ with $y^2=4$}\\ \large\downarrow & \\ -2,2 & \\ \end{array}

Thus this machine is not a function. Also, for negative inputs, no solution exists.

4frule: find all y with y2=4no output\begin{array}{cl} -4 & \\ \large\downarrow & \\ \boxed{\large f} & \text{rule: find all $y$ with $y^2=4$}\\ \large\downarrow & \\ \text{no output} & \\ \end{array}

Question: how could we modify the machine, so that we get a function? Well, lets first address the too many output problem. We could simply tell the machine to pass the positive value to the output, like so:

xfrule: find all positive y with y2=xy\begin{array}{cl} x & \\ \large\downarrow & \\ \boxed{\large f} & \text{rule: find all $\it{positive}$ $y$ with $y^2=x$}\\ \large\downarrow & \\ y & \\ \end{array}

To deal with the no output problem, we introduce a new set, the domain. The domain of a function ff, written

DfD_f

consists of all real values who, if fed to the machine as input, produce exactly one output value. So for the machine above, we want to restrict the input values to all real values bigger or equal to 00:

Df=[0,[D_f =[0,\infty[

Thus, the machine below is a function:

xDffrule: find all positive y with y2=xy\begin{array}{cl} x \in D_f & \\ \large\downarrow & \\ \boxed{\large f} & \text{rule: find all $\it{positive}$ $y$ with $y^2=x$}\\ \large\downarrow & \\ y & \\ \end{array}

Why do we want to have no more than one output for an input? In physics, a function producing two outputs makes seldom sense. Consider, for example, a function that tells you for each point in time (input) the position of a falling ball (output). Clearly it does not make sense to have for a given time two different positions of the ball ... .

The set of all the possible output values of the function is called the range, and is denoted by

RfR_f

The machine above produces only positive values as outputs (including 00), so the range of ff is also

Rf=[0,[R_f =[0,\infty[
Exercise 2

Specify the domain and range of the following functions:

  1. h(x)=x1h(x)=x-1

  2. g(x)=2xg(x)=2x

  3. k(x)=1x2k(x)=\frac{1}{x^2}

Solution

For each input in the domain there is exactly one output:

  1. Dh=RD_h=\mathbb{R} and Rh=RR_h=\mathbb{R}
  2. Dg=RD_g=\mathbb{R} and Rg=RR_g=\mathbb{R}
  3. Dk=R{0}D_k=\mathbb{R}\setminus \{0\} and Rk=]0,[R_k=]0,\infty[
Exercise 3
  1. Consider the following functions below, described with words. Draw for each function the machine representation, and also write down the function equation.

    1. The input is divided by 22, and the result is increased by 11.
    2. The input is decreased by 2.52.5, and the result multiplied by 1010.
    3. The input is raised to the third power, and the result multiplied by 22.
    4. The input is multiplied by 33, the result is raised to the third power, and the result of this is increased by twice the input.
    5. Two is divided by 4 times the input, and the result is decreased by the input.
  2. Describe the following function equations in words (similar to exercise 1), and determine f(3)f(-3).

    1. f(x)=(x1)2f(x)=(x-1)^2
    2. f(x)=3x12f(x)=\frac{3x-1}{2}
    3. f(x)=1f(x)=1
    4. f(x)=2x+2x2f(x)=-2x+2-x^2
    5. f(x)=xx+1+1f(x)=\frac{x}{x+1}+1
  3. Why is the following function equation problematic? f(x)=±xf(x)=\pm\sqrt{x} Note: The root is always a positive number, e.g. 4=2\sqrt{4}=2. So ±4\pm \sqrt{4} are the numbers 22 and 2-2.

  4. Find the input(s) to a given output for the following functions.

    1. x=?x=?x=?f3x1gx2hx(x1)0360\begin{array}{clclcl} x=? & & x=? & & x=? & &\\ \large\downarrow & & \large\downarrow & & \large\downarrow & & \\ \boxed{\large f} & 3x-1 & \boxed{\large g} & x^2 & \boxed{\large h} & x(x-1) &\\ \large\downarrow & & \large\downarrow & & \large\downarrow & &\\ 0 & & 36 & & 0 & &\\ \end{array}
    2. i(x)=4x+2i(x)=4x+2, output y=1y=-1

    3. j(x)=3j(x)=3 for all xx, output y=3y=3

    4. k(x)=1xk(x)=\frac{1}{x}, output y=0y=0

  5. Determine the domain and the range of the following functions.

    1. f(x)=4x+2f(x)=4x+2

    2. g(x)=3g(x)=-3

    3. h(x)=x3h(x)=x^3

Solution
  1. The function equations are

    1. a(x)=x2+1a(x)=\frac{x}{2}+1

      xax2+1y\begin{array}{cl} x\\ \large\downarrow & \\ \boxed{\large a} & \frac{x}{2}+1\\ \large\downarrow & \\ y & \\ \end{array}
    2. b(x)=10(x2.5)=10(x2.5)b(x)=10(x-2.5)=10(x-2.5)

      xb10(x2.5)y\begin{array}{cl} x\\ \large\downarrow & \\ \boxed{\large b} & 10(x-2.5)\\ \large\downarrow & \\ y & \\ \end{array}
    3. c(x)=x32=2x3c(x)=x^3\cdot 2=2x^3

      xc2x3y\begin{array}{cl} x\\ \large\downarrow & \\ \boxed{\large c} & 2x^3\\ \large\downarrow & \\ y & \\ \end{array}
    4. d(x)=(3x)3+2xd(x)=(3x)^3+2x

      xd(3x)3+2xy\begin{array}{cl} x\\ \large\downarrow & \\ \boxed{\large d} & (3x)^3+2x\\ \large\downarrow & \\ y & \\ \end{array}
    5. e(x)=24xxe(x)=\frac{2}{4x}-x

      xe24xxy\begin{array}{cl} x\\ \large\downarrow & \\ \boxed{\large e} & \frac{2}{4x}-x\\ \large\downarrow & \\ y & \\ \end{array}
  2. It is

    1. "the input is decreased by 11, and the result is squared" f(3)=(31)2=(4)2=16f(-3)=(-3-1)^2=(-4)^2=\underline{16}
    2. "the input is multiplied by 33, the result is decreased by 11, and the result of this is divided by 22" g(3)=3(3)12=5g(-3)=\frac{3\cdot(-3)-1}{2}=\underline{-5}
    3. "the input is always set to 11" h(3)=1h(-3)=\underline{1}
    4. "the input is multiplied by 2-2, the result increased by 22, and the result of this subtracted by the input squared" k(3)=2(3)+2(3)2=1k(-3)=-2\cdot (-3)+2-(-3)^2=\underline{-1}
    5. "the input increased by 11, and then the input is divided by this result. Then this result is increased by 11" l(3)=33+1+1=2.5l(-3)=\frac{-3}{-3+1}+1=\underline{2.5}
  3. There are two outputs for the same input, f(4)=±4=±2f(4)=\pm \sqrt{4}=\pm 2. So this is not a function. f(x)=xf(x)=\sqrt{x}, however, is a function because the root is always positive.

  4. Find xx with

    1. f(x)=3x1=0x=13f(x)=3x-1=0 \rightarrow x=\underline{\frac{1}{3}}

      g(x)=x2=36x=±6g(x)=x^2=36 \rightarrow x=\underline{\pm 6}

      h(x)=x(x1)=0x1=0h(x)=x(x-1)=0\rightarrow x_1=\underline{0} and x2=1x_2=\underline{1}

    2. i(x)=4x+2=14x=3x=34i(x)=4x+2=-1 \rightarrow 4x=-3\rightarrow x=\frac{-3}{4}

    3. j(x)=3j(x)=3 for all xx \rightarrow xx can be any real number.

    4. k(x)=1x=0k(x)=\frac{1}{x}=0 \rightarrow there is no such xx.

  5. It is

    1. Df=Rf=RD_f=R_f=\mathbb{R}
    2. Dg=RD_g=\mathbb{R}, Rg={3}R_g=\{-3\}
    3. Dh=Rh=RD_h=R_h=\mathbb{R}