How to Evaluate $\int_1^4 (\frac{1}{2t}+i)^2 dt$ Question:

$$\int \limits _1^4\left (\frac{1}{2t}+i \right )^2\,dt.$$

How can I solve this? I believe its an indefinite integral and I can probably expand it by using $(a+b)^2=a^2+2ab+b^2$ to get something like$$\int \frac{1}{4t^2}+\frac{2i}{2t}+i^2\,dt$$but I'm not even sure if that's right.

We have
\begin{align*}\int \limits _1^4\left (\frac{1}{2t}+i\right )^2\,dt & =\int \limits _1^4\left (\frac{i}{t}+\frac{1}{4t^2}-1\right )\,dt \\
& =i\int \limits _1^4\frac{1}{t}\,dt+\frac{1}{4}\int \limits _1^4\frac{1}{t^2}\,dt-\int \limits _1^41\,dt \\
& =\left .i\ln |t|-t-\frac{1}{4t}\right |_1^4 \\
& =\frac{16i\ln 4-65}{16}+\frac{5}{4} \\
& =\frac{16i\ln 4-45}{16}.
\end{align*}
