Find continuous function $f$ such that $\int_0^{\infty} f(x) \left(\frac{x^2}{1+x^2} \right)^n dx =\infty$ for all integers $n \geq1$. Let $f(x)$ be a continuous function on $[0,\infty)$.
I want to find $f$ such that $\int_0^{\infty} f(x) \left(\frac{x^2}{1+x^2} \right)^n dx =\infty$ for all integers $n \geq1$.
Let $g_n(x) = \left(\frac{x^2}{1+x^2} \right)^n$, then I know $g_n(x) \rightarrow 0$ and $g_n(x)=
    \left(\frac{x^2}{1+x^2}\right)^n =    \left( \frac{1}{1+\frac{1}{x^2}}\right)^n \leq  1$ is bounded.
but since $f(x)$ is bounded $\int_0^{\infty} f(x) g_n(x) dx \leq \int_0^{\infty} f(x) dx$ and since $f$ is continuous it is integrable, so it seems $<\infty$. Contradiction...
Is $f$ be continuous condition that should be relaxed? Or am I doing something wrong?
 A: Note $x^{2n}/(1+x^2)^n<1$ any function $f(x)\sim1/x$ will suffice. If $f(x)$ is required to be bounded then take any non-zero constant function.
A: Let $f(x)=\sum\limits_{k=1}^{\infty} \frac 1 {2^{k}} (\frac {x^{2}} {1+x^{2}})^{k}$. The series is uniformly convergent by M-test so $f$ is a continuous function. It is enough to observe that $\int_0^{\infty} (\frac {x^{2}} {1+x^{2}})^{n}dx=\infty$ for each $n$. For this expand $(1-\frac 1 {1+x^{2}})^{n}$ using Binomial Theorem and notice the first term integrates to $\infty$ whereas all other terms  have a finite integral.
A: Note that
$$
\left( {\frac{{x^2 }}{{1 + x^2 }}} \right)^n  \ge \left( {\frac{{n^2 }}{{1 + n^2 }}} \right)^n  \ge \frac{1}{2}
$$
for $n\geq 1$ and $x\geq n$. Taking, for example $f(x)=\frac{1}{x+1}$ (which is continuous for $x\geq 0$ and is bounded)
\begin{align*}
\int_0^{ + \infty } {f(x)\left( {\frac{{x^2 }}{{1 + x^2 }}} \right)^n dx} & \ge \int_n^{ + \infty } {f(x)\left( {\frac{{x^2 }}{{1 + x^2 }}} \right)^n dx}  \ge \frac{1}{2}\int_n^{ + \infty } {f(x)dx} \\ & = \frac{1}{2}\left(\mathop {\lim }\limits_{X \to  + \infty } \log (X + 1)\right) - \frac{1}{2}\log (n + 1) =  + \infty .
\end{align*}
