Solution 1:

First of all, we write down the fourier expansion of $x(t)$:

$$x(t) = \sum_{n=1}^\infty a_n \sin(n\pi t) + \sum_{n=1}^\infty b_n \cos (n\pi t)$$

(the main point is that $x(t)$ has no constant term, do you know why?). Thus

$$\int_0^1 |x(t)|^2 dt = \sum_{n=1}^\infty a_n^2 + b_n^2$$

and

$$\int_0^1 |x'(t)|^2 dt = \pi ^2 \sum_{n=1}^\infty n^2(a_n^2 + b_n^2)$$

$$\Rightarrow \frac{\int_0^1|x'(t)|^2 dt}{\int_0^1 |x(t)|^2 dt} = \frac{\pi^2 \sum_{n=1}^\infty n^2 (a^2_n + b_n^2)}{ \sum_{n=1}^\infty a_n^2 + b_n^2} \geq \pi^2\frac{\sum_{n=1}^\infty a^2_n + b_n^2}{\sum_{n=1}^\infty a_n^2 + b_n^2} = \pi^2 $$

With equality as $f(t)= \sin(\pi t)$. (Strictly speaking the infimum is not attained as this function does not have compact support).

Solution 2:

I can prove that if $\pi^2$ is a lower bound then it must be the greatest one. Simply consider uniform approximations of $x(s)=\sin(\pi s)$ by functions with compact support. Then $x'$ will be approximated in the sense of $L^2$ and so you recover the result. I am not sure why $\pi^2$ is a lower bound, however.