Skip to main content
GameDev.net gamedev.net
🔒 Locked

A tuff question...

Started by pacman2003 Jan 24, 2004 at 1:36 PM 26 replies 5.1k views
Original Post
pacman2003
pacman2003
Hi, I m reading a text-book on differential calculus and i have a doubt regarding a solved example given in the book. The question given is: A function R->R (from R to R) where R is the set of all real numbers is defined by: f(x) = {A(x^2) + 6x - 8} / {A + 6x - 8(x^2)} Find integral values of ''A'' for which the function ''f'' is onto. The answer for A turns out to be: A >= 2 and A <= 14 My doubt: If A is substituted in f(x) as 2, then f(x) is not defined for x = 1 and x = -1/4, in which case f(x) ceases to be a function (because f(x) is not defined for all the elements of the domain viz. set of all real numbers). Can anybody explain this? Would typing in the solution given in the book help? Thank you!
pacman2003
pacman2003
Well, the book defines a function as "a relation from one set (called domain) to another (called co-domain) such that EACH element of the domain is related to exactly one element of the co-domain".

Any ideas?
VolkerG
VolkerG
The only case I can see where f(x) is not a function from R to R is when the denominator has one or more roots. Thus find the A''s so that no real root exists (the discriminant is less than 0). But I can''t get the values you gave us.
grhodes_at_work
grhodes_at_work
This is dangerously close to a homework question, may actually be a homework question. The discussion so far is okay, but please keep this at a general discussion level and do not provide a derived answer.

Review the Forum FAQ for our policy on homework!

Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.

[edited by - grhodes_at_work on January 25, 2004 11:18:38 AM]
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net
furby100
furby100
quote:
Original post by Anonymous Poster
True, but the domain need not be the entire set of real numbers. It could be any subset, like in this case. The same is true for the co-domain (or "range" as I thought it was called in english).



The co-domain and range are not the same thing. The codomain is the set onto which you are mapping, and the range is the actual set of points which are mapped onto, e.g. for f(x) = x*x, the domain could be all the real numbers and the codomain all the real numbers, but the range would only be all the positive real numbers and zero.
pacman2003
pacman2003
(No grhodes, this is not a homework question. I do not need the derived answer because its already given in the book - this is a SOLVED example.)

If A = 2 is substituted in F[x], we have

f[x] = (2x^2 + 6x - 8)/(-8x^2 + 6x + 2)
= (x+4)(x-1)/((4x+1)(x-1))

and it is actually improper to cancel the factor of (x-1) from the numerator and denominator, because for x = 1, we have F[1] = 0/0 which is undefined. Thus there is a gap in F at x = 1, and F is not onto, since there is no value of x such that F[x] = -1.
There is a similar gap at x = -1 when A = 14.

So I think that the given answer IS wrong in this respect: it should be 2 < A < 14 and NOT 2 <= A <= 14.
alvaro
alvaro
I have to agree with the original poster that a function that is not defined for some real number is not a function R->R. You can call it a function from a subset of R to R. It is a common abuse of language to call those things "functions R->R", when technically they are not.



[edited by - Alvaro on January 27, 2004 3:15:07 PM]
alvaro
alvaro
0/0 is undefined. L''Hopital''s rule is for finding limits, but we are not talking about limits here.
Timkin
Timkin
The AP way up above gave the answer you''re looking for, although they didn''t explain it particularly clearly, which may be why it was overlooked.

A function f is onto if and only if, for all y in the range, there exists an x in the domain that maps to y through f .

Thus, to prove that f is onto , you must show that for all y satisfying x =f -1(y ), the resultant x satisfies y =f (x ). Given that there is some tedious rearrangement required for this proof, given this example, I''ll leave that up to you!

Cheers,

Timkin
Timkin
Timkin
When A=2, x=1 cannot be considered to be part of the domain, because f(x=1) is not defined. Thus, it''s irrelevant unless you find a value for y such that f-1(y) = 1... then you have proved that f is NOT ''onto'', because that point y maps onto a point that is not a part of the domain.

It seems to me that there is a fundamental misunderstanding of what ''onto'' means in this thread and how you must deal with points that are and are not in the domain. Think of it this way...

D & C are manifolds. f maps points on D to points on C. f is 1-1 if, obviously, each point in D is mapped to exactly 1 exclusive point in C. f is ''onto'' IF all points in C map to points in D via the mapping f-1 (if its 1-1 and onto then each point in D has exactly 1 point in C that it maps to and all points on both manifolds are connected via f... a straight line in any number of dimensions is a perfect example of this). It is completely irrelevant that D may be a subset of R (the reals) in that some points in R may not exist in D (which is the case in this problem for A=2,x=1).

I hope this helps clear things up...

Timkin
davepermen
davepermen
quote:
Original post by Anonymous Poster
However, as pacman2003 says, for A=2 and y=-1, there is no x such that f(x)=y (unless you cancel out the factor (x-1)).



in programming terms:

it''s not required, that, for every input, you get an output. it''s only required that every possible output has to be reached with some input.

y = sin(x) for example doesn''t. there isn''t any x that returns y = 2..

y = tan(x) for example does. it returns values from -inf to +inf. it _does_not_ return a value as .. pi/2 ? (or pi:D hey, it''s a long time), etc..


hope that helps.

if f is onto, it only has to be able to return all values in the domain. the input domain doesn''t mather.




If that''s not the help you''re after then you''re going to have to explain the problem better than what you have. - joanusdmentia

davepermen.net
If that's not the help you're after then you're going to have to explain the problem better than what you have. - joanusdmentia
My Page davepermen.net | My Music on Bandcamp and on Soundcloud
alvaro
alvaro
I''m sorry to contradict most people in this thread, but an object that is not a function cannot be an onto function. A function f from X to Y is, by definition, a set of pairs (x,y), x in X, y in Y such that every element in X appears in one and only one pair. Then we introduce convinient notation, like f(x) to denote the element of Y that appears in the pair in which x appears.

If f(x) is not defined for some real value x, that means that f is not a function from R to R, so it can''t possibly be an onto function from R to R.

We can change the problem a little bit and say that a function f:A -> R, where A is a subset of R, is given by some formula for all real numbers in which the formula makes sense.

The problem in the book was just poorly worded.
Timkin
Timkin
quote:
Original post by alvaro
I'm sorry to contradict most people in this thread, but an object that is not a function cannot be an onto function.


I don't believe anyone is talking about non-functions being onto... we're discussing functions being onto... if you want to raise the point that the original question, as posed, does not present a function, that's fine... but don't accuse people of being wrong without citing specifics please.

quote:
Original post by Anonymous Poster
As I understand it being 'onto' is the same as being a surjection. Would you agree with that?



Yes, the words are used interchangeably.

quote:
Original post by Anonymous Poster
That sounds weird. Can you give an example of a function that is not 'onto' in that sense?



It sounds weird probably because it's not the typical way in which something is described as being 'onto' (or not 'onto'). I was trying to point out that if such an unusual situation arose, you would know that the function was not onto. Typically, one would say that a function is not 'onto' if there exists values 'a' in the domain and 'b' in the range for which f(a)=b and for which f-1(b)!=a (I'm using != to mean not equal to). A function would also not be onto if there were values a and b such that f-1(b)=a and 'b' was an element of the range but 'a' was not an element of the domain. Of course, f wouldn't be a function in this case either, so I probably chose a bad way to explain what I meant. My apologies if it caused confusion. What I was trying to get at was that we can ignore points that are not in the domain when we are considering whether a mapping (function) is 'onto'.

Cheers,

Timkin
Sure can...



[edited by - Timkin on January 28, 2004 7:55:54 PM]
pacman2003
pacman2003
Well, briefly heres what I have been able to gather about relations and functions. Please do correct me if I go wrong somewhere.

A mathematical rule associating i.e. relating the elements of one set (lets call this set A) to the elements of another set (lets call this set B) is called a relation from set A to set B.

The relation may or may not relate all the elements of set A to elements of set B. Also every element in B may or may not be such that an element of A is related to it.

many-many relation:
If there is at least one element in A which is related to more than one elements in set B AND there is at least one element in B such that more than one elements in set A relate to it, then such a relation is called a ''many-many'' relation.

one-many relation:
If there is at least one element in A which is related to more than one elements in set B AND there is no element in B such that more than one elements in set A relate to it, then such a relation is called a ''one-many'' relation.

many-one relation:
If there is at least one element in B such that more than one elements in set A relate to it AND there no element in A such that more than one elements in set B are related to it, then such a relation is called a ''many-one'' relation.

one-one relation:
If there is no element in A which is related to more than one elements in set B AND there is no element in B such that more than one elements in set A relate to it, then such a relation is called a ''one-one'' relation.


A function (generally denoted by f(x)) is a special case of a relation which relates EVERY element of set A to not more than one element of set B. However every element of B need not be such that some element of A is related to it. Set A is called the domain of the function and set B is called the codomain.
Thus many-one and one-one relations MAY be (not necessarily are) functions but many-many and one-many relations can never be functions.
Those elements of the codomain, to which some element of the domain relate to, form a set called the range of the function.
A function for which range = codomain is called an onto function.
An inverse function exists only for a one-one onto function.

(I hope somebody does read all this )
grhodes_at_work
grhodes_at_work
quote:
Original post by pacman2003
(No grhodes, this is not a homework question. I do not need the derived answer because its already given in the book - this is a SOLVED example.)


It wasn''t the fact that the final answer existed or not that caused me to make that comment. What I meant by my comment was that I didn''t want to see anyone show their derivation of the answer. Many times teachers will assign home work students asking them to find out how to reach the answer in the back---and my concern was that you were asking folks here to figure that derivation out for you.

Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net
Timkin
Timkin
quote:
Original post by Anonymous Poster
That still sounds weird to me. If there exists an inverse for f(x), I can't see how that condition could ever be met, as it seems to contradict the very definition of an inverse function.


Okay, in Euclidean space it would be hard to find such a function if we just thought about typical geometry. One obvious function that comes to mind though: y=Ez(p(z|x)) for stochastic variables x and z. y is not stochastic. Ez is the expectation taken w.r.t z. For nonlinear functions p(), the inverse of this function does not map y back to the original value(s) of x.

I hope this helps to highlight what I was saying above.

Cheers,

Timkin

[edited by - Timkin on January 29, 2004 7:18:43 PM]
Timkin
Timkin
quote:
Original post by Anonymous Poster
I can't see how bringing stochastic variables and nonlinear probability functions into the picture would make an inverse function not being an inverse function.



I think you've misunderstood what I wrote. I'm not talking about an inverse function thats not an inverse. I'm talking about situations where x!=f-1(f(x)). For a function to be onto, it must be the case that x=f-1(f(x)). If this does not hold true, then the function cannot be onto.

quote:
Original post by Anonymous Poster
I would be thrilled though if you would care to explain things a bit further, especially your definition of an inverse function.



My definition of an inverse function is the mathematical definition we all use. That is, take a function y=f(x). The inverse function of f, denoted f-1, is obtained by swapping y for x and x for y (giving x=f(y)) and then rearranging to make y the subject again. The final function is f-1. I'm sure we'd all agree on that, since its a standard definition.

quote:
Original post by Anonymous Poster
Rather, the typical way to put it seems to be that a function is not 'onto' if the range differs from the codomain.



...and how would you describe that mathematically? As above, which is certainly the way that I have seen it presented, both during my education and in literature since. Of course, every book is different and its quite possible that our books differ in their explanation. I'm fairly certain though that we're talking about the same thing (excluding your belief that I'm talking about inverse functions that aren't inverse functions, which I'm not).


quote:
Original post by Anonymous Poster
...would you agree that in pacman2003's example, f(x) is not 'onto', for A=2?



First, let's make it clear that there is obviously a problem with the function as presented. Clearly it does not map R ->R . In fact it maps R /{-0.25,1}->R /{-0.25}.

I may have made an error, however assuming I haven't, then the inverse function I get is:

f-1(x) = 3(x-1)+-5(x+1)
-------------
2(4x+1)


The domain of this function excludes the point -0.25, so the domain of the inverse coincides with the range of the function, namely R /{-0.25}. According to your definition, that makes the function onto. However, is it the case that x=f-1(f(x))? In other words, does the range of the inverse coincide with the domain of the function? The answer is no, since 1 is a valid solution of the inverse but is not in the domain of the original function. Hence I would say that f-1 is not a true inverse and thus f is not onto.

If I'm wrong, would you mind explaining why you believe I am wrong.

Thanks,

Timkin

[edited by - Timkin on January 29, 2004 11:55:22 PM]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.