Finding derivative of $\frac{x}{x^2+1}$ using only the definition of derivative I think the title is quite self-explanatory. I'm only allowed to use the definition of a derivative to differentiate the above function. Sorry for the formatting though.

Let $f(x) = \frac{x}{x^2+1}$
$$
\begin{align}
f'(x)&= \lim_{h\to 0} \frac {f(x+h)-f(x)}{h}\\
&= \lim_{h\to 0} \frac {\frac{x+h}{(x+h)^2+1}-\frac{x}{x^2+1}}{h}\\
&= \lim_{h\to 0} \frac{\frac{x+h}{x^2+2hx+h^2+1}-\frac{x}{x^2+1}}{h}\\
&= \lim_{h\to 0} \frac{\frac{(x+h)(x^2+1)-x(x^2+2hx+h^2+1)}{(x^2+1)(x^2+2hx+h^2+1)}}{h}\\
&= \lim_{h\to 0} \frac{\frac{hx^2-2hx-h^2+h}{(x^2+1)(x^2+2hx+h^2+1)}}{h}
\end{align}
$$

I'm currently stuck with simplify the fraction so that I can finally find the derivative. I'd really appreciate some advice on how to proceed with the problem. 
 A: \begin{eqnarray}
{1 \over h } ({x+h \over 1 + (x+h)^2} - {x \over 1+x^2}) &=&
{1 \over h } { (x+h)(1+x^2) - (1+(x+h)^2)x\over (x+x^2) (1 + (x+h)^2} \\
&=& {1 \over h } { h -h x^2 - h^2 x\over (x+x^2) (1 + (x+h)^2} \\
&=& { 1 - x^2 - h x\over (x+x^2) (1 + (x+h)^2}
\end{eqnarray}
The limit follows by taking $ h \to 0$.
A: 
Your last step is wrong, the actual steps will be,

$$=\lim_{h\to 0} \frac{\frac{-\color{red}{(hx^2-h+h^2x)}}{(1+x^2)(x^2+2hx+h^2+1)}}{\color{red}{h}}$$
$$=\lim_{h\to 0} \frac{\frac{-\color{blue}{(x^2-1+hx)}}{(1+x^2)(x^2+2hx+h^2+1)}}{\color{blue}{1}}$$

$$=\frac{1-x^2}{(1+x^2)^2}$$

A: \begin{align}
   f'(x)
&= \lim_{h\to 0} \frac {f(x+h)-f(x)}{h}\\
&= \lim_{h\to 0} \frac {\frac{x+h}{(x+h)^2+1}-\frac{x}{x^2+1}}{h}\\
&= \lim_{h\to 0} \frac{(x+h)(x^2+1)-x((x+h)^2+1)}{h(x^2+1)((x+h)^2+1)}\\
&= \lim_{h\to 0} \frac{h - h^2x - hx^2}{h(x^2+1)((x+h)^2+1)}
\end{align}

 $$= \lim_{h\to 0} \frac{1 - hx - x^2}{(x^2+1)((x+h)^2+1)}$$
  $$=\frac{1 - x^2}{(x^2+1)^2}$$

There are two common ways to compute a derivative. This is the other.
\begin{align}
   \left. f'(x) \right|_{x=x_0}
   &= \lim_{x\to x_0} \frac {f(x)-f(x)}
                            {x-x_0}\\
   &= \lim_{x\to x_0} \frac {\frac{x}{x^2+1}-\frac{x_0}{x_0^2+1}}
                            {x-x_0}\\
   &= \lim_{x\to x_0} \frac {x(x_0^2+1)-x_0(x^2+1)}
                            {(x^2+1)(x_0^2+1)(x-x_0)}\\
   &= \lim_{x\to x_0} \frac {(x x_0^2 - x_0 x^2) + (x-x_0)}
                            {(x^2+1)(x_0^2+1)(x-x_0)}\\
   &= \lim_{x\to x_0} \frac {-x x_0(x-x_0) + (x-x_0)}
                            {(x^2+1)(x_0^2+1)(x-x_0)}\\
   &= \lim_{x\to x_0} \frac {-x x_0 + 1}
                            {(x^2+1)(x_0^2+1)}\\
   &= \frac{1-x_0^2}
           {1+(x_0^2)^2}\\
\end{align}
