Compute $\int_{\gamma} \nabla f \cdot d\mathbf{x}$ Compute $\int_{\gamma} \nabla f \cdot d\mathbf{x}$ for the following choices of $f$ and $\gamma$.
(a) $f(x,y) = x^2+y^2; \gamma:g(t) = (1+t^2, 1-t^2), -1 \le t \le2$
What I have tried:
$$\int_{-1}^2(1+t^2)^2dx + \int_{-1}^2(1-t^2)^2dy$$
Where $dx = 2t$ and $dy = -2t$
So we have
$$\int_{-1}^2(1+t^2)^2(2t)dt + \int_{-1}^2(1-t^2)^2(-2t)dt$$
however this outputs the wrong result. How do I proceed from here>?

For $f(x,y) = x^2+y^2$ we have
$$ \nabla f. X = 2(x^2+y^2)$$
Thus,
$\begin{array}{ccl} 
\displaystyle\int_{\gamma}  \nabla f. X ds &=& 2 \displaystyle\int_{\gamma}   (x^2+y^2) ds\\
&=& 2 \displaystyle\int_{-1}^{2}  ((1+t^2)^2+(1-t^2)^2) \sqrt{8t^2} dt\\
&=& 2 \sqrt{8} \left( - \displaystyle\int_{-1}^{0}  ((1+t^2)^2+(1-t^2)^2) t  dt +\displaystyle\int_{0}^{2}  ((1+t^2)^2+(1-t^2)^2) t  dt \right) \\
&=& 8\sqrt{2} \left(-\displaystyle\int_{-1}^{0}  t^5+tdt+\displaystyle\int_{0}^{2}t^5+tdt \right) \\
&=&96\sqrt{2}. 
\end{array}$
