Yes, it is fine, except that you forgot to multiply by $2\pi i$ at the last line. The answer is $\pi\bigl(\cos(4+i)-\cos(4-i)\bigr)$.
Yes, it is fine, except that you forgot to multiply by $2\pi i$ at the last line. The answer is $\pi\bigl(\cos(4+i)-\cos(4-i)\bigr)$.