Consider g(x) = \ln f(x) which is defined and continuous and also g(x)≥0 for all x. Further g(x) is integrable
Now, we are given that
f \left(\frac{x}{n} \right)f \left(\frac{2x}{n} \right)...f \left(\frac{(n-1)x}{n} \right)f \left(\frac{nx}{n} \right) \le an^k
or by taking logarithms on both sides
\sum_{r=0}^n g \left(\frac{rx}{n} \right)\frac{1}{n} \le \frac{\ln a }{n}+ k \frac{\ln n}{n}
Now letting n→∞, and recognising the riemann sum on the LHS, and evaluating the limit on RHS we have
0 \le \int_0^{x} g(t) \ dt \le 0 \Rightarrow \int_0^{x} g(t) =0 for all x.
Hence it follows that g(x) = 0 for all x.
And hence f(x) =1 for all x