Show that total energy is conserved Question is as followed

$\textbf{F} = f(r) \textbf{r}$ where $r = |\textbf{r}|$
$$U(r) = -\int rf(r)dr$$
$$K=\frac{1}{2} m|\textbf{v}|^2$$
Show that $E=K+U$ is constant by deriving in terms of $t$.

I tried for quite a bit and couldn't find it. I put the derivative of $\frac{dU(r)}{dt}$ into Wolframalpha and found that I was deriving $U$ incorrectly. I'm hoping someone can explain how to derive $U$ correctly. I was able to solve it after getting $\frac{dU}{dt}$.
My attempt was:
$$\frac{dU}{dt} = -r'f(r)-rf'(r)r' $$
Apologies for the poor formatting, I'm a little new to this. Thanks everyone.
Edit: Not sure if this will help but a pic of the question is here. http://i.imgur.com/25xypFi.png
 A: By Newton's second law, $\mathbf{F} = m\mathbf{\ddot{r}}$. By the chain rule,
$$\frac{dK}{dt} = \frac{1}{2}m\frac{d}{dt}(\mathbf{\dot{r}} \cdot \mathbf{\dot{r}}) = \frac{1}{2}m(2\mathbf{\ddot{r}} \cdot \mathbf{\dot{r}}) = m\mathbf{\ddot{r}}\cdot \mathbf{v} = \mathbf{F} \cdot \mathbf{v}$$
and
$$\frac{dU}{dt} = U'(r) \frac{dr}{dt} = -f(r)r\, \frac{d}{dt} \sqrt{\mathbf{r} \cdot \mathbf{r}} = -f(r)r\, \frac{1}{2\sqrt{\mathbf{r}\cdot \mathbf{r}}}\frac{d}{dt}(\mathbf{r} \cdot \mathbf{r}) = \frac{-f(r)}{2}(2\mathbf{r}\cdot \mathbf{\dot{r}}) = -\mathbf{F}\cdot \mathbf{v}$$
Hence
$$\frac{dE}{dt} = \frac{dK}{dt} + \frac{dU}{dt} = \mathbf{F}\cdot \mathbf{v} - \mathbf{F}\cdot \mathbf{v} = 0$$
showing that $E$ is constant.
A: The definition of $U$ is
$$ U(r) = -\int \textbf{F}\cdot d\textbf{r}$$
Since $\textbf{F}$ is always in the same direction as $\textbf{r}$, we can simplify it to
$$ U(r) = - \int F\,dr$$
By the Fundamental Theorem of Calculus
$$\frac{dU}{dr} = -\frac{d}{dr}\int F\,dr = -F = -ma $$
By the chain rule
$$ \frac{dU}{dt} = \frac{dU}{dr}\cdot \frac{dr}{dt} = -mav $$
You also have
$$\frac{dK}{dt} = \frac{d}{dt}\left( \frac{1}{2} mv^2 \right) = mv\,\frac{dv}{dt} = mva$$
EDIT: Following the question's definition, we have
$$\frac{dU}{dr} = -\frac{d}{dr}\int r\,f(r)\,dr = -r\,f(r) = -|\textbf{F}| = -F$$
And the rest stays the same
