1. Introduction to Functions
In everyday life, many quantities depend on one or more changing variables. For example:
(a) Plant growth depends on sunlight and rainfall
(b) Speed depends on distance travelled and time taken
(c) Voltage depends on current and resistance
(d) Test marks depend on attitude, listening in lectures and doing tutorials (among many other variables!!)
A function is a rule that relates how one quantity depends on other quantities.
A particular electrical circuit has a power source and an 8 ohms (Ω) resistor. The voltage in that circult is given by:
V = 8I,
V = voltage (in volts, V)
I = current (in amperes, A)
So if I = 4 amperes, then the voltage is V = 8 × 4 = 32 volts.
If I increases, so does the voltage, V.
If I decreases, so does the voltage, V.
We say voltage is a function of current (when resistance is constant). We get only one value of V for each value of I.
A bicycle covers a distance in 20 seconds. The speed of the bicycle is given by
s = speed (in ms−1, or meters per second, m/s)
d = distance (in meters, m)
If the distance covered by the bike is 10 m, then the speed is `s = 0.05 × 10 = 0.5\ "m/s"`.
If d increases, the speed goes up.
If d decreases, the speed goes down.
We say speed is a function of distance (when time is constant). We get only one value of s for each value of d.
Definition of a Function
We have 2 quantities (called "variables") and we observe there is a relationship between them. If we find that for every value of the first variable there is only one value of the second variable, then we say:
"The second variable is a function of the first variable."
The first variable is the independent variable (usually written as x), and the second variable is the dependent variable (usually written as y).
The independent variable and the dependent variable are real numbers. (We'll learn about numbers which are not real later, in Complex Numbers.)
We know the equation for the area, A, of a circle from primary school:
A = πr2, where r is the radius of the circle
This is a function as each value of the independent variable r gives us one value of the dependent variable A.
We use x for the independent variable and y for the dependent variable for general cases. This is very common in math. Please realize these general quantities can represent millions of relationships between real quantities.
In the equation
`y = 3x + 1`,
y is a function of x, since for each value of x, there is only one value of y.
If we substitute `x = 5`, we get `y = 16` and no other value.
The values of y we get depend on the values chosen for x.
Therefore, x is the independent variable and y is the dependent variable.
The force F required to accelerate an object of mass 5 kg by an acceleration of a ms-2 is given by: `F = 5a`.
Here, F is a function of the acceleration, a.
The dependent variable is F and the independent variable is a.
We normally write functions as: `f(x)` and read this as "function f of x".
We can use other letters for functions, like g(x) or y(x).
When we are solving real problems, we use meaningful letters like
P(t) for power at time t,
F(t) for force at time t,
h(x) for height of an object, x horizontal units from a fixed point.
We often come across functions like: y = 2x2 + 5x + 3 in math.
We can write this using function notation:
y = f(x) = 2x2 + 5x + 3
Function notation is all about substitution.
The value of this function f(x) when `x = 0` is written as `f(0)`. We calculate its value by substituting as follows:
f(0) = 2(0)2 + 5(0) + 3 = 0 + 0 + 3 = 3
Function Notation: In General
In general, the value of any function f(x) when x = a is written as f(a).
If we have `f(x) = 4x + 10`, the value of `f(x)` for `x = 3` is written:
`f(3) = 4 × 3 + 10 = 22`
In other words, when `x = 3`, the value of the function f(x) is `22`.
Mathematics is often confusing because of the way it is written.
We write `5(10)` and it means `5 × 10= 50`.
But if we write `a(10)`, this could mean, depending on the situation,
"function a of `10`" (that is, the value of the function a when the independent variable is `10`)
Or it could mean multiplication, as in:
`a × 10 = 10a`.
You have to be careful with this.
Also, be careful when substituting letters or expressions into functions.
See a discussion on this: Towards more meaningful math notation.
This example involves some fixed constant, d.
If `h(x) = dx^3+ 5x` then value of `h(x)` for `x = 10` is:
`h(10) = d(10)^3+ 5(10)`
`= 1000d + 50`
We leave the d there because we don't know anything about its value.
This example involves the value of a function when the independent variable contains a constant.
If the height of an object at time t is given by
h(t) = 10t2 − 2t, then
a. The height at time `t = 4` is
h(4) = 10(4)2 − 2(4) = 10 ×16 − 8 = 152
b. The height at time t = b is
h(b) = 10b2 − 2b
c. The height at time `t = 3b` is
h(3b) = 10(3b)2 − 2(3b) = 10 × 9b2 − 6b = 90b2 − 6b
d. The height at time `t = b + 1` is
h(b + 1)
= 10(b + 1)2 − 2(b + 1)
= 10 × (b2 + 2b + 1) − 2b − 2
= 10b2 + 20b + 10 − 2b − 2
= 10b2 + 18b + 8
Evaluate the following functions:
(1) Given `f(x) = 3x + 20`, find
a. `f(-4)` b. `f(10)`
= 3(−4) + 20
= −12 + 20
= 3(10) + 20
= 30 + 20
(2) Given that the height of a particular object at time t is
h(t) = 50t − 4.9t2, find
a. `h(2)` b. `h(5)`
= 50(2) − 4.9(2)2
= 100 − 19.6
= 50(5) − 4.9(5)2
= 250 − 122.5
(3) The voltage, V, in a particular circuit is a function of time t, and is given by:
V(t) = 3t − 1.02t
Find the voltage at time
a. `t = 4` b. `t = c + 10`
= 3(4) − 1.024
= 12 − 1.08243216
b. V(c + 10)
= 3(c + 10) − 1.02c + 10
= 3c + 30 − 1.02c + 10
(4) If F(t) = 3t − t2 for t ≤ 2, find F(2) and F(3).
F(t) = 3t − t2
F(2) = 3(2) − (2)2
= 6 − 4
F(3) is not defined since `t ≤ 2`.