Find a function $f$ which is Riemann-integrable on $[0,T]$, and so that $\int_0^T f(t)^2 dt$ is infinite. I am reading "Linear Algebra, Signal Processing, and Wavelets - A Unified Approach: Python Version" by Øyvind Ryan.
There is the following exercise in this book.

Exercise 1.18: Riemann-Integrable Functions Which Are Not
Square Integrable
Find a function $f$ which is Riemann-integrable on $[0,T]$, and so that
$\int_0^T f(t)^2 dt$ is infinite.

$\int_0^1 \frac{dt}{\sqrt{t}} = 2$, but $\int_0^1 \frac{dt}{t} = \infty$.
But do we say $f(x) = \frac{1}{\sqrt{x}}$ is riemann integrable on $[0,1]$?
I think if $f$ is riemann integrable on $[0,T]$, $f$ must satisfy the condition that $f$ is bounded on $[0,T]$ at least.
Is there really $f$ such that $f$ is bounded on $[0,T]$ and $\int_0^T f(t) dt$ exists and $\int_0^T f(t)^2 dt$ is infinite?

A function $g$ is Riemann integrable on $[0,T]$ iff $g$ is bounded and continuous almost everywhere on $[0,T]$. If your $f$ is Riemann integrable, then it satisfies the latter two properties, then so does $f^2$ and there is no way that $f^2$ cannot be Riemann integrable. It is impossible for the integral of a Riemann integrable function on a compact interval to take the value $\infty$.
So perhaps you are looking for improper Riemann integrability. In such a case, we can take exactly your function $f(x)=\dfrac{1}{\sqrt{x}}$.
