The sequence $a_n=\frac{n^2}{n^3+200},n\in N$ has the $7$ th term as largest term.Why? 
The function $f(x)=\frac{x^2}{x^3+200}$ attains does not attain local maxima at >$x=7$ but the sequence $a_n=\frac{n^2}{n^3+200},n\in N$ has the $7$ th term as >largest term.Why? 


$$f'(x)=\frac{(x^3+200)2x-x^2(3x^2)}{(x^3+200)^2}=0$$ gives $$\frac{400x-x^4}{(x^3+200)^2}=0$$
$$x=0,(400)^{1/3}$$
So the points of extremum are $x=0,(400)^{1/3}$.
But the sequence $a_n=\frac{n^2}{n^3+200},n\in N$ looks like this function and this sequence attains its maximum value at $n=7$.

My question is:Is there a method to find the largest value and the smallest value of a sequence and the number at which this occurs.
 A: That is because $\lfloor{400^\frac{1}{3}}\rfloor = 7$ and $\lceil{400^\frac{1}{3}}\rceil = 8$.
Hence one of these values should be the maximum in the case of a numeric sequence in the case of a function that is concave or convex in the interval between the two integers.
Which one it will be will depend on the function describing the sequence.
A: Let $f\colon\Bbb R\to \Bbb R$ be a continuous function and define $a_n=f(n)$ for $n\in \Bbb N$. Assume $n_0>1$ and $f(n_0)>f(n)$ for all $n\ne n_0$. Then $f$ has a local maximum in the interval $(n_0-1,n_0+1)$.
This follows because the continuous function $f$ assumes a maximum on the compact interval $[n_0-1,n_0+1]$ and by assumption, this maximum cannot occur at the two boundary points.

The converse need not hold: It may happen that $f$ has a strict global maximum in the interval $(7,8)$, say, but $a_n$ has no maximum at all. For example, we could make $a_n=-\frac1n$, while $f(x)$ is not $\frac1x$ throughout, but instead has a "bump" in $(7,8)$.
