Limit of a function involving trigonometric exponents. Question:

If $\large f(x)=[1^{\csc^2(x)}+2^{\csc^2(x)}+3^{\csc^2(x)}+\cdots+100^{\csc^2(x)}]^{\sin^2(x)}$
Find $\large \lim\limits_{x \to 0} f(x)$.


My attempt:
Let $\space y=f(x)$,  
Taking log on both sides I tried to simplify the expression but it messed it up a lot.

So is there a general way to solve such problems or do I just need to simplify the expression and use the limit?

 A: Let $u=\csc^2(x)$, then your limit is
$$
\begin{align}
\lim_{u\to\infty}\left(\sum_{k=1}^{100}k^u\right)^{1/u}
&=100\lim_{u\to\infty}\left(\color{#00A000}{\sum_{k=1}^{100}\left(\frac{k}{100}\right)^u}\right)^{\color{#C00000}{1/u}}\\
&=100\cdot\color{#00A000}{1}^{\color{#C00000}{0}}
\end{align}
$$
A: You can write 
$$
f_N(x) = \left( \sum_{n=1}^N n^{\mathrm{cosec}^2(x)} \right)^{\sin^2(x)}
$$
and you want the limit for $N = 100$ when $x \to 0$. You can re-write $f_N(x) = e^{\log(f_N(x))}$, and then you get 
$$
\log(f_N(x)) = \sin^2(x) \log \left( \sum_{n=1}^N n^{\mathrm{cosec}^2(x)} \right) = \frac{\log \left( \sum_{n=1}^N n^{\mathrm{cosec}^2(x)} \right)}{\mathrm{cosec}^2(x)}. 
$$ 
Now let $g_N(y) = \frac{\sum_{n=1}^N n^y}{y}$. We have $f_N(x) = \mathrm{exp}(g_N(\mathrm{cosec}^2(x)))$, so since $\lim_{x \to 0} \mathrm{cosec}^2(x) = \infty$, we now want to compute
$$
\lim_{y \to \infty} g_N(y) = \lim_{y \to \infty} \frac{\log \left( \sum_{n=1}^N n^y \right)}{y} = \lim_{y \to \infty} \frac{ \sum_{n=1}^N n^y \log n}{ \sum_{n=1}^N n^y} = \lim_{y \to \infty} \frac{ \sum_{n=1}^N (n/N)^y \log n}{ \sum_{n=1}^N (n/N)^y} = \log N. 
$$
That's where you get using the "classical technique", since you start with an indetermination of the form $\infty^0$. But one sees that at some point there is no other option than to notice that there is only one term in the sum which controls this limit and the rest is irrelevant (as is pointed out by the fact that I replaced by $100$ by $N$, the number $100$ has nothing special to it since all the terms after $n=2$ do not contribute to the limit). Therefore $\lim_{x \to 0} f_N(x) = e^{\log N} = N$. 
But of course, you can be smart and use  mjqxxxx's trick in the first place without going through all the "classical technique" computations to end up using his trick at the end. I guess that's my way of answering "So is there a general way to solve such problems or do I just need to simplify the expression and use the limit?". 
Hope that helps,
