Does changing the equation of a function require a new function name?

In summary, the conversation discusses the function notation used to represent equations and how the name of the function may change if there is an edit to the equation. It is recommended to use a new function name to avoid confusion, even though it is technically possible to use variations of the original function.
  • #1
Abu
39
16
Hi everyone. I'm getting slightly confused about the general function notation used. I was wondering if the name of the function were to change if there was an edit to the equation.

What I mean is let's say we have the graph f(x) = x^2. If I were to vertically stretch this equation by a factor of 2, would I still identify it as f(x), or instead g(x) because now it is an entirely new graph that doesn't follow the original equation of f(x) = x^2... instead, it could be:
f(x) = 2x^2
g(x) = 2x^2
f(2x) = 2x^2

Do all of these work and I am just overthinking it? I am inclined to say that the last two are correct and the first one is incorrect because it directly contradicts the statement that f(x) = x^2
Thanks.
Note: this is not a homework question, just didn't know how to clearly explain my question any other way.
 
Mathematics news on Phys.org
  • #2
I think you should use a new function name. Unless you are done with the original f(x) and don't need it anymore.
Sometimes people get confused by f(x) = something, then what to do with f(2x).
Try this. Use f(z) = z2, instead. Now what is f(2x) ?. Just substitute 2x everywhere you see a z: So f(2x) = (2x)2 = 4(x2), not 2(x2)
The z is just a placeholder. You can have f(α), f(ω), f(θ), etc.
 
  • #3
Abu said:
Hi everyone. I'm getting slightly confused about the general function notation used. I was wondering if the name of the function were to change if there was an edit to the equation.

What I mean is let's say we have the graph f(x) = x^2. If I were to vertically stretch this equation by a factor of 2, would I still identify it as f(x), or instead g(x) because now it is an entirely new graph that doesn't follow the original equation of f(x) = x^2... instead, it could be:
f(x) = 2x^2
g(x) = 2x^2
f(2x) = 2x^2

Do all of these work and I am just overthinking it? I am inclined to say that the last two are correct and the first one is incorrect because it directly contradicts the statement that f(x) = x^2
You are correct that the first equation is simply wrong. For exactly the reason you give. If f(x) = x2 then f(x) is not 2x2.

The second equation is also correct. To stretch a graph vertically, you can double every function value. The doubled function, g, would indeed be given by g(x) = 2x2.

The third equation is incorrect. if f(x) = x2 then f(2x) = (2x)2 = 4x2
 
  • #4
scottdave said:
I think you should use a new function name. Unless you are done with the original f(x) and don't need it anymore.
Sometimes people get confused by f(x) = something, then what to do with f(2x).
Try this. Use f(z) = z2, instead. Now what is f(2x) ?. Just substitute 2x everywhere you see a z: So f(2x) = (2x)2 = 4(x2), not 2(x2)

jbriggs444 said:
The third equation is incorrect. if f(x) = x2 then f(2x) = (2x)2 = 4x2

Ah okay. Thank you two so much! Really silly mistake on the third one now that I look back on it...

So to clarify, if the statement is f(x) = x^2, all this means is that whatever is put into the brackets of f(x), it must follow the x^2 after it. It is okay to use variations of f(x) to explain multiple graphs (that include the x^2), but it is not recommendable because the repeated f can be distracting or confusing, which is why it was better to say g(x).
Am I correct on this?

Thank you!
 
Last edited:
  • #5
Abu said:
Hi everyone. I'm getting slightly confused about the general function notation used. I was wondering if the name of the function were to change if there was an edit to the equation.

What I mean is let's say we have the graph f(x) = x^2. If I were to vertically stretch this equation by a factor of 2, would I still identify it as f(x), or instead g(x) because now it is an entirely new graph that doesn't follow the original equation of f(x) = x^2... instead, it could be:
f(x) = 2x^2
g(x) = 2x^2
f(2x) = 2x^2

Do all of these work and I am just overthinking it? I am inclined to say that the last two are correct and the first one is incorrect because it directly contradicts the statement that f(x) = x^2
Thanks.
Note: this is not a homework question, just didn't know how to clearly explain my question any other way.
A function is a mapping of one entity to another. So ##f\, : \,x \mapsto x^2## which we abbreviate by ##f(x)=x^2## is a function. A graph is a geometric object, here a curve in a plane. The plane is given by ##\mathbb{R}^2=\{(x,y)\,\vert \,x\in \mathbb{R},y\in \mathbb{R}\}## and the curve is a set of points in this plane, namely ##\{(x,y)\,\vert \,x\in \mathbb{R},y=f(x)\}## which we can write shorter as ##\{(x,f(x))\,\vert \,x \in \mathbb{R}\}##. So these are two different views on ##x \to x^2##.

As if this wasn't enough, you also mix up the scaling of your drawing into the question. When you say "stretch", then what exactly do you stretch? If it is the drawing, e.g. by changing the scales, then nothing will change. It only looks differently as you changed the measures.

If you stretch the variable, say by a factor two, then you get a new variable ##u=g(x)=\frac{1}{2} x## which gives you twice as much space if you will. But what exactly happens is, that you changed coordinates ##f(u)=f(g(x))=(\frac{1}{2}x)^2=\frac{1}{4}x^2=u^2##. So the function ##f## is still ##u \mapsto u^2## but as a function of ##x## we have ##f \circ g\, : \,x \mapsto \frac{1}{4}x^2## which you must respect, if you still want to draw it in the same ##(x,y)-##plane. If you rub out ##x## and write it ##u##, nothing will change geometrically, but they are different coordinates now. The function "map a number to its square" which we called ##f## hasn't changed, only the coordinates.

The same goes for the ##y-##coordinate, when you change ##y=f(x)=2v## as in your example. So in any case it is important to distinguish the function itself from its graphical representation and the scaling of the axis.
 
  • Like
Likes Abu
  • #6
fresh_42 said:
A function is a mapping of one entity to another. So ##f\, : \,x \mapsto x^2## which we abbreviate by ##f(x)=x^2## is a function. A graph is a geometric object, here a curve in a plane. The plane is given by ##\mathbb{R}^2=\{(x,y)\,\vert \,x\in \mathbb{R},y\in \mathbb{R}\}## and the curve is a set of points in this plane, namely ##\{(x,y)\,\vert \,x\in \mathbb{R},y=f(x)\}## which we can write shorter as ##\{(x,f(x))\,\vert \,x \in \mathbb{R}\}##. So these are two different views on ##x \to x^2##.

As if this wasn't enough, you also mix up the scaling of your drawing into the question. When you say "stretch", then what exactly do you stretch? If it is the drawing, e.g. by changing the scales, then nothing will change. It only looks differently as you changed the measures.

If you stretch the variable, say by a factor two, then you get a new variable ##u=g(x)=\frac{1}{2} x## which gives you twice as much space if you will. But what exactly happens is, that you changed coordinates ##f(u)=f(g(x))=(\frac{1}{2}x)^2=\frac{1}{4}x^2=u^2##. So the function ##f## is still ##u \mapsto u^2## but as a function of ##x## we have ##f \circ g\, : \,x \mapsto \frac{1}{4}x^2## which you must respect, if you still want to draw it in the same ##(x,y)-##plane. If you rub out ##x## and write it ##u##, nothing will change geometrically, but they are different coordinates now. The function "map a number to its square" which we called ##f## hasn't changed, only the coordinates.

The same goes for the ##y-##coordinate, when you change ##y=f(x)=2v## as in your example. So in any case it is important to distinguish the function itself from its graphical representation and the scaling of the axis.
Wow, thanks for your reply! I understand now that I should have been more clear in my statement and accurately distinguish what I was referring to.

On a side note... I was also thinking that there are limits to what you can express with one function notation. For example, if I were to say f(x) = √x, and I wanted to vertically stretch the variable by a factor of two, it would look like this:
2√x
There is no way I can show that in the form f(x) because I can't just change a variable in this case to get 2√x. Therefore, I would need to identify a new function, and say g(x) = 2√x.

Am I correct that there are limits to what you can show with one function name, as denoted by the example mentioned?
Thanks so much everyone.
 
  • #7
You can change the function ##f## to a new function ##g=2\cdot f## or the scaling on the ##y-##axis, i.e. stretch only the image. It's like counting one or two boxes on the paper to equal one. But here you actually get a new function. I hope you meant what you wrote, as ##f(x)=\sqrt{x}=+\sqrt{x}## and you have only one half of the parabola, which is correct. Functions can be added, multiplied or stretched:
$$
(f+g)(x) = f(x)+g(x)\, , \,(c\cdot f)(x) = c \cdot f(x) \; , \; (f\cdot g)(x)= f(x) \cdot g(x)
$$
where the last one must not be confused by the consecutive application of the two: ##(f\circ g)(x) = f(g(x))##. So there are quite a few things which can be done with functions. Your example is a stretch, you doubled the function itself and got a new one: twice the first.
 
  • Like
Likes Abu
  • #8
fresh_42 said:
You can change the function ##f## to a new function ##g=2\cdot f## or the scaling on the ##y-##axis, i.e. stretch only the image. It's like counting one or two boxes on the paper to equal one. But here you actually get a new function. I hope you meant what you wrote, as ##f(x)=\sqrt{x}=+\sqrt{x}## and you have only one half of the parabola, which is correct. Functions can be added, multiplied or stretched:
$$
(f+g)(x) = f(x)+g(x)\, , \,(c\cdot f)(x) = c \cdot f(x) \; , \; (f\cdot g)(x)= f(x) \cdot g(x)
$$
where the last one must not be confused by the consecutive application of the two: ##(f\circ g)(x) = f(g(x))##. So there are quite a few things which can be done with functions. Your example is a stretch, you doubled the function itself and got a new one: twice the first.
Ah okay, so you would need to make a new function and use the letter g instead. Thanks for your help, appreciate it.
 

1. What is a beginner function?

A beginner function is a basic programming concept that allows you to create a block of code that can be executed multiple times with different inputs. It is typically used to perform a specific task or calculation.

2. How do I write a beginner function?

To write a beginner function, you first need to define the function name and any parameters that it will take in. Then, you can write the code within the function block, using the parameters as variables. Finally, you can call the function with different inputs to execute the code.

3. What is the purpose of using beginner functions?

The purpose of using beginner functions is to make your code more organized and reusable. Instead of writing the same code multiple times, you can create a function and call it whenever you need to perform that task. This also makes it easier to make changes or updates to the code in one place.

4. What are some common mistakes to avoid when using beginner functions?

Some common mistakes to avoid when using beginner functions include not defining the function before calling it, not passing the correct number or type of parameters, and not returning a value if the function is meant to do so. It is also important to make sure the function is properly closed with curly brackets.

5. Can beginner functions be nested?

Yes, beginner functions can be nested, meaning you can define and call a function within another function. This can be useful when you need to perform a more complex task that requires multiple functions to work together.

Similar threads

Replies
4
Views
899
Replies
7
Views
824
Replies
17
Views
2K
Replies
2
Views
1K
Replies
5
Views
713
  • General Math
Replies
9
Views
2K
Replies
4
Views
414
Replies
3
Views
2K
  • General Math
Replies
13
Views
2K
  • General Math
Replies
6
Views
1K
Back
Top