# Evaluating a limit…

I was solving a physics problem and this expression came about:

$E =\lim_{N \to \infty} \left( \dfrac{k_0Q}{NR²}\displaystyle\sum_{i=0}^{(N/2-1)}\left[ \left( 4\cos{\dfrac{i\pi}{N}}-\sec{\dfrac{i\pi}{N}}\right)^{-1} \right] \right)$

I want to evaluate this limit. My question is: Are the following steps correct? I'm not sure that is valid to plug in the limit everywhere I want.

$E=\left[ \lim_N \to \infty\left( \dfrac{k_0Q}{NR²}\right) \right]\left[\displaystyle\sum_{i=0}^{\lim_{N \to \infty}(N/2-1)}\left[\lim_{N \to \infty}\left(4\cos{\dfrac{i\pi}{N}} \right)-\lim_{N \to \infty}\left( \sec{\dfrac{i\pi}{N}} \right) \right]^{-1} \right]$

$=\dfrac{k_0Q}{R²}\left[ \lim_{N \to \infty}\left(\dfrac{1}{N} \right)\right]\left[\displaystyle\sum_{i=0}^{\lim_{N \to \infty}(N/2-1)}\left[4-1\right]^{-1} \right]$

$=\dfrac{k_0Q}{R²}\left[ \lim_{N \to \infty}\left(\dfrac{1}{N} \right)\right]\left[\dfrac{1}{3}\displaystyle\sum_{i=0}^{\lim_{N \to \infty}(N/2-1)}1 \right]$

$=\dfrac{k_0Q}{R²}\left[ \lim_{N \to \infty}\left(\dfrac{1}{N} \right)\right]\left[\dfrac{1}{3}\lim_{N \to \infty}\left(\dfrac{N}{2}-1\right) \right]$

$=\dfrac{k_0Q}{3R²} \lim_{N \to \infty}\left[\left(\dfrac{1}{N} \right)\left( \dfrac{N}{2}-1\right)\right]$

$=\dfrac{k_0Q}{3R²} \lim_{N \to \infty}\left(\dfrac{1}{2} -\dfrac{1}{N}\right)$

$=\dfrac{k_0Q}{6R²}$