Question: Let $$y= \frac x{x^2 + 1}$$

So, $yx^2 - x + y = 0$  

or $$x = \frac{1 \pm \sqrt{1-4y^2}}{2y}$$ 

Now since x is real, $(1-4y^2) \geq 0$.
So, we get range $[-1/2,1/2]$

I am a bit confused here. Since x is real, the solutions of x should not have denominator $0$ which means $y$ can't be $0$ ( since the solutions of $x$ we get by quadratic formula have denominator $2y$).

Then why do we include $0$ in range?

Answer: 
You missed the $\frac00$ form in $$x = \frac{1-\sqrt{1-4y^2}}{2y}$$
So this becomes $$\underset{y\to 0}{\lim}\frac{1-\sqrt{1-4y^2}}{2y} = 0$$
What's actually going on is, we have $y=\frac x{1+x^2}$[![enter image description here](https://i.stack.imgur.com/v3Hay.png)](https://i.stack.imgur.com/v3Hay.png) 

and also by your approach
 $$x = \frac{1\pm\sqrt{1-4y^2}}{2y}$$
where the $'+'$ sign results in $x \in (-\infty,-1]\cup [+1,+\infty)$ part of graph because $y\in [-\frac12,+\frac12]-\{0\}$
$$y=\frac12,x=1$$
$$y=-\frac12,x=-1$$
$$y\to 0^+,x\to +\infty$$
$$y\to 0^-,x\to -\infty$$
 and the $'-'$ sign results in $x \in [-1,+1]$ part of graph because $y \in [-\frac12,+\frac12]$. ($0$ being included because of the limit)
$$y=\frac12,x=1$$
$$y=-\frac12,x=-1$$
$$y=0,x=0$$
You may also proceed in the following way:

* $f$ is defined everywhere and obviously $\lim\_{x\to -\infty} f(x) = \lim\_{x\to \infty} f(x) = 0$.
* $f$ is odd: $f(-x) = -f(x)$.

So, it is enough to find the maximum on $[0, \infty)$ which can be easily found using AM-GM:

* $a + b \geq 2\sqrt{ab}$ for $a,b \geq 0$ and equality holds iff $a=b$
$$\stackrel{x\geq 0}{\Longrightarrow} y= \frac x{x^2 + 1} \stackrel {AM-GM}{\leq} \frac{x}{2\sqrt{x^2\cdot 1}} = \frac{1}{2}$$
The maximum of $y = \frac{1}{2}$ is attained for $x= 1$. So, the minimum is $-\frac{1}{2}$ attained at $x= -1$. All together
$$\operatorname{Range}(f) = \left[-\frac{1}{2}, \frac{1}{2}\right]$$