Example 4. Calculate the integral

$$
\int_{1-i}^{2+i}\left(3 z^{2}+2 z\right) d z
$$
Solution. Since the integrand $f(z)=3 z^{2}+2 z$ is analytic everywhere, we can apply the Newton-Leibniz formula to find

$$
\int_{1-i}^{2+i}\left(3 z^{2}+2 z\right) d z=\left.\left(z^{3}+z^{2}\right)\right|_{1-i} ^{2+i}=(2+i)^{3}+(2+i)^{2}-(1-i)^{3}-(1-i)^{2}=7+19 i
$$