# Show that $f ([-2, 1]) = f([0, 2])$ given a function $f (n)$

We are given $f(n) = 10 + n^2$.

How would I show that show that $f ([-2, 1]) = f([0, 2])$ using set theory?

By the derivative of the function $f$: $$f'(x)=2x$$ we see easily that $f$ is decreasing on the interval $(-\infty,0)$ and increasing on the interval $[0,+\infty)$ so:

$$f([-2,1])=f([-2,0]\cup[0,1])=[f(0),f(-2)]\cup[f(0),f(1)]=[10,11]\cup[10,14]=[10,14]$$ and $$f([0,2])=[f(0),f(2)]=[10,14]$$ and then we conclude the desired result.

A bit of a circuitous method but uses the standard proof of equality of sets (i.e. $A\subseteq B$ and $B\subseteq A$ implies $A=B$).

Clearly, $f([-2,0])\subseteq f([-2,1])$. Now, since $f(n)$ is even, $f([-2,0]) = f([0,2])$. So $f([0,2]) \subseteq f([-2,1])$.

To show $f([-2,1]) \subseteq f([0,2])$ we note that $f([-2,1])\subseteq f([-2,2])$. Since again $f$ is even we have $f([-2,1]) \subseteq f([-2,2]) = f([-2,0]) = f([0,2])$ as required.

Hint: try showing that $f([-2, 1]) \subseteq f([0, 2])$ and $f([0, 2]) \subseteq f([-2, 1])$. What does an element of each look like?

Set $I_1=[-1,0)$ and $I_2=[0,2]$. Since $f$ is even, $f(A)=f(-A)$ for any set $A$. Thus $$f([-2,1])=f([-1,2])=f(I_1\sqcup I_2)=f(I_1)\cup f(I_2)=f(-I_1)\cup f(I_2)=f(I_2)=f([0,2])$$ since $-I_1\subset I_2$.