doPhysics.in
All chapters
Functions and Graphs · Lesson 1 of 6

A Function and Its Graph

13 min read2 ideas6 checksBy Asheshanand Acharya
What you will learn 0 / 2
A function and its graph
Look around
Ask the ball two questions

A student in a school corridor throws a tennis ball straight up at \(20\,\text{m/s}\) and catches it again. Ask the first question: where is the ball one second after the throw? There is one answer, \(15\,\text{m}\) above the hand. Now ask the reverse question: when is the ball \(15\,\text{m}\) above the hand? This time there are two answers, one on the way up and one on the way down.

you will say which question has one answer and why. You will also know which quantity goes on which axis of any graph.

A rule with one answer

A function is a rule that takes an input and returns exactly one output. The height of the ball is such a rule. With upward positive and \(g = 10\,\text{m/s}^2\), the height after a time \(t\) is \(h(t) = 20t - 5t^2\) metres. Put in \(t = 1\,\text{s}\) and the rule returns \(15\,\text{m}\). Put in \(t = 2\,\text{s}\) and it returns \(20\,\text{m}\).

The ball cannot be in two places at one instant. So every time gives exactly one height, and the height is a function of the time. We write \(h = f(t)\), or simply \(h(t)\). The letter \(f\) names the rule, and \(f(t)\) is its output for the input \(t\).

definition 7.1
Function, independent and dependent variable

A function \(f\) is a rule that gives exactly one output \(f(x)\) for each allowed input \(x\). The input is the independent variable and the output is the dependent variable. The set of inputs the rule allows is the domain of the function.

RememberA function and its value
\[ y = f(x) \]
Holds whenfor every input \(x\) in the domain of \(f\), the rule gives exactly one value of \(y\).
Symbols\(x\) the input, the independent variable; \(y\) the output, the dependent variable; \(f\) the rule that turns \(x\) into \(y\)
Units\(y\) carries its own unit and \(x\) carries its own unit; the rule joins the two

The reverse question has two answers

Now reverse the question and ask when the ball is at \(15\,\text{m}\). Put \(20t - 5t^2 = 15\). Divide by \(5\) to get \(t^2 - 4t + 3 = 0\), which is \((t - 1)(t - 3) = 0\). So the ball is at \(15\,\text{m}\) at \(t = 1\,\text{s}\) and again at \(t = 3\,\text{s}\). One height gives two times, so the time is not a function of the height.

One time, one height; one height, two timesThe height h = 20t - 5t squared of a ball thrown straight up at 20 metres per second, against time from 0 to 4 seconds: a dome with its top at 20 metres at 2 seconds. A slider sets the time t. A dashed vertical line from t meets the curve at one point P, so each time gives one height. A dashed horizontal line through that height meets the curve at P and again at Q, at the time 4 - t, so each height except the top comes at two times. At t = 1 second the height is 15 metres, and 15 metres is reached at 1 second and at 3 seconds.12345101520Ot (s)h (m) Q P t = 1.0 s, one height: h = 15.0 m h = 15.0 m, at t = 1.0 s and 3.0 s
SimThe height of a ball thrown up at \(20\,\text{m/s}\), \(h = 20t - 5t^2\). Move the slider for the time \(t\). The dashed vertical line from \(t\) meets the curve once, at P: one time gives one height. The dashed horizontal line through that height meets the curve again at Q, at the time \(4 - t\). Only the top, at \(t = 2\,\text{s}\), is reached once.

The slider shows a test that works on any graph. Draw a vertical line anywhere across the graph. If every such line meets the graph at most once, the graph is a function of the horizontal variable. A circle fails this test. The line \(x = 3\) meets the circle \(x^2 + y^2 = 25\) at \(y = 4\) and at \(y = -4\).

Which quantity goes on which axis

The independent variable goes along the horizontal axis and the dependent variable along the vertical axis. In a motion, time is almost always the independent variable. In an experiment, the quantity you choose or set is the independent one, and the quantity you measure is the dependent one. The phrase "\(y\) against \(x\)" puts \(y\) on the vertical axis and \(x\) on the horizontal axis.

Here is an example from the photoelectric effect. A student chooses the frequency \(\nu\) of the light with a filter, and then measures the stopping potential \(V_0\). The frequency is set, so it goes along the horizontal axis. The stopping potential is measured, so it goes along the vertical axis. The graph is "\(V_0\) against \(\nu\)".

The domain: where the rule applies

A rule may give numbers where the physics does not apply. The ball leaves the hand at \(t = 0\) and returns to it at \(t = 4\,\text{s}\). So the domain of \(h(t)\) is \(0 \le t \le 4\,\text{s}\). Put \(t = 5\,\text{s}\) into the formula and it returns \(-25\,\text{m}\), a height below the hand. The ball was caught a second earlier, so that number describes nothing.

A domain can also come from the mathematics. The force \(F = k/r^2\) has no value at \(r = 0\), because division by zero is not defined. The period \(T = 2\pi\sqrt{L/g}\) needs \(L \ge 0\), because a negative number has no real square root. A length, a mass and an absolute temperature are never negative.

Common mistake

A formula does not know its own domain. The height formula gives \(-25\,\text{m}\) at \(t = 5\,\text{s}\), and a quadratic can give a negative time. Always ask over which inputs the physics holds. A negative time, a negative length or a height below the floor is a sign that the input has left the domain.

CheckpointUnanswered

In a laboratory, a student sets the current \(I\) through a wire with a rheostat and reads the voltage \(V\) across it. Which is the independent variable, and where does it go on the graph?

CheckpointUnanswered

Which of these does not give \(y\) as a function of \(x\)?

Checkpoint · numericUnanswered

The ball has \(h(t) = 20t - 5t^2\) metres. At \(t = 0.5\,\text{s}\) its height is \(8.75\,\text{m}\). At what later time, in seconds, is the ball again at \(8.75\,\text{m}\)?

s± 2 %
Moving a graph without changing its shape

Moving a graph without changing its shape

Take any function \(f(x)\) and a number \(a\). The new function \(f(x - a)\) has, at the point \(x\), the value that \(f\) had at the point \(x - a\). That point lies a distance \(a\) to the left. So every feature of the old graph appears a distance \(a\) to the right. A peak at \(x = 0\) moves to \(x = a\).

The minus sign inside the bracket moves the graph to the right, and this surprises many students. A plus sign, as in \(f(x + a)\), moves it to the left. A number added outside, as in \(f(x) + c\), is simpler. It raises every point by \(c\), so the graph moves up.

Moving a graph without changing its shapeA bump f(x) = 2 e to the minus x squared, with its peak of height 2 at x = 0, is drawn dashed on axes from x = -4 to 6. The solid curve is f(x - a) + c. Two sliders set the shift a inside the bracket and the shift c outside it. The peak of the solid curve sits at x = a and height 2 + c, and the curve keeps its shape. With a = 2 and c = 0 the solid bump is the dashed bump moved 2 to the right.123456−1−2−3−4123−1Oxy f(x) peak at x = 2.0, height 2.0
SimThe dashed bump is \(f(x)\), with its peak of height \(2\) at \(x = 0\). The solid curve is \(f(x - a) + c\). Move the slider for \(a\): the bump moves right for a positive \(a\) and left for a negative \(a\). Move the slider for \(c\): the bump moves up or down. Its shape never changes.

Back to physics: a pulse on a string

A pulse on a stretched string keeps its shape as it travels. Let its shape at \(t = 0\) be \(y = f(x)\). If it travels in the positive \(x\) direction at speed \(v\), then after a time \(t\) it has moved a distance \(vt\). So its shape at time \(t\) is the old shape moved right by \(vt\). That is \(y(x, t) = f(x - vt)\).

ExampleThis is the worked example of Introduction to Waves, lesson 3, done with the tool

A pulse travels in the positive \(x\) direction with speed \(v = 10\,\text{m/s}\). Its shape at \(t = 0\) is \(y(x, 0) = f(x) = \sin x\). Which function gives the shape of the pulse at \(t = 2\,\text{s}\)?

Try it on paper first. The solution is one tap away when you are ready.
CheckpointUnanswered

How does the graph of \(y = f(x + 3)\) compare with the graph of \(y = f(x)\)?

Checkpoint · numericUnanswered

A pulse on a rope is \(y = \dfrac{0.004}{1 + (x - 5t)^2}\), with \(x\) and \(y\) in metres and \(t\) in seconds. Where is its peak at \(t = 3\,\text{s}\), in metres?

m± 2 %
CheckpointUnanswered

A pulse has the shape \(f(x)\) at \(t = 0\) and travels in the negative \(x\) direction at \(4\,\text{m/s}\). What is its shape at time \(t\)?

In the world
Where this tool works in physics

Every graph in this book is the graph of a function. The chapter Graphical Understanding of Motion reads the position, the velocity and the acceleration as functions of time. The chapter Introduction to Waves writes a pulse as a function of position, \(y = f(x)\), and a travelling pulse as \(f(x - vt)\). A pulse reflected at a fixed end is the same function turned upside down. The photoelectric experiment plots the stopping potential as a function of the chosen frequency.

Exam traps
  1. Reading \(f(x - 2)\) as a graph moved to the left.
    A minus sign inside the bracket moves the graph right. The new graph reaches at \(x = 2\) the value that \(f\) had at \(0\).
  2. Putting the measured quantity along the horizontal axis.
    The chosen quantity, or the time, goes across. The measured quantity depends on it and goes up.
  3. Using a formula outside its domain.
    Ask where the physics holds, from the throw to the catch, for positive lengths, away from \(r = 0\). A negative time or length is a warning.

Where this tool works in the book

The physics that leans on this lesson. Each card opens the topic where the tool is at work.