# Take the function f(x)=2x-x^2 and the open interval P=(0,2) why is f(P)=(0,1]? why is that 1 closed? [closed]

I would think it would be f(P)=(0,1). Why does it include the endpoint?

-

## closed as off-topic by Sjoerd C. de Vries, Yves Klett, Mark McClure, Artes, m_goldbergJul 23 '14 at 16:20

• The question does not concern the technical computing software Mathematica by Wolfram Research. Please see the help center to find out about the topics that can be asked here.
If this question can be reworded to fit the rules in the help center, please edit the question.

Is this question about the software product called Mathematica, or about math? –  Sjoerd C. de Vries Jul 23 '14 at 14:38
Because the function achieves the max value (of 1) at the point x=1 (in the interior of P). –  bill s Jul 23 '14 at 14:45
@SjoerdC.deVries we should have a keyboard shortcut for this case (Ctrl+Alt+M). –  Yves Klett Jul 23 '14 at 14:48

y = 2*x - x^2;

Plot[y, {x, 0, 2}]

Yields:

So the range is (0,1] because 1 is within the range because it happens at f(1)=1. 0 is not actually in the range, because 0 is not in the domain (because (0,2)). But 1 is definitely in the range, because 1 is definitely in the domain.

-