G. Graphing Functions: 1. Right-Left Translation
G. Graphing Functions: 1. Right-Left Translation
G. Graphing Functions: 1. Right-Left Translation
GRAPHING FUNCTIONS
To get a quick insight int o how the graph of a function looks, it is very helpful to know
how certain simple operations on the graph are related to the way the function expression
looks. We consider these here.
1. Right-left translation.
Let c > 0. Start with the graph of some function f (x). Keep the x-axis and y-axis fixed,
but move the graph c units to the right, or c units to the left. (See the pictures below.) You
get the graphs of two new functions:
right
f (x c)
(1) Moving the f (x) graph c units to the
gives the graph of
.
left
f (x + c)
If f (x) is given by a formula in x, then f (x c) is the function obtained by replacing x by
x c wherever it occurs in the formula. For instance,
f (x) = x2 + x f (x 1) = (x 1)2 + (x 1) = x2 x, by algebra.
Example 1. Sketch the graph of f (x) = x2 2x + 1.
x2
(x 1)
To see the reason for the rule (1), suppose the graph of f (x) is moved c units to the right:
it becomes then the graph of a new function g(x), whose relation to f (x) is described by
(see the picture):
value of g(x) at x0
value of f (x) at x0 c
f (x0 c) .
f(x)
h(x)
xo c
g(x)
xo
The effect of up-down translation of the graph is much simpler to see. If c > 0,
up
f (x) + c
(2)
Moving the f (x) graph c units
gives the graph of
.
down
f (x) c
since for example moving the graph up by c units has the effect of adding c units to each
function value, and therefore gives us the graph of the function f (x) + c
Example 2. Sketch the graph of 1 +
x 1.
x, then
Solution Combine rules (1) and (2). First sketch
1+ x 1
1
1
x2 + 4x + 1 = (x2 + 4x + 4) 3 = (x + 2)2 3 ,
so we move the graph of x2 to the left 2 units, then 3 units down,
getting the graph shown.
Stretching
Shrinking
f (x/c)
f (cx)
f( x c)
f( x )
x0 c
x0
If the y-axis is stretched by the factor c > 1, each y-value is multiplied by c, so the new
graph is that of the function cf (x):
(4)
Stretching
Shrinking
c f (x)
f (x)/c
1
.
2x 1
1/2
f( x )
f (- x)
- x0
x0
Similarly, reflecting the xy-plane in the x-axis carries (x, y) to the point (x, y) and the
graph of f (x) gets carried into that of f (x).
Finally, relecting first in the y-axis and then in the x-axis carries the
point (x, y) into the point (x, y). This is called a reflection through
the origin. The graph of f (x) gets carried into the graph of f (x), by
combining the above two results. Summarizing:
f(x)
-f(-x)
G. GRAPHING FUNCTIONS
(5)
y-axis
Reflecting in the
x-axis
origin
f (x)
moves the graph of f (x) into that of
f (x)
f (x).
Of importance are those functions f (x) whose graphs are symmetric with respect to the
y-axis that is, reflection in the y-axis doesnt change the graph; such functions are called
even. Functions whose graphs are symmetric with respect to the origin are called odd. In
terms of their expression in x,
(6)
f (x) = f (x)
(7)
f (x) = f (x)
Example 5. Show that a polynomial with only even powers, like x4 2x2 + 7, is an
even function, and a polynomial with only odd powers, like 3x5 x3 + 2x, is an odd function
this, by the way, explains the terminology even and odd used for functions.
Solution. We have to show (6) and (7) hold for polynomials with respectively only even
or odd powers, but this follows immediately from the fact that for any non-negative integer
n, we have
n
x ,
if n is even,
(x)n = (1)n xn =
xn , if n is odd.
The following easily proved rules predict the odd- or even-ness of the product or quotient
of two odd or even functions:
(8)
(9)
even/even = even
Example 6.
x3
1 x2
odd/odd = even
odd/even = odd
cos(x) = cos x
(even function)
1
x
/2 - x
sin x
1
cos x
cos(- x)
x
-x
(11)
-x
sin (- x)
cos x
sin x
tan x =
Periodicity
An important property of the trigonometric functions is that they repeat their values:
(13)
sin(x + 2) = sin x,
cos(x + 2) = cos x .
f (x + c) = f (x)
c
By rule (1), the graph of a periodic function having period c coincides with itself when it is
translated c units to the left. If we replace x by x c in (14), we see that the graph will also
coincide with itself if it is moved to the right by c units. But beware: if a function is made
by combining other periodic functions, you cannot always predict the period. For example,
although it is true that
tan(x + 2) = tan x
and
cos2 (x + 2) = cos2 x ,
the period of both tan x and cos2 x is actually , as the above figure suggests for tan x.
The general sinusoidal wave.
The graph of sin x is referred to as a pure wave or a sinusoidal oscillation. We now
consider to what extent we can change how it looks by applying the geometric operations
of translation and scale change discussed earlier.
a) Start with sin x, which has period 2 and oscillates between 1.
b) Stretch the y axis by the factor A > 0; by (4) this gives A sin x, which has period 2
and oscillates between A.
c) Shrink the x-axis by the factor k > 0; by (3), this gives A sin kx, which has period
2/k, since
2
) = A sin(kx + 2) = A sin kx.
A sin k(x +
k
d) Move the graph units to the right; by (1), this gives
G. GRAPHING FUNCTIONS
(15)
A sin k(x ) ,
which has
period 2/k
angular frequency k
amplitude A
phase angle
A, k > 0, 0,
/k
-A
Notice that the function (15) depends on three constants: k, A, and . We call such
constants parameters; their value determines the shape and position of the wave.
By using trigonometric identities, it is possible to write (15) in another form, which also
has three parameters:
(16)
a sin kx + b cos kx
a = A cos k,
b = A sin k;
A=
p
a2 + b 2 ,
tan k =
b
.
a
b) 2 cos(2x /2)
Solution.
a) Writing the function in the form (15), we get 2 sin 3(x /18), which shows it has
period 2/3, frequency 3, amplitude 2, and phase angle /18 (or 10o ).
b) We get rid of the sign by using cos x = cos(x ) translating the cosine
curve units to the right is the same as reflecting it in the x-axis (this is the best way to
remember such relations). We get then
2 cos(2x /2) = 2 cos(2x /2 )
= 2 sin(2x ),
by (11);
Thus the period is , the frequency 2, the amplitude 2, and the phase angle /2. (Note
that the first three could have been read off immediately without making the above transformation.)
Example 8. Sketch the curve sin 2x + cos 2x .
Solution Transforming it into the form (15), we can get A and by using (19):
A=
2;
tan 2 = 1
2 = 135o = 3/4,
= 3/8 .
This reflection can be carried out by flipping the plane over about the
diagonal line. Each point of the diagonal stays fixed; the x-and y-axes are
interchanged. The points (a, b) and (b, a) are interchanged, as the picture
shows, because the two rectangles are interchanged.
a,b)
To see the effect of this on the function, lets consider first a simple example.
Example 9. If the graph of f (x) = x2 ,
function corresponds to the reflected graph?
x0.
Reflection corresponds to interchanging the two axes; thus the reflected curve is the graph
of the equation: x = y 2 , y 0 .
To find the corresponding function, we haveto express y explicitly in terms of x, which
we do by solving the equation for y:
y = x, x 0 ; the restriction on x follows
because if x = y 2 and y 0, then x 0 also.
y
y
reflect
no change
y=x,2 x>0
x=y 2, y>0
y= x, x>0
Remarks.
1. When we flip the curve about the diagonal line, we do not interchange the labels
on the x- and y-axes. The coordinate axes remain the same it is only the curve that
is moved (imagine it drawn on an overhead-projector transparency, and the transparency
flipped over). This is analogous to our discussion in section 1 of translation, where the curve
was moved to the right, but the coordinate axes themselves remained unchanged.
2. It was necessary in the previous example to restrict the domain of x in the original
function x2 , so that after being flipped, its graph was still the graph of a function. If we
G. GRAPHING FUNCTIONS
hadnt, the flipped curve would have been a parabola lying on its side; this is not the graph
of a function, since it has two y-values over each x-value.
The function having the reflected graph, y = x, x 0 is called the inverse function to the original function y = x2 , x 0. The general procedure may be represented
schematically by:
y = f (x)
x = f (y)
y = g(x)
original graph
switch x and y
reflected graph
solve for y
reflected graph
In this scheme, the equations x = f (y) and y = g(x) have the same graph; all that has been
done is to transform the equation algebraically, so that y appears as an explicit function
of x. This function g(x) is called the inverse function to f (x) over the given interval; in
general it will be necessary to restrict the domain of f (x) to an interval, so that the reflected
graph will be the graph of a function.
To summarize: f (x) and g(x) are inverse functions if
(i) geometrically, the graphs of f (x) and g(x) are reflections of each other in the diagonal
line y = x;
(ii) analytically, x = f (y) and y = g(x) are equivalent equations, either arising from the
other by solving explicitly for the relevant variable.
1
, x>1.
x1
Solution. We introduce a dependent variable y, then interchange x and y, getting
x =
1
,
y1
y>1.
y = 1+
1
,
x
1/(x-1)
x>0.
(The domain is restricted because if y > 1, then equation (20) implies that
x > 0.) The right side of (20) is the desired inverse function. The graphs
are sketched.
1+1/x
1
1
x = f (y)
cannot be solved explicitly in terms of previously known functions. In that case, the corresponding equation
(22)
y = g(x)
is viewed as defining the inverse function to f (x), when taken with (21). Once again, care
must be taken to restrict the domain of f (x) as necessary to ensure that the relected will
indeed define a function g(x), i.e., will not be multiple-valued. A typical example is the
following.
y = sin x,
/2 x /2.
The inverse function is then denoted sin1 x, or sometimes Arcsin x; it is defined by the
pair of equivalent equations
(24)
x = sin y,
/2 x /2
y = sin1 x,
1 x 1.
The domain [1, 1] of sin1 x is evident from the picture it is the same as the range of
sin x over [/2, /2].
As examples of its values, sin1 = /2, since sin /2 = 1; similarly, sin1 1/2 = /6.
Care is needed in handling this function. For example, substituting the left equation in
(24) into the right equation says that
(25)
sin1 (sin y) = y,
/2 y /2 .
It is common to see the restriction on y carelessly omitted, since the equation by itself seems
obvious. But without the restriction, it is not even true; for example if y = ,
sin1 (sin ) = 0.
/2
-1
1
y=sin-1 x
/2
Exercises: Section 1A