<s>[INST] Proving that a function is bijective I have trouble figuring out this problem:
Prove that the function $f: [0,\infty)\rightarrow[0,\infty)$ defined by $f(x)=\frac{x^2}{2x+1}$ is a bijection. 
Work: First, I tried to show that $f$ is injective. $\frac{a^2}{2a+1}=\frac{b^2}{2b+1}$
I got $a^2(2b+1)=b^2(2a+1)$. However, I get stuck here and cannot simplify the equation to get $a=b$, which would prove that the function is injective. 
 [/INST] Notice $f(x) = \frac{x^2}{2x+1} = \frac{x}{2 + \frac{1}{x}}$. Suppose $f(a) = f(b) $, then
$$ \frac{a}{2 + \frac{1}{a} } = \frac{b}{2 + \frac{1}{b}} \iff \frac{a}{b} = \frac{ 2 + \frac{1}{a}}{2 + \frac{1}{b}}$$
We want to show that $a = b$. Suppose not. then either $a > b $ or $b >a $. 
Say $a > b $. Then $\frac{1}{b} > \frac{1}{a}$. and so
$$ \frac{a}{b} = \frac{ 2 + \frac{1}{a}}{2 + \frac{1}{b}} < \frac{ 2 + \frac{1}{b}}{2 + \frac{1}{b}} = 1 \implies a < b \; \; \text{contradiction} $$
Now, say $b > a $. then $\frac{1}{a} > \frac{1}{b} \implies \frac{1}{a} + 2 > \frac{1}{b} + 2 \implies \frac{ 2 + \frac{1}{a}}{2 + \frac{1}{b}} > 1 \implies \frac{a}{b} > 1 \implies a > b $ contradiction. Hence
$a= b$ and $f$ must be injective.
</s>