is this correct? (yes/no)
Code:f(x) = abs (x-6) x = abs (y-6) abs (x+6) = y abs (x+6) = f-1(x)
This is a discussion on mathematics. function inverse within the A Brief History of Cprogramming.com forums, part of the Community Boards category; is this correct? (yes/no) Code: f(x) = abs (x-6) x = abs (y-6) abs (x+6) = y abs (x+6) = ...
is this correct? (yes/no)
Code:f(x) = abs (x-6) x = abs (y-6) abs (x+6) = y abs (x+6) = f-1(x)
"Hence to fight and conquer in all your battles is not supreme excellence;
supreme excellence consists in breaking the enemy's resistance without fighting."
Art of War Sun Tzu
Unless you restrict the domain, absolute value has no inverse.
Even if you restrict the domain of f(x) to x >= 6 your f inverse is incorrect
edit: On a restricted domain f-1(x) = x + 6 where x >= 0
Last edited by Thantos; 10-24-2004 at 12:45 AM.
so let me see if i understand you correctly.
i assumed that since i was trying to acquire a function inverse it would be implied that i would be using a one to one function wich implies i would already be taking into concideration the domain restriction x>=0 is this not valid to assume on the audience?
also does the fact that the domain is restricted due to the one to one requirement make the absolute value portion of the equation null or of no consiquence in this equation?
so you are saying that it is correct as follows?
Code:f(x) = abs (x-6), x>=0 x = abs (y-6) x+6 = y x+6,x>=0 = f-1(x)
Last edited by xviddivxoggmp3; 10-24-2004 at 04:41 PM.
"Hence to fight and conquer in all your battles is not supreme excellence;
supreme excellence consists in breaking the enemy's resistance without fighting."
Art of War Sun Tzu
Consider two functions:
That is what abs(x - 6) means, and you can take the inverse of these for the inverse of your function on the respective domains x < 6 and x >= 6. The reason you can do this is because addition is invertible, and multiplication by any non-zero value is invertible (although the latter is of little relevance to the problem). The function abs(...) is not invertible.Code:f1(x) = x - 6 x >= 6 f2(x) = 6 - x x < 6
In general, a function is invertible if
f(x) = f(y) -> x = y
The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.
sorry to say this, but i'm a little more lost.
"Hence to fight and conquer in all your battles is not supreme excellence;
supreme excellence consists in breaking the enemy's resistance without fighting."
Art of War Sun Tzu
Ok let me try to explain it. Easist way to find the inverse of a function is to graph it and then mirror it over the line y=x. The new graph is the inverse. Now if we did that to y=|x-6| the inverse would be x=|y|+6, but thats not a function since for a given x value there are multiple y values.
So to keep this from happining we restrict the domain of y=|x-6| to either x>= 6 or x<= 6. Now we mirror it across the y=x line and we'll get a line y=x+6 where x >= 0 or y=-x+6 where x>= 0 depending on which domain we used in the orginal function.
what I do, is say the function isI swap the x and the y then solve for yCode:y=12x+1Code:x=12y+1 -12y=-x+1 y=(x-1)/12
Yep... Thats a good way to do it. You know it is invertible if f(x)=f(y) implies x=y. What this means is, if you can draw a horizontal line anywhere on the x-y plane, and only hit the graph of f once, it is invertible. If any horizontal line hits it more than once, than you need to break it up into several functions (each over its own part of the domain), so that the horizontal line test mentioned above is satisfied. Try this on y=abs(x - 6), and see at what x value you need to break the function to achieve this.
I hope this undoes any confusion I caused earlier.
The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.
it wasn't confusion from you, it is confusion from me not understanding in the first place.
in the problem it asks to find the inverse w/o graphing. i understand you need to restrict the domain to make a one to one function, which is used to find it's inverse. i can do it with anything else, but this problem thows me a little.
to restrict the domain, do you not only look for positive or negative x values?
should it not be x>=0 instead of x>=6
and as for the inversing, i understand it as a systematic sequential undoing of mathmatical modifications of a value. say * is undone with /, - by +, etc. but how do you undo abs()? is this not a mathmatical modification that we would need to undo, or does the fact that we are restricting value to all positives automatically do this?
"Hence to fight and conquer in all your battles is not supreme excellence;
supreme excellence consists in breaking the enemy's resistance without fighting."
Art of War Sun Tzu
Well, the thing about abs() is that it is not invertible unless you restrict the domain. Draw out (or imagine) what this function looks like. If whatever is inside is a linear function of x (i.e. of the form a*x+b), then abs(...) looks like the letter "V". Clearly, you cannot invert this function as two separate x values produce the same value. So, what you have to do is break it at the "point of the V", the point where it hits 0. Then, you know that what is to the left is simply a line (nice and invertible), and the same goes for the right side.
The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.
OK, I'll try to explain the problem using plots. I just found a nice web page that let you create plots online.
http://www.hostsrv.com/webmab/app1/M...tions&s3=basic
Here's the function y = x. Notice how for every value of y there is exactly one corresponding x-value.
Therefore, this function has an inverse.
Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling
Below is the function e^x. For every y-value in the plot, there is one and only one corresponding x-value. Therefore, the function has an inverse.
But, for some values of y (<=0), there is no x value, which forces us to think about what values we put into the inverse function. The inverse can only take arguments greater than zero.
In this case, the inverse is y=ln x where x>0
Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling
Finally, we have the function
y = abs(x-6).
By looking at the plot, we can see that the function has no inverse, because many y-values correspond to more than one x-value.
But, the abs()-function can be separated into two functions (look at the graph):
f(x) = x-6 when x>6
g(x) = -x+6 when x<6
and each of those functions have inverses.
Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling
As another excercise, look at the function f(x)=x^x.
For x larger than one, this function is increasing and should therefore have an inverse. Try to find it.
Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling
let me go back to the original question on last time.
correct (yes/no)?
f(x)=abs(x-6)
y=abs(x-6)
x=abs(y-6)
either
x=-(y-6) if x<=6 then
6-x=f-1(x) if x<=6
or
x=(y-6) if x>=6 then
x+6=f-1(x) if x>=6
"Hence to fight and conquer in all your battles is not supreme excellence;
supreme excellence consists in breaking the enemy's resistance without fighting."
Art of War Sun Tzu