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?
 A: $$
y = \int_0^u \frac{dt}{t^2 + 1} \quad \text{and} \quad u = \cot x.
$$
$$
\frac {dy}{du} = \frac 1 {u^2+1} \quad\text{and}\quad \frac{du}{dx} = -\csc^2 x.
$$
When $x=\pi/2$ then $-\csc^2 x = -1$ and $\cot x = 0$, so $\dfrac 1 {u^2+1} = \dfrac 1 {0^2+1} = 1$.
Bottom line:
$$
\left. \frac{dy}{dx} \right|_{x=\pi/2} = -1.
$$
Alternatively, one can say
$$
\int_0^{\cot x} \frac{dt}{t^2+1} = \arctan(\cot x) - \arctan 0 = \frac\pi 2 - x,
$$
and that's easy to differentiate with respect to $x$.
A: 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)$. 
