Mathematica Learn How to Invert a Function with Mathematica for y = x^2

  • Thread starter Thread starter kent davidge
  • Start date Start date
  • Tags Tags
    Function
Click For Summary
The discussion centers on finding the inverse of the function y = x^2 using Mathematica. It highlights that y = x^2 does not have a true inverse as a function because it is not one-to-one; both x and -x yield the same output for positive values of y. The method of using Solve[y == x^2, x] in Mathematica is mentioned, which correctly identifies both x = √y and x = -√y as solutions. Additionally, WolframAlpha, an online tool related to Mathematica, is referenced as a resource for confirming these results.
kent davidge
Messages
931
Reaction score
56
Suppose I have ##y = x^2##. By inverse, I mean ##x = \pm \sqrt y##. How can I get Mathematica to do that?
 
Physics news on Phys.org
Solve[y==x^2,x]
 
  • Like
Likes kent davidge
kent davidge said:
Suppose I have ##y = x^2##. By inverse, I mean ##x = \pm \sqrt y##. How can I get Mathematica to do that?
Technically speaking, ##y = x^2## doesn't have an inverse that is itself a function. For a function f to have an inverse, f must be one-to-one. Your example function fails this test because for each number x in the domain that maps to ##x^2##, -x also maps to the same value.
 
  • Like
Likes kent davidge
Mark44 said:
Technically speaking, ##y = x^2## doesn't have an inverse that is itself a function. For a function f to have an inverse, f must be one-to-one. Your example function fails this test because for each number x in the domain that maps to ##x^2##, -x also maps to the same value.
Solve finds and reports both.
 
Dale said:
Solve finds and reports both.
Right. I checked with wolframalpha, which is sort of the online version of Mathematica.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K