Suppose there is a function, $$f(x) = \frac{x}{1 + x^2}$$ And we have to find its domain and range. So first I calculated the domain:-
Since the denominator of f(x) is always greater than 0 for all x belongs to Real numbers(R). So the domain of the function is the set of real numbers i.e. $$domain(f) = R$$ Then to find the range I did the following:- Let $$y = f(x)$$. Then, $$y = f(x)$$ $$y = \frac{x}{1 + x^2}$$ $$x^2y-x+y=0$$ $$x^2-\frac{x}{y}+1=0$$ Then, By quadratic formula:- $$x=\frac{\frac{1}{y}\pm\sqrt{\frac{1}{y^2}-4}}{2}$$ Solving which we get:- $$x=\frac{1\pm\sqrt{1-4y^2}}{2y}$$ Clearly x will get real values, if $$1-4y^2\ge0$$ $$and$$ $$y\ne0$$ Implies that, $$4y^2-1\le0 \quad \text{and} \quad y\ne0$$ Implies that, $$y^2-\frac{1}{4}\le0 \quad \text{and} \quad y\ne0$$ Implies that, $$(y-\frac{1}{2})(y+\frac{1}{2})\le0 \quad \text{and} \quad y\ne0$$ Implies that, $$-\frac{1}{2}\le y\le\frac{1}{2} \quad \text{and} \quad y\ne0$$ Implies that, $$y\in \left[-\frac{1}{2}, \frac{1}{2} \right] - \{0\}$$
This means that the set of range contains all real values from -1/2 to 1/2 excluding 0 and the domain contains all the real values. Since the domain contains all the real values so when we put x = 0 in f(x) then we get 0 but the set of range does not contain 0. How is this possible, what am I missing? Any help is appreciated.
You're close. However, you've missed something. When you solved $yx^2-x+y=0$, because you used the quadratic formula, you implicitly assumed that that was a quadratic equation. That is the reason you're getting $y\neq0$ as part of your constraints. The original equation is very much solvable for $y=0$, so $\{0\}$ is contained in the range.
Other than that, it looks good.