Calculating a directional derivative on the unit circle I am working on the following exercise:

Calculate the derivative for $$f(x,y) = (x^2-2y^2)e^{x^2+y^2}$$ in every point of the unit circle in the direction of the (positively oriented) tangent.

Since $f$ is of the form $f \in \mathcal{C}^1(D,\mathbb{R})$ with $D \subseteq \mathbb{R}^n$ open the function is totally differentiable and thus suffices to calculate $\nabla f \cdot \vec {t}$ where $\vec {t}$ is the tangent vector. 
Since we are in the unit circle we can substitute $x = \cos(t)$ and $y = \sin(t)$ and for the tangent we get $\vec {t}= (-\sin(t),\cos(t))$.
Now we calculate the gradient using the product rule:
\begin{align}
    \nabla f(t) &= \begin{bmatrix}
           2e\cos(t) + (\cos^2(t)-2\sin^2(t)) \cdot 2e\cos(t)\\ 
           -4e\sin(t) + (\cos^2(t)-2\sin^2(t)) \cdot 2e\sin(t)
         \end{bmatrix}\\ 
&= \begin{bmatrix}
2e\cos(t) \cdot (\cos^2(t)-2\sin^2(t))\\ 
           2e\sin(t) \cdot (-2 + \cos^2(t)-2\sin^2(t)
\end{bmatrix}
  \end{align}
I know that we should get $\nabla f \cdot \vec {t} = -3e\sin(2t)$, but I somehow do not arrive at that. Could you help me?
 A: I end up with the result you are supposed to reach. Looking at what you wrote, you forgot a $\cos(2t)$ factor in the first line at the last equality. You should have : 
\begin{align}
    \nabla f(t) &= \begin{bmatrix}
           2e\cos(t) + (\cos^2(t)-2\sin^2(t)) \cdot 2e\cos(t)\\ 
           -4e\sin(t) + (\cos^2(t)-2\sin^2(t)) \cdot 2e\sin(t)
         \end{bmatrix}\\ 
&= \begin{bmatrix}
2e\cos(t) \cdot (cos^2(t)-2\sin^2(t)+1)\\ 
           2e\sin(t) \cdot (-2 + \cos^2(t)-2\sin^2(t))
\end{bmatrix}
  \end{align}
A: Another way to do it is to parametrize the unit circle.  
Let $g(t) = f(\cos t, \sin t)$.  Then the derivative of $f$ in the direction of the tangent is merely $g'(t)$.
Explicitly, 
$$g(t) = e (\cos^2(t) - 2 \sin^2(t))$$
$$= e (\cos^2(t) - 2 (1-\cos^2(t)))$$
$$= e (3\cos^2(t) - 2),$$
so
$$g'(t) = -e\cdot 6\cos(t)\sin(t)= -3\sin(2t).$$
I think that the following claim is true.
Claim: If $h:\mathbb R\rightarrow \mathbb R^n$ and $f:\mathbb R^n \rightarrow \mathbb R$ are continuously differentiable, then the derivative of $f$ in the direction of $h'(t)$ at the point $h(t)$ is $g'(t)/\lVert h'(t)\rVert$ where $g=f\circ h$.
