Let X=[-1,1] be the standard distance. I want to show that $T: X \to X$, where $T$ is defined by $T(x) = cos(x)$, is a contraction mapping?
Here's what I've done:
Suppose $T(x)$ is a contraction mapping, then $$|T(x) - T(y) \leq c|x-y|$$ and so $$\left|\frac{T(y) - T(x)}{y-x}\right| \leq c$$ where $c \in [0,1)$ and all $x,y \in [-1,1]$. Since $T$ is differentiable, by mean value theorem, we can have $$\lim_{y\to x}\left|\frac{T(y) - T(x)}{y-x}\right| \leq c$$ and so$ |T(x)| \leq c <1,\forall x \in [-1,1] $
Then I have to take some $x$, where $T'(x) = -\sin(x) =1$
I don't know how to get a contradiction?
First of all, your attempt is backwards. You cannot assume that $T$ is a contraction mapping while you're trying to prove that $T$ is a contraction mapping. So don't start that way; it's circular and trivializes the problem. Secondly, using an argument that involves letting $y$ tend towards $x$ isn't viable; after all, the definition of a contraction map is about all $x, y$; not just close ones.
That being said, here's an approach that still uses the mean value theorem. If $x, y \in [-1, 1]$ with $x < y$ then
$$|Tx - Ty| = |\cos x - \cos y| = |\cos'(c) | \cdot |x - y| = |\sin c| \cdot |x - y|$$
for some $c \in (x, y)$. Now we now that $|\sin c| \le \sin 1 < 1$.
Note: An exercise left for the interested reader is to understand why this is not a contraction mapping on $[-1.6, 1.6]$.