Proving that $f: [0,1] \rightarrow [0,1]$ with $f(x)=\ln(\frac{x^2}{2}+2)$ is a contraction:
By the mean value theorm $f$ is continuous on $[0,1]$ and differentiable on $]0,1[$ so $\exists c \in ]0,1[$ such that $f(x)-f(y)=f'(c)(x-y)$ or $f'(x)=\frac{2x}{x^2+4}$
we know that $c \in ]0,1[ \implies 0<c<1 \implies \frac{2c}{5} < f'(c) < \frac{c}{2}$ (after doing some calculations)
So using the MVT we get $|f(x)-f(y)|=\frac{2c}{c^2+4}|x-y| \implies |f(x)-f(y)|<\frac{c}{2}|x-y|$ So $f$ is a contraction and $k=\frac{c}{2} \in [0,1]$
But don't we need $|f(x)-f(y)| \leq k|x-y|$ to prove that $f$ is a contraction ?
- Is this proof valid or did I mess up somewhere ?
- Can I use this $|f(x)-f(y)| < k|x-y|$ to prove that $f$ is a contraction instead of less or equal?
Your argument is in the right direction but you haven't actually declared what the constant is in the definition of contraction mapping. $k=c/2$ is not a constant since $c$ depends on what pair $(x,y)$ we choose. Continuing your argument, $c\in (0,1)$, so $k=c/2\leq 1/2$. Hence, $|f(x)-f(y)|\leq k|x-y|\leq \frac 12|x-y|$ with constant $1/2$.
We can find a smaller constant, though. Taking the derivative of $f'(x)$, we find it's increasing on $[0,1]$, and $f'(0)\leq f'(x)\leq f'(1)\Leftrightarrow 0\leq f'(x)\leq\frac 25$. Hence, $|f(x)-f(y)|=f'(c)|x-y|\leq\frac 25|x-y|$.
As for the second question, $A<B$ implies $A\leq B$. So if you've shown the strict inequality, you've also shown the non-strict one.