Functions - understand how to do them, including the hard ones
What is a function?
In primary school when maths was more pictures and colouring and less fear and anxiety, you may have come across something like this:
A function made fun. It adds 10 to any number that goes into it and outputs the result.
Now, sadly we don’t get the fun robot anymore, instead we get something that looks like this:
f(x) = x + 10
That is the maths way to write what’s happening in the picture above.
It means that whatever x is, add 10 to it. X is the input.
If we want to input 5 we can write:
f(5) = 5 + 10
f(5) = 15
So basically we replace x with 5 and then work it out.
Example 1: Evaluating a Function
Given the function:
f(x) = 2x + 5
Find:
- f(3)
- f(-2)
Solution:
Finding f(3):
Substituting x = 3 into the function:
f(3) = 2(3) + 5
= 6 + 5
= 11
So, f(3) = 11.
Finding f(-2):
Substituting x = -2 into the function:
f(-2) = 2(-2) + 5
= -4 + 5
= 1
So, f(-2) = 1.
Example 2: Evaluating a Quadratic Function
Given the function:
f(x) = x² - 3x + 2
Find:
- f(4)
- f(-1)
Solution:
Finding f(4):
Substituting x = 4 into the function:
f(4) = (4)² - 3(4) + 2
= 16 - 12 + 2
= 6
So, f(4) = 6.
Finding f(-1):
Substituting x = -1 into the function:
f(-1) = (-1)² - 3(-1) + 2
= 1 + 3 + 2
= 6
So, f(-1) = 6.
Here are some practice questions
GCSE Functions Quiz
Composite Functions:
Functions can also be combined.
You can put one function inside another.
Example: Composite Functions
Given the functions:
f(x) = 2x + 3 and g(x) = x^2 - 1,
Find f(g(x)) and g(f(x)).
Solution:
Finding f(g(x)):
f(g(x)) means we substitute g(x) into f(x):
f(g(x)) = f(x^2 - 1)
Since f(x) = 2x + 3, we replace x with x^2 - 1:
f(x^2 - 1) = 2(x^2 - 1) + 3
= 2x^2 - 2 + 3
= 2x^2 + 1
Finding g(f(x)):
g(f(x)) means we substitute f(x) into g(x):
g(f(x)) = g(2x + 3)
Since g(x) = x^2 - 1, we replace x with 2x + 3:
g(2x + 3) = (2x + 3)^2 - 1
Expanding the square:
= 4x^2 + 12x + 9 - 1
= 4x^2 + 12x + 8
Final Answers:
f(g(x)) = 2x^2 + 1
g(f(x)) = 4x^2 + 12x + 8
(more examples and explanations coming soon)