How to compute complex line integral I am wondering how to compute the line integral of
$$
\mathrm{g}\left(z\right) = z\left(z^{\ast}\right)^{2} - \cos\left(z\right)\quad
\mbox{over the curve}\quad 
\,\mathrm{y}\left(t\right) = \cos\left(2t\right ) + \sin\left(2t\right)\,\mathrm{i}\,,\quad 0 \leq t \leq {\pi \over 2}
$$
where $z^{\ast}$ denotes the complex conjugate of $z$.
I am given that the answer is
$\pi\mathrm{i} + \sin\left(1\right) - \sin\left(1\right)$
$$
\mbox{What I tried, I tried noting that the  integral can be }\quad
\int_{0}^{\pi/2}\mathrm{g}\left(\mathrm{y}\left(t\right)\right)\,\mathrm{y}'\left(t\right)\,\mathrm{d}t
$$
where
$\,\mathrm{g}\left(\mathrm{y}\left(t\right)\right) =
\mathrm{e}^{-2\mathrm{i}t} - \cos\left(\mathrm{e}^{2\mathrm{i}t}\right)\quad\mbox{and where}\quad \mathrm{y}'\left(t\right) = -2\sin\left(2t\right) + 2\cos\left(2t\right)\mathrm{i}$.
But then I get stuck on computing next, because I have so many terms multiplying , some containg i and some not, some containing exponentials, setc, so I dont know how to proceed, is there something I  am missing? Or can anyone help show me how the answer was gotten? Is this on the right track?
Thanks
 A: $\newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
\begin{align}
z & = \expo{2\ic t}\implies
\left\{\begin{array}{rcl}
\ds{\mrm{g}\pars{z}} & \ds{=} & \ds{\expo{-2\ic t} - \cos\pars{\expo{2\ic t}}}
\\
\ds{\totald{z}{t}} & \ds{=} & \ds{\expo{2\ic t}\pars{2\ic}}
\end{array}\right.
\end{align}
The integral becomes:
\begin{align}
&\int_{0}^{\pi/2}\bracks{\expo{-2\ic t} - \cos\pars{\expo{2\ic t}}}
\bracks{\expo{2\ic t}\pars{2\ic}}\,\dd t =
2\ic\int_{0}^{\pi/2}\,\dd t - \int_{0}^{\pi/2}\cos\pars{\expo{2\ic t}}
\bracks{\expo{2\ic t}\pars{2\ic}}\,\dd t
\\[5mm] & =
2\ic\,{\pi \over 2} - \bracks{\sin\pars{\expo{2\ic t}}}_{\ 0}^{\ \pi/2} =
\pi\ic - \sin\pars{-1} + \sin\pars{1} =
\bbox[10px,border:1px groove navy]{\ds{2\sin\pars{1} + \pi\ic}}
\end{align}
