Calculate the line integral of,
$$\vec{F}(x,y)=(x^{2}+y^{2})i+(x^{2}-y^{2})j$$
along the curve described
a) by the equation: $y=1-|1-x|$ from $(0,0)$ at $(2,0)$
b) the closed curve described by the equations $y=1-|1-x|$ and $y=0$ in a counterclockwise direction
I need to expose the exercise
(a) Parametrizing the given curve $\mathscr{C}: x=t, y=t$ $ 0\leq t \leq 1$ $$x=t,y=-t+2, 1 \leq t \leq 2$$
$\implies$ $\int_{\mathscr{C}}\vec{F}.d\vec{R}=\int_{0}^{1}2t^2dt +\int_{1}^{2} 2(2-t)^2 dt$