Interchanging x and y for inverse function

In summary, the two variables are probably swapped so that the X-axis on the standard X-Y graph would be horizontal and the Y-axis vertical. Swapping them changes their definitions.
  • #1
member 731016
Homework Statement
Please see below
Relevant Equations
Please see below
For this,
1680575483637.png

Why are we allowed to interchange x and y? Is it because the equation will still be true?

Many thanks!
 
Physics news on Phys.org
  • #2
I wouldn't swap x and y. They are probably doing it so that the graph on the usual X-Y grid would have the X-axis horizontal and the Y-axis vertical. Swapping them changes their definitions. Certainly, if the variable names had some real meaning, like ##height = age^3 + 2##, you wouldn't want to swap the variables.
 
  • Like
Likes mathwonk and member 731016
  • #3
Consider this example

## f(x) = e^x##
## g(x) = \ln (x) ##

##g(x)## is the inverse function of ##f(x)## and we thus write ##g = f^{-1}##.

What we mean by this is that ##g(f(x)) = f(g(x)) = x## or in other notation ## f^{-1}(f(x)) = f(f^{-1}(x)) = x##.

Now, how we label the variables is not important when it comes to functions, we can write for instance ##f(\alpha) = e^\alpha## or ##f(y) = e^y## and so on. However, if we insist in writing ##y = e^x## then ##x## is a number in the domain ##D_f## of ##f## and ##y## is a number in the codomain ##V_f## of ##f##. Thus, when we "interchange" ##x## and ##y## to write the inverse function with ##x## as the value of its domain, we need to make sure that this number is in the codomain of ##f##. Back to your example:

## f(x) = x^3 + 2##, ##x \in D_f##
## f^{-1}(x)= \sqrt[3]{x^3-2}##, ## x \in V_f##

Now, check for yourself that ## f^{-1}(f(x)) = f(f^{-1}(x)) = x## for your problem.
 
Last edited:
  • Like
Likes Gavran, WWGD, member 731016 and 1 other person
  • #4
FactChecker said:
I wouldn't swap x and y. They are probably doing it so that the graph on the usual X-Y grid would have the X-axis horizontal and the Y-axis vertical. Swapping them changes their definitions
I agree with this sentiment completely.
If ##y = x^3 - 2 = f(x)##, then ##x = \sqrt[3]{y - 2} = f^{-1}(y)##
The graphs of the two equations ##y = x^3 - 2## and ##x = \sqrt[3]{y - 2}## are exactly identical, meaning any pair of numbers (x, y) that satisfies the first equation also satisfies the second equation.

In subsequent classes such as calculus, one sometimes needs to find the inverse in order to evaluate a definite integral. In such cases it is counterproductive and foolish to swap variables.

As @FactChecker mentioned, swapping variables changes the definitions of the variables.
As an example, consider the conversion formulas for changing from Fahrenheit temperature to Celsius: ##f(C) = F = \frac 9 5 C + 32## and ##f^{-1}(F) = C = \frac 5 9 (F - 32)##
You can verify these formulas with pairs such as (0, 32), (20, 68), and (100, 212), where the first number in a pair is the Celsius temperature and the second is its Fahrenheit equivalent.
Swapping variables in these formulas leads to nothing but confusion.
 
  • Like
Likes mathwonk, WWGD, member 731016 and 2 others
  • #5
I agree that swapping variables introduces confusion and loses insight as to the meaning of the variables. I also agree with malawi_glenn that logically it does not matter, but then I would insist on including quantifiers. I.e. when writing things like g(f(x)) = x and f(g(x))= x, I would say explicitly "g(f(x)) = x for all x in domain f", and "f(g(x)) = x for all x in domain g", so that it is more clear that the two uses of x refer to elements of different sets, rather than taking that for granted as "obvious".
 
  • Like
Likes member 731016 and malawi_glenn
  • #6
A nice example where this matters if f(x) =x^2, what is the inverse function? Well in order to obtain that, we need to define the domain of f first. I leave this as an excerise for the OP to think about
 
  • Like
Likes member 731016
  • #7
I don't know if this is helpful towards understanding the issue, but the Inverse/Implicit function theorems help determine when y is a function of x, as well as vice-versa, re @malawi_glenn example of ##f(x)=x^2##.
But there are other real life examples where relationships in one direction don't go in the opposite one.
 
  • Like
Likes member 731016
  • #8
malawi_glenn said:
A nice example where this matters if f(x) =x^2, what is the inverse function?
As stated, f does not have an inverse that is itself a function. As an aside, the domain of f is all real numbers.

malawi_glenn said:
Well in order to obtain that, we need to define the domain of f first. I leave this as an excerise for the OP to think about
A better choice of words is that we need to restrict the domain of f to some set of numbers so that f is one-to-one on this restricted set.
 
  • Like
Likes member 731016
  • #9
Mark44 said:
A better choice of words is that we need to restrict the domain of f to some set of numbers so that f is one-to-one on this restricted set.
Maybe, I do not know how well know it is or not that if I just type "f(x) = x^2" then per default the domain is all real numbers?
Mark44 said:
As an aside, the domain of f is all real numbers
Why not all complex numbers?
 
  • Like
Likes member 731016
  • #10
malawi_glenn said:
Maybe, I do not know how well know it is or not that if I just type "f(x) = x^2" then per default the domain is all real numbers?
Yes. A function always has a domain. If the domain is not explicitly stated, it is implied to be the set of all real numbers for which the function's formula produces an output value.

For example, if the formula for a function is given as ##f(x) = \frac 1{(x -1)^2}##, the implied domain is ##\{x \in \mathbb R| x \ne 1\}##, or equivalently, ##(-\infty, 1) \cup (1, \infty)##.
malawi_glenn said:
Why not all complex numbers?
Whether the domain is real versus complex numbers is usually determined by context. In addition, functions that are defined on complex numbers often use z as the argument.
 
Last edited:
  • Like
Likes member 731016
  • #11
ChiralSuperfields said:
Homework Statement: Please see below
Relevant Equations: Please see below

For this,
View attachment 324465
Why are we allowed to interchange x and y? Is it because the equation will still be true?

Many thanks!
At risk of running against the grain of this thread, I would say that quite simply it's because a function and its inverse are symmetrical about the line y=x. So if (for example) the point (4,5) is on f(x) , then the point (5,4) is on the graph of ##f^{-1}(x)##. Another way of putting that is that the graph of ##f^{-1}(x)## may be obtained by reflecting all points on the graph of f(x) in the line y=x. And that's the basic rationale for the method described in your text book.

Consider, for example: $$f(x)=y=x^2-10x+24=(x-4)(x-6).$$ To find the inverse function we swap x and y: $$x=y^2-10y+24.$$ Completing the square: $$x=(y-5)^2-1,$$ from which we obtain: $$f^{-1}(x)=5\pm \sqrt{x+1}.$$ I have graphed this function and its inverse here:

https://www.desmos.com/calculator/sb7cj1yest

It will be noted that on the inverse the original function's x-intercepts at (4,0) and (6,0) become y intercepts at (0,4) and (0,6) and the respective turning points are at (5,-1) and (-1,5). Domain and range are also interchanged - range ##y \ge -1## on the function becomes domain ##x \ge -1## on the inverse. I have avoided referring to "inverse function" because technically this inverse is not a function. For x>1 there are two y values for each x value.
 
Last edited:
  • Like
Likes member 731016
  • #12
neilparker62 said:
I would say that quite simply it's because a function and its inverse are symmetrical about the line y=x.
Yes I tell my pupils to check also using this method :)
 
  • Like
Likes member 731016
  • #13
I think the main reason that people swap the variables is to keep the traditional domain variable input as 'x' and the traditional range variable as 'y', for both the function and its inverse. That is fine in a non-application scenario, where the meanings of the input and output are not determined and the only thing 'x' and 'y' mean are input and output, respectively. In general applications of mathematics, that would not be a good thing to do, but IMO there is very little risk of a person swapping variables in that situation, regardless of how it was presented in math class.
 
  • Like
Likes member 731016 and neilparker62
  • #14
neilparker62 said:
At risk of running against the grain of this thread, I would say that quite simply it's because a function and its inverse are symmetrical about the line y=x.
And this is the reason that most Precalc textbooks present the graphs of a function and its inverse. However, as @FactChecker says below, it makes absolutely no sense to write a function and its inverse as functions of the same variable in, for example, functions that do conversions from one kind of unit to another.
FactChecker said:
I think the main reason that people swap the variables is to keep the traditional domain variable input as 'x' and the traditional range variable as 'y', for both the function and its inverse. That is fine in a non-application scenario, where the meanings of the input and output are not determined and the only thing 'x' and 'y' mean are input and output, respectively.
Along the lines of what I mentioned before, once you get to integration problems, and you need to change the variable of integration, you often need to get the inverse of the integrand function, and it makes no sense whatever to switch the x and y variables.
 
  • Like
Likes member 731016 and FactChecker

FAQ: Interchanging x and y for inverse function

What does it mean to interchange x and y for an inverse function?

Interchanging x and y for an inverse function means swapping the roles of the dependent and independent variables. This is done to find the inverse function, which essentially reverses the process of the original function. If you have a function y = f(x), interchanging x and y gives you x = f(y), which you then solve for y to find the inverse function.

Why do we interchange x and y to find the inverse function?

We interchange x and y to find the inverse function because the inverse function reverses the mapping of the original function. By swapping x and y, we are essentially looking for a function that, when applied to the output of the original function, returns the original input. This process helps us determine the formula for the inverse function.

How do you solve for y after interchanging x and y?

After interchanging x and y, you solve for y by isolating y on one side of the equation. This typically involves algebraic manipulation such as adding, subtracting, multiplying, dividing, or using other algebraic techniques to express y explicitly in terms of x. The resulting expression is the inverse function.

Can every function have an inverse by interchanging x and y?

No, not every function has an inverse. For a function to have an inverse, it must be bijective, meaning it is both one-to-one (injective) and onto (surjective). This ensures that each output is uniquely mapped to a single input, allowing the inverse function to exist. Functions that are not bijective do not have inverses.

What are some common mistakes to avoid when interchanging x and y for inverse functions?

Common mistakes include not correctly solving for y after interchanging x and y, overlooking the domain and range restrictions of the original function, and assuming that all functions have inverses. It is also important to verify that the resulting inverse function is correct by checking if applying the inverse function to the original function returns the original input.

Similar threads

Back
Top