Understanding the graphical effect of f(x+a)

  • Thread starter Thread starter Aion96
  • Start date Start date
  • Tags Tags
    Shift
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
19 replies · 4K views
Aion96
Messages
8
Reaction score
4
Homework Statement
I'm trying to understand the transformation of a function when replacing x with x+a.
Relevant Equations
None
Solution attempt. I know that f(x+a) shifts the function f(x) by a units to the left for a>1, however, I find this counterintuitive because adding a to x feels like it should move the graph to the right rather than to the left. I understand the algebra, but I struggle with the intuition behind it.

Given a function f(x), we know that a point on its graph is (x,f(x)). Now, if we consider f(x+a), I want to determine the new corresponding points. My reasoning is:
  1. The point (x+a,f(x+a) lies on the graph of the original function f(x).
  2. The goal is to find the point (x,f(x+a)), and we notice that its obtained by moving the point (x+a,f(x+a) a units the left.
  3. To express the transformation using x instead of x+a, we rewrite the point as (x,f(x+a)).
This suggests that the graph of f(x+a) is obtained by shifting the graph of f(x) a units to the left. I believe my reasoning is correct, but I want to confirm:
  • Is my step-by-step logic sound?
  • Could someone provide an intuitive explanation or a different approach to understanding this shift?
 
Reply
  • Like
Likes   Reactions: hutchphd and OmCheeto
Physics news on Phys.org
Yes, you are right. The problem you are struggling with, and I often, too, is to distinguish between the movement of the object (the function graph) and the movement of the coordinate system, here the ##x##-axis. Moving the function to the left is the same as shifting the coordinate system to the right. Other than doing it on a table, we do not have an exterior coordinate system (the table) here to distinguish between both.
 
Reply
  • Like
Likes   Reactions: Aion96 and OmCheeto
Aion96 said:
Homework Statement: I'm trying to understand the transformation of a function when replacing x with x+a.
Relevant Equations: None

Solution attempt. I know that f(x+a) shifts the function f(x) by a units to the left for a>1, however, I find this counterintuitive because adding a to x feels like it should move the graph to the right rather than to the left. I understand the algebra, but I struggle with the intuition behind it.
Good question. Adding ##a## moves the value ##x+a## to the right, but not ##x## itself. The graph is based on ##x##, which can start farther to the left. Then its value is shifted to the right before evaluating ##f(x+a)##.
 
Last edited:
Reply
  • Like
Likes   Reactions: Aion96
Aion96 said:
I know that f(x+a) shifts the function f(x) by a units to the left for a>1
That would be for a > 0, not a > 1.
A more correct restatement of what you wrote is this: the graph of y = f(x + a), with a > 0, is shifted to the left by a units, relative to the graph of y = f(x).
 
Reply
  • Like
Likes   Reactions: neilparker62, Aion96 and FactChecker
Aion96 said:
Solution attempt. I know that f(x+a) shifts the function f(x) by a units to the left for a>1
You mean for ##a \ge 0##. There's nothing wrong with, for example, ##f(x + \frac 13)## which shifts the graph ##\frac 13## of a unit left. [Edit: aha, @Mark44 beat me to it!]

One thing I (a non-mathematician) found helpful when first meeting this - a rather long time ago -was to consider ##y = x## and ##y=x+1##. Sketching the two graphs immediately shows that replacing ##x## by ##x+1## shifts the first graph 1 unit left.

By considering the point where each of these graphs crosses the x-axis, it isn't too difficult see why this happens,

Of course ##y=x-1## produces a right shift by 1 unit.

I found it useful to memorise the directions of the shifts for ##f(x \pm a)##. This saves time in exams and reduces the risk of a mistake.

(FWIW, the first time I found this really useful was understanding the basic wave equation ##y(x,t) = A\sin(kx - \omega t)##. The shape is a simple sine curve ##y = A\sin(kx)## and this shape steadily moves right as the ##\omega t## term steadily increases, giving a moving sine curve. Apologies for sneaking some physics into a maths thread!)
 
Reply
  • Like
Likes   Reactions: Aion96 and OmCheeto
Steve4Physics said:
You mean for ##a \ge 0##.
If a = 0, there is no shift at all. That's why I didn't include 0.
Steve4Physics said:
FWIW, the first time I found this really useful was understanding the basic wave equation ##y(x,t) = A\sin(kx - \omega t)##. The shape is a simple sine curve ##y = A\sin(kx)## and this shape steadily moves right as the ##\omega t## term steadily increases, giving a moving sine curve. Apologies for sneaking some physics into a maths thread!)
The equation might have to do with wave equations in physics, but the underlying concepts are from mathematics.
The equation can be rewritten as ##y(x,t) = A\sin(k(x - \frac \omega k t))##. This represents two transformations: a compression of the graph toward the y axis by a factor of k (if k > 1), followed by a translation to the left by ##\frac \omega k## (if that fraction is positive). If 0 < k < 1, there is an expansion away from the y axis. Note that these transformations must be performed in the order I showed, or the resulting graph won't be correct.
 
Reply
  • Like
Likes   Reactions: neilparker62
Mark44 said:
If a = 0, there is no shift at all. That's why I didn't include 0.
Yes. I thought about that at the time. On reflection (no pun intended) I wish I had used ##a \gt 0##. I hadn't seen your post at the time.

Mark44 said:
The equation might have to do with wave equations in physics, but the underlying concepts are from mathematics.
Of course! I only pointed out the wave equation example because it brought back happy memories of something I realised/discovered for myself. And, in the post, I did explicitly apologise for sneaking-in some physics!
 
Aion96 said:
  • Could someone provide an intuitive explanation or a different approach to understanding this shift?
When you shift the graph ## G_1=\{(x,f(x))|x\in X\} ## to the left by ## a ## units you will get the graph ## G_2=\{(x-a,f(x))|x\in X\} ##. The graph ## G_2=\{(x-a,f(x))|x\in X\} ## is exactly the same as the graph ## \{(x,f(x+a))|(x+a)\in X\} ##.
 
Gavran said:
The graph ## G_2=\{(x-a,f(x))|x\in X\} ## is exactly the same as the graph ## \{(x,f(x+a))|(x+a)\in X\} ##.
The sets are identical, but the graphs are not. As sets, ##x## is a dummy variable that disappears. As a graph of ##x## versus ##f(x)##, ##x=0## sets the origin, and the origins of those two are not the same.
 
Reply
  • Skeptical
  • Like
Likes   Reactions: vela and SammyS
Not a rigorous post . But how i interpret ##g(x)=f(x+a)## is just setting the argument of ##f## to zero ,i.e, ##x+a=0## this means : ##x=-a## . So , whatever graph you have for ##f(x)## , you get the same value of ##f(0)## at ##x=-a##,i.e, ##g(-a)=f(-a+a)=f(0)## (##a>0##) . So , it is as good as shifting the graph of ##f## left by ##a## units . Similarly , you can try other values of ##f## to get a 'feel' . But i have just made a trick like this so that i don't waste time .

Let's say : ##f(x)=x## , then ##g(x)=f(x+3)=x+3## , So, ##g(0-3)=f(0)##

Your ##f(0)## value is shifted by ##3## units to the left for ##g## , so are all the other values . Hence , you can say ##g(x)## is the graph of ##f(x)## shifted by ##3## units to the left
 
Reply
  • Like
Likes   Reactions: FactChecker
Some will say it's arbitrary but I think the correct formula for a horizontal shift is ##f(x-a)## and not ##f(x+a)## in the first place. The former lines up with the op's intuition (mine too!) which is that a positive value of a will shift the graph to the right. I have old text books which write (for example) the equation of parabolas as ##f(x) = a(x-p)^2+q## whereas our syllabus document uses ##f(x)=a(x+p)^2+q ##.
 
neilparker62 said:
Some will say it's arbitrary but I think the correct formula for a horizontal shift is ##f(x-a)## and not ##f(x+a)## in the first place.
It all depends on whether we constrain a to be a positive real number.
In your parabola example, if p > 0 and q > 0, the graph of ##f(x) = a(x + p)^2 + q## will be translations to the left by p and up by p q of the graph of ##y = ax^2##
 
Last edited:
Mark44 said:
It all depends on whether we constrain a to be a positive real number.
In your parabola example, if p > 0 and q > 0, the graph of ##f(x) = a(x + p)^2 + q## will be translations to the left by p and up by p of the graph of ##y = ax^2##
Yes - it's intended that a is a real number but not necessarily positive. For example f(x-(-2)) would represent a left shift of 2 units on the graph of f(x).

In the parabola example, the problem with p>0 creating a left shift is that it is counter-intuitive as per the op's original observation. A positive value of p should result in a right shift since that is the positive direction on the horizontal x-axis. So I'd go with the old text books:

Edit: Replaced image from text book with one which includes a useful explanation.

1741937831345.jpeg
 
Last edited:
Reply
  • Like
Likes   Reactions: Gavran
neilparker62 said:
In the parabola example, the problem with p>0 creating a left shift is that it is counter-intuitive as per the op's original observation. A positive value of p should result in a right shift since that is the positive direction on the horizontal x-axis.
Before people learn better, their intuition can be wrong... A purpose of education is to correct erroneous intuitions.
 
Reply
  • Like
Likes   Reactions: FactChecker
There is no police force that will enforce an official "Horizontal Graph Shifting Rule". If a student is initially confused about right/left shift for a positive/negative ##a##, he should be able to figure it out and accept the result. There are more difficult concepts ahead.
 
Reply
  • Like
Likes   Reactions: neilparker62
Mark44 said:
Before people learn better, their intuition can be wrong... A purpose of education is to correct erroneous intuitions.
If we go by the horizontal shifting rule which I have imaged above, the op's intuition is completely correct. A positive value of h leads to a right shift and a negative value of h leads to a left shift. On the other hand if we prefer a convention that writes the shifting rule as F(x) = f(x + h), then an exact "counter-intuition" applies whereby positive values of h lead to left shifts and and negative values of h lead to right shifts.

Similarly a student could be puzzled because his/her reasonable intuition indicates that electrons flow from negative to positive whereas there is an established convention that current flows from positive to negative. There is - however - nothing particularly wrong with the student's intuition in this instance.

Agreed that intuition can be wrong - as is evidenced by Aristotle's erroneous belief that heavier objects fall faster than light ones. Corrected by Galileo.
 
Mark44 said:
left by p and up by p
left by p and up by q
 
neilparker62 said:
Similarly a student could be puzzled because his/her reasonable intuition indicates that electrons flow from negative to positive whereas there is an established convention that current flows from positive to negative.
I'm not sure this is a comparable example. The labels "positive" and "negative" came about in the first place, I believe, because of a faulty understanding in how electrons flowed in a circuit.