Mathematics A - Lecture 5 - Functions
Mathematics A - Lecture 5 - Functions
Objectives:
• Appreciate the practical importance of functions
• Learn how to plot linear, quadratic and cubic functions
1. Functions
Functions are crucial for analysing, understanding and predicting the real world. Functions
establish relations between variables or, more formally, quantify how a variable depends on
another variable. Consider the following notation:
𝑦𝑦 = 𝑓𝑓(𝑥𝑥)
This means that the function 𝒇𝒇 establishes how the dependent variable 𝒚𝒚 depends on the
independent variable 𝒙𝒙. Here are some examples of functions:
• 𝐶𝐶(𝑟𝑟) = 2𝜋𝜋𝜋𝜋 – a circle’s circumference is dependent on its radius
• 𝑥𝑥(𝑡𝑡) – when moving, a body’s position 𝑥𝑥 is a function of time 𝑡𝑡
• 𝐹𝐹(𝐶𝐶) = 1,8𝐶𝐶 + 32 – converts temperatures from Celsius to Fahrenheit
Functions can also depend on more than one independent variable:
• 𝑆𝑆ℎ𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎(ℎ𝑒𝑒𝑒𝑒𝑒𝑒ℎ𝑡𝑡, 𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡, 𝑑𝑑𝑑𝑑𝑑𝑑) – the length of a person’s shadow is dependent of their
height, the time of the day and the day of the year.
• 𝑇𝑇(𝑡𝑡, 𝑥𝑥, 𝑦𝑦, 𝑧𝑧) – the temperature 𝑇𝑇 at a point within a room depends on the temperature 𝑡𝑡
of a radiator, as well as the coordinates of the point 𝑥𝑥, 𝑦𝑦 and 𝑧𝑧.
• 𝑀𝑀(𝐹𝐹, 𝑑𝑑) = 𝐹𝐹 × 𝑑𝑑 – a moment on a point is a function of the magnitude of the force and
the distance between the force’s point of application and the reference point.
In mathematics, functions are named as follows:
1) Polynomial functions are of the type 𝑓𝑓(𝑥𝑥) = 𝑥𝑥 𝑛𝑛 :
a. For 𝑛𝑛 = 1, these are called linear functions: 𝑓𝑓(𝑥𝑥) = 𝑚𝑚𝑚𝑚 + 𝑏𝑏
b. For 𝑛𝑛 = 2, these are called quadratic functions: 𝑓𝑓(𝑥𝑥) = 𝑎𝑎𝑥𝑥 2 + 𝑏𝑏𝑏𝑏 + 𝑐𝑐
c. For 𝑛𝑛 = 3, these are called cubic functions: 𝑓𝑓(𝑥𝑥) = 𝑎𝑎𝑥𝑥 3 + 𝑏𝑏𝑥𝑥 2 + 𝑐𝑐𝑐𝑐 + 𝑑𝑑
2) Trigonometric functions are of the type 𝑓𝑓(𝑥𝑥) = 𝐴𝐴 sin 𝑤𝑤𝑤𝑤 𝑜𝑜𝑜𝑜 𝑓𝑓(𝑥𝑥) = 𝐴𝐴 cos 𝑤𝑤𝑤𝑤
3) Logarithmic functions are of the type 𝑓𝑓(𝑥𝑥) = log 𝑥𝑥 𝑜𝑜𝑜𝑜 𝑓𝑓(𝑥𝑥) = log 𝑎𝑎 𝑥𝑥
𝑥𝑥
4) Exponential functions are of the type 𝑓𝑓(𝑥𝑥) = 𝑎𝑎
5) And many more …
Consider the following functions: 𝑓𝑓(𝑥𝑥) = 4𝑥𝑥 + 5 𝑎𝑎𝑎𝑎𝑎𝑎 ℎ(𝑥𝑥) = 𝑥𝑥 2 + 𝑥𝑥 + 1
To establish 𝑓𝑓(2) and ℎ(−3), the variable 𝑥𝑥 needs to be set equal to the values in brackets:
𝑓𝑓(2) = 4 × 2 + 5 = 13 𝑎𝑎𝑎𝑎𝑎𝑎 ℎ(−3) = (−3)2 + (−3) + 1 = 7
Some functions can also depend on other functions. These are called composite functions.
Consider the following functions:
𝑓𝑓(𝑥𝑥) = 4𝑥𝑥 + 5
𝑔𝑔(𝑥𝑥) = 𝑥𝑥 + 2
ℎ(𝑥𝑥) = 𝑥𝑥 2 + 𝑥𝑥 + 1
𝑘𝑘(𝑥𝑥) = 3/(𝑥𝑥 + 1)
The composite functions 𝑓𝑓(𝑔𝑔(𝑥𝑥)), 𝑓𝑓(ℎ(𝑥𝑥)) and 𝑔𝑔(𝑘𝑘(𝑥𝑥)) are established as follows:
𝑓𝑓�𝑔𝑔(𝑥𝑥)� = 4(𝑥𝑥 + 2) + 5 = 4𝑥𝑥 + 13
𝑓𝑓�ℎ(𝑥𝑥)� = 4(𝑥𝑥 2 + 𝑥𝑥 + 1) + 5 = 4𝑥𝑥 2 + 4𝑥𝑥 + 9
3
𝑔𝑔�𝑘𝑘(𝑥𝑥)� = +2
𝑥𝑥 + 1
Ex. 1 – Considering the previous functions, establish:
a) 𝑔𝑔(𝑓𝑓(𝑥𝑥)) e) ℎ(𝑔𝑔(𝑥𝑥))
b) 𝑓𝑓�𝑘𝑘(𝑥𝑥)� f) ℎ�𝑘𝑘(𝑥𝑥)�
c) 𝑔𝑔�ℎ(𝑥𝑥)� g) 𝑓𝑓�𝑔𝑔(ℎ(𝑥𝑥))�
d) ℎ�𝑓𝑓(𝑥𝑥)� h) 𝑓𝑓(𝑔𝑔(ℎ(𝑘𝑘(𝑥𝑥))))
Ex. 3 – Determine, without plotting, the gradient and y-axis intercept for these function:
a) 𝑦𝑦 = 3 e) 𝑦𝑦 = −𝑥𝑥 + 1
b) 𝑦𝑦 = 2𝑥𝑥 i) 𝑦𝑦 = √2𝑥𝑥 − 1
c) 𝑦𝑦 = 5𝑥𝑥 − 1 j) 𝑦𝑦 = 𝜋𝜋𝜋𝜋 + 1/2
d) 3𝑥𝑥 − 3𝑦𝑦 = 5 k) 2𝑥𝑥 + 3𝑦𝑦 = 3
The zeros or roots of a linear function can be found by equating 𝑓𝑓(𝑥𝑥) = 0:
𝑓𝑓(𝑥𝑥) = 0 ⇔ 𝑚𝑚𝑚𝑚 + 𝑏𝑏 = 0 ⇔ 𝑥𝑥 = −𝑏𝑏/𝑚𝑚
In the previous example the only root is for 𝑥𝑥 = −5/2 = −2.5.
Two points are enough to define a linear function. The gradient of a line that passes through
two points 𝐴𝐴(𝑥𝑥𝐴𝐴 , 𝑦𝑦𝐴𝐴 ) and 𝐵𝐵(𝑥𝑥𝐵𝐵 , 𝑦𝑦𝐵𝐵 ) is calculated as follows:
Ex. 4 – Find the equation of a linear function and draw the graph of a function that
passes through the points:
Extra exercises
http://www.math-exercises.com/functions/linear-function
Some useful facts about linear functions:
• Parallel linear functions have the same gradient (same value of 𝑚𝑚)
• Lines parallel to the 𝑥𝑥-axis have equations of 𝑦𝑦 = 𝑘𝑘 and are called constant functions and
have a gradient 𝑚𝑚 = 0
• Lines parallel to the 𝑦𝑦-axis have equations of the form 𝑥𝑥 = 𝑘𝑘.
• If two lines are perpendicular to each other, the product of their gradients is equal to −1.
• Linear functions always have one root.
For example, consider how to plot the function 𝑓𝑓(𝑥𝑥) = 4𝑥𝑥 2 + 4𝑥𝑥 − 15. As with any other
function, the plot of a quadratic function requires several points that belong to that function to
be determined. Consider the following table:
These points can be easily plotted in an 𝑥𝑥 − 𝑦𝑦 plane and the curve can easily be drawn.
The zeros or roots of the function can be found using the quadratic formula:
𝑓𝑓(𝑥𝑥) = 4𝑥𝑥 2 + 4𝑥𝑥 − 15 = 0
−𝑏𝑏 ± √𝑏𝑏 2 − 4𝑎𝑎𝑎𝑎
𝑥𝑥 =
2𝑎𝑎
Check that the solutions are 𝑥𝑥 = −2.5 and 𝑥𝑥 = 1.5 as shown in the figure.
Quadratic functions have either zero, one or two roots. This is determined by the term with
square root in the quadratic formula:
𝑇𝑇𝑇𝑇𝑇𝑇 𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟 → 𝑖𝑖𝑖𝑖 𝑏𝑏 2 − 4𝑎𝑎𝑎𝑎 > 0 (𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝)
𝑂𝑂𝑂𝑂𝑂𝑂 𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟 → 𝑖𝑖𝑖𝑖 𝑏𝑏 2 − 4𝑎𝑎𝑎𝑎 = 0
𝑁𝑁𝑁𝑁 𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟 → 𝑖𝑖𝑖𝑖 𝑏𝑏 2 − 4𝑎𝑎𝑎𝑎 < 0 (𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛)
Ex.6 – Plotting the quadratic equation 𝒇𝒇(𝒙𝒙) = −𝟓𝟓𝒙𝒙𝟐𝟐 + 𝟗𝟗𝟗𝟗 + 𝟕𝟕. 𝟐𝟐, solve graphically for the
points where the quadratic function intersect with the 𝒙𝒙-axis. Confirm using quadratic
formula
Extra exercises
http://www.math-exercises.com/functions/quadratic-function
1.4. Cubic functions
Cubic functions are of the shape 𝑓𝑓(𝑥𝑥) = 𝑎𝑎𝑥𝑥 3 + 𝑏𝑏𝑥𝑥 2 + 𝑐𝑐𝑐𝑐 + 𝑑𝑑 where there is one independent
variable 𝑥𝑥 and four coefficients 𝑎𝑎, 𝑏𝑏, 𝑐𝑐 and 𝑑𝑑. By adding another term (in this case the cubic
term) the functions will have the potential to “turn” another time. Note that a quadratic function
always “turns” only once. A cubic function can “turn” a maximum of two times, as follows:
Consider the plot the function 𝑓𝑓(𝑥𝑥) = 4𝑥𝑥 3 − 8𝑥𝑥 2 − 15𝑥𝑥 + 9. As with any other function, the plot
of cubic function requires several points that belong to that function to be determined. Consider
the following table:
These points can be easily plotted in an 𝑥𝑥 − 𝑦𝑦 plane and the curve can easily be drawn.
Solving for the zeros or roots of a cubic function might not be straight forward. In this example,
when plotting the function, it is established that 𝑥𝑥 = 3 is a root of this function. Therefore, we
can divide the original cubic polynomial by (𝑥𝑥 − 3) as follows:
The remainder is zero, which confirms that 𝑥𝑥 = 3 is a root of the function. Now, the original
cubic polynomial can be written as:
𝑓𝑓(𝑥𝑥) = (𝑥𝑥 − 3)(4𝑥𝑥 2 + 4𝑥𝑥 − 3)
The other two roots can be found using the quadratic formula on the term 4𝑥𝑥 2 + 4𝑥𝑥 − 3:
Check that the solutions are 𝑥𝑥 = −1.5 and 𝑥𝑥 = 0.5 as estimated in the graph.
Ex.7 – Plot the graph of 𝒇𝒇(𝒙𝒙) = 𝟐𝟐𝒙𝒙𝟑𝟑 − 𝟕𝟕𝒙𝒙𝟐𝟐 + 𝟒𝟒𝟒𝟒 + 𝟒𝟒 for values of 𝒙𝒙 between 𝒙𝒙 = −𝟏𝟏 and
𝒙𝒙 = 𝟑𝟑. Hence determine the roots of the equation.