Problem: Compute the following line integral:
\begin{align*}\int_{\gamma}^{} |z|^2 \,dz, \end{align*}
where $\gamma$ is the line segment from 2 to 3 + i
\begin{align*}
\end{align*}
Answer:
\begin{align*}
\gamma(t)&= (1-t)z_0+tz_1\\
&= 2(1-t)+(3+i)t\\
&= 2-2t+3t+it\\
&= 2+t+it \ \ \ \ (0 \leq t \leq 1)\\
\\
\gamma'(t)&=1+i\\
\\
Let\ f(z)=|z|^2\\
\\
f(\gamma(t))&= |\gamma(t)|^2\\
&=(\sqrt{(2+t)^2+t^2})^2\\
&=4+4t+t^2+t^2\\
&=2t^2+4t+4\\\
\\
\int_{\gamma}^{} |z|^2 \,dz &= \int_{\gamma}^{} f(z) \,dz\\
&=\int_{0}^{1} f(\gamma(t))\ \gamma'(t) \,dt\\
&=\int_{0}^{1} (2t^2+4t+4) (1+i) \,dt\\
&=(1+i)\int_{0}^{1} (2t^2+4t+4) \,dt \\
&=(1+i)(\frac{2}{3}t^3 + 2t^2 +4t)|_{0}^{1}\\
&=(1+i)(\frac{2}{3} + 2 +4)\\
&=\frac{20}{3}(1+i)
\end{align*}