# How do you find the domain and range of f(x) = -x^2 + 2x + 1?

Jul 12, 2016

Domain of $f = \mathbb{R}$

Range of $f = \left(- \infty , 2\right] .$

#### Explanation:

$f \left(x\right) = - {x}^{2} + 2 x + 1 = - {x}^{2} + 2 x - 1 + 2 = 2 - {\left(x - 1\right)}^{2.}$

Since, $x$ can take any value from RR, we find that the Domain of $f = {D}_{f} = \mathbb{R} .$

Now, we notice that, $\forall x \in \mathbb{R} , {\left(x - 1\right)}^{2} \ge 0 \Rightarrow - {\left(x - 1\right)}^{2} \le 0 ,$ and, adding $2$, $2 - {\left(x - 1\right)}^{2} \le 2 ,$ i.e., $f \left(x\right) \le 2 ,$ or, $f \left(x\right) \in \left(- \infty , 2\right] .$

Now, the Range of $f = {R}_{f} = \left\{f \left(x\right) : x \in {D}_{f} = \mathbb{R}\right\} ,$, it will be clear from above , that ${R}_{f} \subseteq \left(- \infty , 2\right] .$

Our next goal is to show that $\left(- \infty , 2\right] \subseteq {R}_{f} .$, which, altogether, will prove that ${R}_{f} = \left(- \infty , 2\right] .$

To this end, let $y \in \left(- \infty , 2\right] , y$ arbitrary. We will show that, corresponding to this $y , \exists$ at least one $x \in {D}_{f} = \mathbb{R} ,$ such that, $f \left(x\right) = y$, meaning that $y \in {R}_{f}$.

define $x$ by, $x = 1 + \sqrt{2 - y}$. As $y \in \left(- \infty , 2\right] , y \le 2 , \left(2 - y\right) \ge 0$, & hence, $x = 1 + \sqrt{2 - y}$ does exist in $\mathbb{R}$

It remains to be shown that $f \left(x\right) = y$, which is done as below:-

$f \left(x\right) = 2 - {\left(x - 1\right)}^{2} = 2 - {\left\{\left(1 + \sqrt{2 - y}\right) - 1\right\}}^{2} = 2 - {\left(\sqrt{2 - y}\right)}^{2} = 2 - \left(2 - y\right) = y .$

Hence, the Proof that ${R}_{f} = \left(- \infty , 2\right] .$

I hope, this will be helpful! Enjoy maths.!