Shifting of graph of function $y = f(x)$ to $y = f(x - c)$

288 Views Asked by At

I am trying to understand if we have $y = f(x)$, then consider the function $g(x) = f(x - c)$ translate $y = f(x)$ to the right by c. I understand that if we put $x = c + j$, then we have $f(j) = g(c + j)$, so everything is shifted to the right by c. When I saw this initially it seemed to me that $g(x)$ shifts to the left instead of the right. Why are we getting this difference in x-axis and y-axis shifts? For instance, if we set $h(x) = f(x) - c$ we shift $h(x)$ downards?

4

There are 4 best solutions below

1
On BEST ANSWER

When we put $x-c$ rather than $x$ inside the function we need $x$ to be higher to get the same result.

When we write $y=f(x)-c$ we have $f(x)=y+c$ and we need $y$ to be lower to get the same result.

I used the second formulation for the second example to be consistent, so that the shift $c$ appeared in the same part of the equation as the variable $y$ which is shifted.

0
On

The relation between changes in the variables $x$ and $y$ is best illustrated by example using equations in $x$ and $y$. Then the matter can be further abstracted by using function notation.

EXAMPLE: Consider the graphs of $y=\sqrt{x}, y=\sqrt{x-1}, y=\sqrt{x+2},y-3=\sqrt{x}, y+4=\sqrt{x}$.

graphs of the four functions

Notice how replacing the $x$ in the equation $y=\sqrt{x}$ with $x-1$ results in a graph shifted one unit to the right, not one unit to the left as one might expect. Likewise, replacing $y$ with $y-3$ in the equation $$y=\sqrt{x}$ shifts the graph up rather than down, as one might expect. That shift can be made to make more sense if we rewrite $y-3=\sqrt{x}$ in the form $y=\sqrt{x}+2$, as is usually done.

Furthermore we see that replacing $x$ in the equation $y=\sqrt{x}$ with $x+2$ shifts the graph left rather than right and replacing $y$ with $y+4$ shifts the graph down rather than up.

Now if you replace the $\sqrt{\,}\,$ function with some other $f(\,)\,$ function, you can see how the variable replacement works in other situations.

0
On

We have the function $f(x)$. Shifting $f$ such that $(0, f(0))$ goes to $(h, f(h))$ means that we shifted $f$ from $x = 0$ to $x = h$. This means that the shifted function will have a new variable $x' = x + h$. Then,

\begin{align*} x' &= x + h \\ x' - h &= x \\\\ f(x') &= f(x + h) \\ f(x' - h) &= f(x) \end{align*}

This means that for a function to be shifted from $x = 0$ to $x = h$, we need to subtract $h$ from $x$.


For vertical shifts, we'll use a similar solution but another function $g(x)$ such that $y = g(x)$. Shifting $g$ such that $(0, g(0))$ goes to $(0, g(0) + k)$ means that the shifted function $y' = g(x')$ is $y + k$. Clearly, $x' = x$ as we didn't shift horizontally. But for the sake of clarity, we'll use $g(x')$ to represent the vertically shifted $g(x)$. Now,

\begin{align*} y' &= y + k \\ g(x') &= g(x) + k \\ \end{align*}

This means that for a function to be shifted from $y = 0$ to $y = k$, we need to add $k$ to $y$.

0
On
  1. Given the graph of $y=f(x),$ perhaps think of the output modifications $$y=af(x)\\y=f(x)+b$$ as (vertical) transformations of the curve, whereas the input modifications $$y=f(ax)\\y=f(x+b)$$ as (horizontal) transformations of the coordinate axes.

    This is just so that we can continue to naturally think of addition as a shift in the positive (rather than negative) direction, and multiplication by a number greater than $1$ as an enlargement (rather than a reduction).

  2. So, to transform the graph of $y=f(x)$ to that of $y=f(3x-21),$ noting that $$f((3x)-21)\equiv f(3(x-7)),$$ we can either

    • translate the $x$-axis $21$ units leftward then scale it by a factor of $3$

    or

    • scale the $x$-axis by a factor of $3$ then translate it $7$ units leftward.