<s>[INST] Find the domain and range of $f(x) = \frac{x+2}{x^2+2x+1}$: The domain is: $\forall x \in \mathbb{R}\smallsetminus\{-1\}$
The range is: first we find the inverse of $f$:
$$x=\frac{y+2}{y^2+2y+1} $$
$$x\cdot(y+1)^2-1=y+2$$
$$x\cdot(y+1)^2-y=3 $$
$$y\left(\frac{(y+1)^2}{y}-\frac{1}{x}\right)=\frac{3}{x} $$
I can't find the inverse... my idea is to find the domain of the inverse, and that would then be the range of the function. How to show otherwise what is the range here?
 [/INST] Alternate way to find the range : 
$$f(x) = y =\frac{x+2}{x^2+2x+1}$$
$$yx^2+(2y-1)x+(y-2)=0  $$
Now this quadratic has real roots (since real points exist belonging to the function for all values of x (we can remove the case of -1 later)) . So applying the condition for real roots : ($b^2-4ac \geq 0$)
$$(2y-1)^2-4(y)(y-2)\geq0$$
$$-4y+1 +8y\geq0$$
$$y\geq\frac{-1}{4}$$
$$y \in  \left[ -\frac{1}{4},\infty \right)$$
Now the value of $y$ at $x=-1$ $\to \infty$ so no need to remove it from the range
</s>