Back to homeMathematics · 5th Year HL · Change subject
Start for free
5th Year HL · Mathematics
Functions, Induction and Further Trigonometry · Functions and their graphs

Quadratic, cubic, exponential and logarithmic graphs

A video goes online and doubles its number of views every hour. After 1 hour it has 2 views, after 2 hours 4, after 3 hours 8. A straight line adds the same amount each time, so it can't describe this. What shape does it make, and how do we sketch it? By the end of this page you will be able to sketch four families of graphs and read the key facts off each one.

Quadratic graphs and completing the square

Every quadratic $f(x) = ax^2 + bx + c$ has a parabola as its graph. The sign of $a$ tells you the direction: $a > 0$ gives a ∪-shape with a minimum, and $a < 0$ gives a ∩-shape with a maximum.

The most useful form for sketching is the completed-square form:

$$f(x) = a(x - p)^2 + q$$

Why? A square is never negative, so $(x-p)^2 \ge 0$ and is $0$ only when $x = p$. That makes $x = p$ the line of symmetry, and the turning point is $(p, q)$.

Try the sliders. Watch what $a$, $p$ and $q$ each do to the parabola.

When the coefficient of $x^2$ is not $1$, take it out of the $x^2$ and $x$ terms first: $-2x^2 + 8x + 1 = -2(x^2 - 4x) + 1$. Then complete the square inside the bracket and multiply the leftover by $-2$ before you simplify.

Practice★☆☆Not started
Write $f(x) = x^2 - 8x + 11$ in the form $(x-p)^2 + q$ and state the coordinates of its turning point.

Write $f(x) = x^2 - 8x + 11$ in the form $(x-p)^2 + q$ and state the coordinates of its turning point.

Solve
Practice★★☆Not started
Let $f(x) = -2x^2 + 8x + 1$. a) Write $f(x)$ in the form $a(x-p)^2 + q$. b) State the turning point and whether it is a maximum or minimum. c) Find the exact roots of…

Let $f(x) = -2x^2 + 8x + 1$.

  1. a) Write $f(x)$ in the form $a(x-p)^2 + q$.
  2. b) State the turning point and whether it is a maximum or minimum.
  3. c) Find the exact roots of $f(x) = 0$ using your completed-square form.
Solve

Cubic graphs

A cubic $f(x) = ax^3 + bx^2 + cx + d$ can have up to three roots. The method for sketching it:

  1. Find a root using the Factor Theorem: try integer factors of the constant term until $f(a) = 0$.

  2. Divide by $(x - a)$ to get a quadratic, then factorise it.

  3. Roots give the $x$-intercepts. $f(0) = d$ gives the $y$-intercept.

  4. Use the sign of $a$ for the end behaviour.

For large $|x|$ the $ax^3$ term dominates. If $a > 0$, then $f(x) \to +\infty$ as $x \to +\infty$ and $f(x) \to -\infty$ as $x \to -\infty$ (rising from bottom left to top right). If $a < 0$ it is the opposite.

See how the roots and the shape link together:

Practice★★☆Not started
Let $f(x) = x^3 - 3x^2 - 4x + 12$. a) Show that $x = 2$ is a root and factorise $f(x)$ fully. b) State the points where the graph crosses the axes. c) Describe the end…

Let $f(x) = x^3 - 3x^2 - 4x + 12$.

  1. a) Show that $x = 2$ is a root and factorise $f(x)$ fully.
  2. b) State the points where the graph crosses the axes.
  3. c) Describe the end behaviour as $x\to\pm\infty$ and sketch the graph, indicating its key points.
Solve

Exponential graphs

Back to the video that doubles its views every hour. Starting with 1 view, after $t$ hours there are $2^t$ views. That is an exponential function $f(x) = a^x$ with $a > 0$ and $a \ne 1$.

$x$ $-2$ $-1$ $0$ $1$ $2$ $3$
$2^x$ $\tfrac14$ $\tfrac12$ $1$ $2$ $4$ $8$

Each step to the right multiplies the value by $2$. That is the opposite of a straight line, which adds the same amount each step.

Key facts for $y = a^x$:

  • It passes through $(0, 1)$, since $a^0 = 1$.

  • It is always positive. The $x$-axis ($y = 0$) is a horizontal asymptote: the graph gets as close as you like but never touches it.

  • If $a > 1$ the graph rises (exponential growth). If $0 < a < 1$ it falls (exponential decay).

  • The graph is a reflection in the $y$-axis when you swap $a$ for $\tfrac1a$: $\left(\tfrac12\right)^x = 2^{-x}$.

Transformations. Replacing $x$ by $\tfrac{x}{k}$ stretches the graph horizontally by factor $k$. For example, $N(t) = 500 \cdot 2^{t/3}$ is the graph of $2^t$ stretched horizontally by factor $3$ (it takes $3$ hours to double instead of $1$) and vertically by factor $500$ (it starts at $500$).

Practice★☆☆Not started
For $f(x) = 2^x$: a) Complete a table of values for $x = -2, -1, 0, 1, 2, 3$. b) State the equation of the horizontal asymptote. c) State the coordinates of the point…

For $f(x) = 2^x$:

  1. a) Complete a table of values for $x = -2, -1, 0, 1, 2, 3$.
  2. b) State the equation of the horizontal asymptote.
  3. c) State the coordinates of the point where the graph crosses the $y$-axis.
Solve
Practice★★☆Not started
The number of bacteria in a sample at a lab in Maynooth is modelled by $N(t) = 500 \cdot 2^{t/3}$, where $t$ is the time in hours. a) Find $N(0)$ and $N(6)$. b) Find the…

The number of bacteria in a sample at a lab in Maynooth is modelled by $N(t) = 500 \cdot 2^{t/3}$, where $t$ is the time in hours.

  1. a) Find $N(0)$ and $N(6)$.
  2. b) Find the time at which the population reaches 8,000.
  3. c) Describe how the graph of $N$ relates to that of $y = 2^t$.
Solve

Logarithmic graphs

The question "$2^x = 8$, what is $x$?" is answered by a logarithm: $x = \log_2 8 = 3$. In general,

$$y = \log_a x \iff a^y = x$$

So $g(x) = \log_a x$ undoes $f(x) = a^x$. They are inverse functions. To find the inverse, swap $x$ and $y$ and solve for $y$. The graph of an inverse is the reflection of the original in the line $y = x$.

Graphs of y = 2 to the power x and y = log base 2 of x, reflections of each other in the line y = x y = 2ˣ y = x y = log₂ x (1, 0) (0, 1)

Reading the reflection:

$y = a^x$ $y = \log_a x$
Domain all real $x$ $x > 0$
Range $y > 0$ all real $y$
Asymptote horizontal, $y = 0$ vertical, $x = 0$
Key point $(0, 1)$ $(1, 0)$

You can only take a logarithm of a positive number, which is why the domain is $x > 0$. For $\ln x = \log_e x$ everything is the same with $a = e \approx 2.718$.

Practice★☆☆Not started
For $g(x) = \log_2 x$: a) Find $g(1)$, $g(2)$, $g(8)$ and $g\!\left(\tfrac14\right)$. b) State the domain of $g$ and the equation of its vertical asymptote. c) State the…

For $g(x) = \log_2 x$:

  1. a) Find $g(1)$, $g(2)$, $g(8)$ and $g\!\left(\tfrac14\right)$.
  2. b) State the domain of $g$ and the equation of its vertical asymptote.
  3. c) State the point where the graph crosses the $x$-axis.
Solve
Practice★★★Not started
Let $f(x) = \ln(x-1) + 2$. a) State the domain, the vertical asymptote and the $x$-intercept of $f$. b) Find $f^{-1}(x)$ and state its range. c) Describe the…

Let $f(x) = \ln(x-1) + 2$.

  1. a) State the domain, the vertical asymptote and the $x$-intercept of $f$.
  2. b) Find $f^{-1}(x)$ and state its range.
  3. c) Describe the transformations mapping $y = \ln x$ to $y = f(x)$, and hence sketch $f$ and $f^{-1}$ on the same axes, stating the point where $f^{-1}$ crosses the $y$-axis.
Solve

Solving $f(x) = g(x)$ from graphs

The solutions of $f(x) = g(x)$ are the $x$-coordinates of the points where the graphs of $f$ and $g$ cross. Two ways to find them:

  • Algebraically, when you can: set the expressions equal and solve.

  • By graph or numerically, when you can't: sketch both, see how many crossings there are, then use bisection to home in on a value.

To solve an inequality such as $f(x) < g(x)$, look for where the graph of $f$ is below the graph of $g$.

Practice★★★Not started
Let $f(x) = x^2 - 4x + 1$ and $g(x) = x - 3$. a) Solve $f(x) = g(x)$ and hence find the points of intersection of their graphs. b) Use the graphs to solve $f(x) < g(x)$.…

Let $f(x) = x^2 - 4x + 1$ and $g(x) = x - 3$.

  1. a) Solve $f(x) = g(x)$ and hence find the points of intersection of their graphs.
  2. b) Use the graphs to solve $f(x) < g(x)$.
  3. c) Find the value of $k$ for which the line $y = x + k$ is a tangent to the graph of $f$.
Solve
Practice★★★Not started
Let $f(x) = 2^x$ and $g(x) = 8 - x$. a) Show that the equation $f(x) = g(x)$ has a root between $x = 2$ and $x = 3$. b) Explain, using the shapes of the graphs, why…

Let $f(x) = 2^x$ and $g(x) = 8 - x$.

  1. a) Show that the equation $f(x) = g(x)$ has a root between $x = 2$ and $x = 3$.
  2. b) Explain, using the shapes of the graphs, why there is exactly one solution.
  3. c) Use two steps of bisection to give an estimate of the solution, and state the interval in which it lies.
Solve

Back to the start: a video that doubles every hour follows $2^t$, an exponential curve. It starts slowly, then climbs faster and faster, and it never goes below the $x$-axis.

Summary

  • Quadratic: write in the form $a(x-p)^2 + q$. The turning point is $(p, q)$, a minimum if $a > 0$ and a maximum if $a < 0$. Roots come from $(x-p)^2 = -q/a$.

  • Cubic: find an integer root with the Factor Theorem, factorise, then use the roots, the $y$-intercept $f(0)$ and the end behaviour (sign of the $x^3$ term).

  • Exponential $y = a^x$: passes through $(0, 1)$, has horizontal asymptote $y = 0$, grows if $a > 1$ and decays if $0 < a < 1$.

  • Logarithm $y = \log_a x$: the reflection of $a^x$ in $y = x$. It passes through $(1, 0)$, has vertical asymptote $x = 0$ and domain $x > 0$.

  • Solutions of $f(x) = g(x)$ are the $x$-coordinates of the crossing points. Use bisection (sign change) when algebra will not work, and the discriminant for tangency.

See all the exercises in this section