Question 1. Is this correct? I have to evaluate
$\int_{\gamma}x^2+y^2 dz$, where $\gamma$ is the line segment from $i+2$ to $-i-1$
Step 1: Equation of line passing through $(2,1)$ and $(-1,-1) $is $y=\frac{2x-1}{3}$. Then, the line segment in the direction from $-i-1$ to $i+2$ is $\psi(t)=[t,\frac{2t-1}{3}]$, $\psi:[-1,2] \to \mathbb R^2$ (or $\mathbb C$).
Step 2: Thus, to have $\psi = -\gamma$, where the negative indicates opposite direction s.t. $\gamma$ is the line segment in the direction from $i+2$ to $-i-1$, we do $\gamma(a+b-t)=:-\gamma(t)=\psi(t)$, where $a=-1,b=2$.
Step 3 Solving for $\gamma(t)$, we get $\psi(a+b-t)=\gamma(t)$. Hence, $\gamma(t)=[1-t,\frac{2(1-t)-1}{3}]$, $\gamma:[-1,2] \to \mathbb R^2$ (or $\mathbb C$).
Step 4: Therefore, $\int_{\gamma}x^2+y^2 dz$
$$= \int_{-1}^2 ((1-t)^2+(\frac{2(1-t)-1}{3})^2) [(-1)+i(-\frac23)]dt$$
$$ = \int_{-1}^2 ((1-t)^2+(\frac{2(1-t)-1}{3})^2) [(-1)]dt$$
$$+i \int_{-1}^2 ((1-t)^2+(\frac{2(1-t)-1}{3})^2) [(-\frac23)]dt$$
$$=...\text{(easy to check wolfram. see below)}$$
$$= -4+i(\frac{-8}{3})$$
Wolfram: real part. imaginary part.
Question 2. Btw $x^2+y^2 = |z|^2$ right?