Function question. Is this correct?

  • Thread starter lionely
  • Start date
  • Tags
    Function
In summary: If you substitute x=0 into the function, you get f(0)=4. If you substitute x=5 into the function, you get f(5)=y. Since y is in the codomain of the function, this confirms that the function is surjective.
  • #1
lionely
576
2

Homework Statement


h:x → 4-x2, x E ℝ

show that it is not surjective(not onto ℝ)

The Attempt at a Solution



Since the line tests fail.

y= 4-x^2

x= √(4-y) = 2√-y

A root of a negative number is not possible so f(x) is not surjective onto R
 
Physics news on Phys.org
  • #2
lionely said:

Homework Statement


h:x → 4-x2, x E ℝ

show that it is not surjective(not onto ℝ)

The Attempt at a Solution



Since the line tests fail.
If it fails the horizontal line test (meaning that a horizontal line intersects two or more points on the graph), that means that the function is not one-to-one. What did you mean?

Do you understand the definition of "onto" (or surjective)?
lionely said:
y= 4-x^2

x= √(4-y) = 2√-y
What are you doing here? When you solve for x, you should get two values; namely, x = ±√(4 - y). Also, it is NOT true that √(4-y) = 2√-y.
lionely said:
A root of a negative number is not possible so f(x) is not surjective onto R
 
  • #3
I meant when I did the line tests it looked like the function was injective and surjective

and hm... I'm not too sure about the 2nd part now umm
x=±√(4-y) if y is like 3 x is a real number..
 
  • #4
For the function y = x2 - 4 to be onto the real numbers, it must be true that any choice of y is paired with some value of x.

Have you graphed this equation? That would probably give you a good idea about whether it is onto the reals. That wouldn't be proof, but it would get you thinking the right way.
 
  • #5
I only sketched a graph,
 
  • #6
lionely said:
I only sketched a graph,

Ok, then what's a value in R that x^2-4 can never equal?
 
  • #7
lionely said:
x=±√(4-y) if y is like 3 x is a real number..
Sure, but to be surjective on ℝ the inverse must have a solution for all real y. Does it?
 
  • #8
No y is not surjective for the positive Real numbers though..

"Ok, then what's a value in R that x^2-4 can never equal? "

Umm I'm not sure..
 
  • #9
lionely said:

Homework Statement


h:x → 4-x2, x E ℝ

show that it is not surjective(not onto ℝ)

The Attempt at a Solution



Since the line tests fail.

y= 4-x^2

x= √(4-y) = 2√-y

A root of a negative number is not possible so f(x) is not surjective onto R
Almost correct. First, as Mark44 said, it should be "[itex]\pm[/itex]" and surely you know that "4- y" is NOT "4 times -y"! [itex]x= \pm\sqrt{4- y}[/tex]. Now, can you find a value of y so that 4- y< 0?
 
  • #10
Can't 5 make it <0?
 
  • #11
lionely said:
Can't 5 make it <0?

If you mean there is no real value of x such that 4-x^2=5, that would be correct.
 
  • #12
But aren't negative numbers be.. real?
 
  • #13
lionely said:
Can't 5 make it <0?
Of course, but HofI wasn't suggesting you could not. Halls just said, find such a value of y. Now, having found it, what value of x will be mapped to this y?
 
  • #14
If x=-4 that could make f(x) < 0
 
  • #15
lionely said:
If x=-4 that could make f(x) < 0
You are not trying to make f(x) < 0. Go and look at Halls' post again. You were trying to make 4-y < 0. You correctly found that y=5 would do that. Now the question is whether you can find an x that makes f(x) = 5. If no such x exists then f is not surjective.
 
  • #16
Oh well it's not surjective then because I can't think of any value... If this is the answer I'm sorry for being so difficult, I need MUCH more practice in functions..
 
  • #17
Your notation for the function definition isn't correct, I think.

I believe you meant [itex]f : \mathbb{R} \rightarrow \mathbb{R}, x \in \mathbb{R} \mapsto 4 - x^2[/itex].

Here, [itex]\mathbb{R}[/itex] is both the domain and codomain of [itex]f[/itex].

Surjectivity is the property that the image of the domain of [itex]f[/itex], which is defined and denoted to be [itex]f[\mathbb{R}]=\{f(x) : x \in \mathbb{R}\}[/itex], equals the codomain of [itex]f[/itex].

Thus, we want to see if we can generate all the real numbers with [itex]f[/itex].

Analytically, this function is a parabola starting at [itex](0,4)[/itex] and opening down. What does this imply, then?

Also, a algebraic argument can provide a solution. Suppose [itex]y \in \mathbb{R}[/itex] is some value in the codomain of [itex]f[/itex]. Furthermore, suppose that there exists some value [itex]x \in \mathbb{R}[/itex] in the domain of [itex]f[/itex] such that [itex]f(x)=4-x^2=y[/itex]. If you solve for [itex]y[/itex], what do you discover?
 
  • #18
Umm that Y is > or equal to 4 no matter number you use?
 
  • #19
lionely said:
Umm that Y is > or equal to 4 no matter number you use?

What is your reasoning? Substitute some values for [itex]x[/itex] into [itex]f[/itex] and see what you get, or what you can't get. Does your answer change? Even better, use graphing software to visualize [itex]f[/itex], and then everything should be pretty clear. (Example, search "wolframalpha" into a search engine and type "f(x) = 4 - x^2" into the search bar on the website. A graph over a restricted amount of points will be generated. Personally, I would recommend solving this algebraically, but analytically is totally fine, too.)
 
  • #20
But solving it alebraically isn't it this??

y= 4-x^2
x^2= 4-y
x= sqrt(4-y)

putting in y=5 x would = sqrt(-1) so... it's not surjective as the codomain doesn't equal the range?
 
  • #21
lionely said:
But solving it alebraically isn't it this??

y= 4-x^2
x^2= 4-y
x= sqrt(4-y)
The line above should be x = ±sqrt(4-y)

lionely said:
putting in y=5 x would = sqrt(-1) so... it's not surjective as the codomain doesn't equal the range?
In other words, if y = 5, there is no real value of x for which 4 - x2 = 5.

As you said earlier(or at least, alluded to), the range of the function y = 4-x2 is the set {y | y ≤ 4}. This should be enough to convince anyone that this function is not onto the reals.
 
  • #22
lionely said:
But solving it alebraically isn't it this??

y= 4-x^2
x^2= 4-y
x= sqrt(4-y)

putting in y=5 x would = sqrt(-1) so... it's not surjective as the codomain doesn't equal the range?

Do you mean letting [itex]y=5[/itex]? If so, then yes, you get [itex]\pm \sqrt{-1}[/itex], which is not a real number, and therefore there does not exist any [itex]x[/itex] in the domain of [itex]f[/itex] such that [itex]f(x)=5[/itex]. Consequently, the range of [itex]f[/itex] does not include [itex]5[/itex], for example. That is enough to show that surjectivity is not held by [itex]f[/itex], as the set of real numbers (the domain) does not equal the set of real numbers missing [itex]5[/itex] (the codomain) (of course, it missed more than just [itex]5[/itex]).

Recall you said [itex]f[/itex] attains all numbers greater than or equal to [itex]5[/itex] only--do you see the error now?

Also, recall that taking the square root always requires one to put a plus or minus [itex]\pm[/itex] sign in front of the root. Why? Well, for any number [itex]x[/itex] such that the square root of it is defined, we have both [itex](\sqrt{x})^2 = x[/itex] and [itex](-\sqrt{x})^2 = x[/itex].
 

What is a function and how is it used?

A function is a block of code that performs a specific task and can be reused multiple times in a program. It is used to break down a large program into smaller, more manageable pieces and improve code readability. Functions also help with code organization and reduces the risk of errors.

What are the components of a function?

A function has three main components: the function name, the parameters, and the function body. The function name is used to call the function, the parameters are inputs that the function can use, and the function body contains the code that is executed when the function is called.

How do I know if my function is correct?

The best way to determine if your function is correct is to test it with different inputs and compare the results to what you expect. You can also use debugging tools to step through your code and check for any errors or unexpected behavior.

Can a function return multiple values?

Yes, a function can return multiple values by using the return statement with multiple variables separated by commas. The values will be returned as a tuple, which can then be unpacked and used in the calling code.

What is the difference between a function and a method?

Functions and methods are both blocks of code that perform a specific task, but they differ in how they are called. Functions are independent and can be called without an object, while methods are associated with objects and can only be called on that specific object. Methods also have access to the object's data.

Similar threads

  • Precalculus Mathematics Homework Help
Replies
3
Views
1K
  • Precalculus Mathematics Homework Help
Replies
15
Views
612
  • Precalculus Mathematics Homework Help
Replies
4
Views
2K
  • Precalculus Mathematics Homework Help
Replies
7
Views
372
  • Precalculus Mathematics Homework Help
Replies
13
Views
277
  • Precalculus Mathematics Homework Help
Replies
12
Views
1K
  • Precalculus Mathematics Homework Help
Replies
3
Views
589
  • Precalculus Mathematics Homework Help
Replies
11
Views
491
  • Precalculus Mathematics Homework Help
Replies
7
Views
2K
  • Precalculus Mathematics Homework Help
Replies
7
Views
753
Back
Top