Surjective function: Discrete Maths 
How to know whether this function is surjective or not? I know that we have represent x in terms of y and then substitute some value of y for which the domain of x is not satisfied, but for this sum, how to represent x in terms of y? 
 A: The function is surjective if the equation $x^2+2x-y=0$ has real solutions no matter what real value y takes.
Take $y=-2$ and the equation does not have real roots. Therefore the function $y=x^2+2x$ is not surjective.
A: Note the definition of surjectivity:

For a function $f:A\to B$ to be surjective, we need that for every $y \in B$ there exists an $x\in A$ such that $f(x) = y$.

If $f$ is a function such that $$f:\mathbb R \to \mathbb R$$ $$f(x) = x^2 + 2x,$$ then note that if $f$ were surjective, we should be able to take any number (let's say) $-5\in \mathbb R$ (which is our $B$ here) such that an $x\in \mathbb R$ (which is also our $A$) makes $f(x) = -5$. But can $f$ ever reach $-5$?
A: As far as I understand, the purpose of this exercise is to use familiar functions to help students develop a better understanding of the concept of surjectivity. One idea is that for functions $y=f(x)$ from $\color{blue}{\mathbb{R}}$ to $\color{magenta}{\mathbb{R}}$, you can use the usual graph of the function to see if the function is surjective or not.
Plot the graph of $y=f(x)$, such as $y=x^2+2x$ in this example (I bet you know its shape), and see what its range is. Such a function is surjective precisely when for each $y\in\color{magenta}{\mathbb{R}}$ there's at least one point $x\in\color{blue}{\mathbb{R}}$ such that $f(x)=y$. That's a mouthful, but it's the same as saying that the range of the function is the entire $\color{magenta}{\mathbb{R}}=(-\infty,+\infty)$. For functions in the Cartesian $x,y$-plane, it's the Horizontal Line Test.
