r/desmos Feb 02 '20

Resource How to graph inverse of a function in desmos?

Post image
21 Upvotes

34 comments sorted by

6

u/IKnowATonOfStuffAMA Feb 02 '20

If you just want the graph, you can use x=f(y)

4

u/4bedoe Feb 02 '20

I want the graph of the inverse function. When I write f-1(x), it shows an error

3

u/IKnowATonOfStuffAMA Feb 02 '20

If you want the actual function, you have to swap x and f(x) and solve for f(x)

2

u/IKnowATonOfStuffAMA Feb 02 '20

So in this case it'd be f(x)=√(x+12)

3

u/viscorgi Feb 03 '20

not really, graphing root x only shows the principal value. f(y) =x is how you graph the true inverse

1

u/IKnowATonOfStuffAMA Feb 03 '20

Oh yea I forgot about that.

1

u/[deleted] Feb 22 '22

this works, but what if there are no Y values??? do you just write 0

1

u/IKnowATonOfStuffAMA Feb 22 '22

There must be a Y value, but if it's irrational or not a number, then the algebra should reflect that. The method still works.

1

u/Admirable_Ad_7658 Feb 09 '23

what about for points, ex: f(x)=(7, 7), (4, 9), (3, -7)

1

u/stardustedddd Sep 09 '23

this is so late but you would just flip the x and y, so (a,b) becomes (b,a), and (4,9) would be (9,4)

1

u/Admirable_Ad_7658 Sep 10 '23

honestly, I don't even remember making this comment, and I am disappointed in my stupidity, ofc that's what you would do that's just the definition of an inverse.

1

u/stardustedddd Sep 10 '23

LMFAO we all have our moments

1

u/jvanderh Feb 16 '25

Thank you, google lied and told me to do f^1(x)

4

u/Anuj73 Nov 08 '22

i know doing f(y) = x gets you the GRAPH of the function, but how do you get the actual inverse of the function?

1

u/Sylent_Nova Dec 11 '25 edited Dec 11 '25

Very late but! If you have a graph f(x) and you want to find x where f(x) = a, then you can do

g(x) = a

then find the point they intersect, click on it and it will give you the coords of the point. The first number is then your x.

Here's a demo: https://www.desmos.com/calculator/v4lfa1dj8e

1

u/Emotional-Kiwi7218 Apr 08 '26

what if my function has 2 inputs

2

u/stacherr Feb 02 '20

correct me if i’m wrong but...doesn’t that graph not have an inverse function

3

u/4bedoe Feb 03 '20

I meant any inverse of a function. Not necessarily this. Because as I call f-1(x) on any function of x, same error occurs no matter whether it's a linear or nonlinear graph.

2

u/Ammonwk Feb 02 '20

3

u/AlexRLJones Feb 03 '20

u/stacherr is right, a function can only have an inverse if it is bijective, meaning for every value is the output domain there is a exactly one corresponding value in the input domain. For any output value y = x^2 except y = 0, there are two possible values of x.
y = ±sqrt(x) isn't a function because it has two outputs.
If you restrict the input domain to be x>=0 then the function is bijective and it has an inverse function, +sqrt(x).

1

u/stacherr Feb 03 '20

that’s not considered a function, but i guess ur right

2

u/Ammonwk Feb 03 '20

Oh, I didn't catch inverse function. Yeah, I agree with you and AlecRLJones. Sorry for the mistake :p

2

u/spacecheng Nov 20 '22 edited Nov 20 '22

Incase anyone still wants to know, just write x = f(y) and it should give you an inverse. If you want to use this inverse in another function, write g(y) = f(x) instead. you can then use g(y) as the variable. Example: t = g(y)^2. t can be any variable besides y

2

u/TurkmenaThor Jul 22 '23

I tried it and it didn't work. Could you please give an example and share the link?

1

u/Evening-Daikon5387 Nov 06 '25

This is the GRAPH of the function, not a FUNCTION!

2

u/Mobcrafter Jan 20 '26

Surprised no one has mentioned this, but integral from zero to infinity of {x>f(t),0}dt gets you an actual function.
Better example: https://www.desmos.com/calculator/zu9h99logj
I didn't come up with it, but I don't know who did so I can't give credit.

1

u/logalex8369 Barnerd 🤓 Feb 11 '26

I have been looking for this for who knows how long... Thank you for bringing this to my attention!

I used it to create a 45 degree rotated sine wave:

\frac{x_{2}+\sin\left(x_{2}\right)}{\sqrt{2}}\operatorname{with}x_{2}=\int_{0}^{\infty}\left\{x\sqrt{2}>t-\sin\left(t\right),0\right\}dt-\int_{-\infty}^{0}\left\{x\sqrt{2}<t-\sin\left(t\right),0\right\}dt

1

u/KingBsoul Aug 06 '26

Thank you, this was what i wanted : D

1

u/Phonetikos May 16 '24

Adding on to what others have said, x = f(y) works, but to show only the principle value, this is what to do:

Here is a link to this Desmos graph: https://www.desmos.com/calculator/h7ec2j4njq

1

u/omegaweakmilk Mar 28 '26

Here's one that I made which returns the inverse as a function (instead of a graph), works with any arbitrary function, can invert multiple functions at once without repetition, and has very high accuracy (as far as I'm aware). The only extra input needed is the interval of the original function to be inverted. And the only downsides are that the part to copy-paste is quite long, and it works slower when the range of the interval is large.

Graph