Linearizing a function involving an integral about a point 
Find the linearization of $$g(x)= \int_0^{\cot(x)} \frac{dt}{t^2 + 1}$$ at $x=\frac{\pi}{2}$.

I know to find linearization I first plugin the $x$ values into my function $g(x)$: $g(\pi/2)$.
Then as I understand it, I make the necessary conversions to form the following function:
$$L(x)=g(a)+g'(a)(x-a)$$
Which yields... I'm not sure. I've gotten decent at the definite integrals which use numbers, but my online course in precalculus has left me with serious gaps involving the unit circle and $\sin$/$\cos$/$\tan$ conversions.
Can someone help walk me through this problem to where I can fully understand what is being asked of similar problems?

Using the fundamental theorem of calculus,  $g'(x) = \frac{1}{\cot^2 x + 1}=\frac{1}{\csc^2 x} = \sin^2 x$. 
Then, the linearization at $x=\pi/2$ follows the formula you've given. Linearization just means approximating the function by a straight line at some point $x=a$. The first term, $g(a)$ is the point of the function at $x=a$. $g'(a)$ is the slope of the function at $a$, so you're using the point-slope form of a line passing through $g(a)$ at $x=a$ with the same slope of the function at $x=a$, $g'(a)$. 
