The inner product in $L^2$ is given by the following equation:
\begin{equation} \left<f,g\right> = \int f(x)g(x) \, dx \end{equation}
And it should follow the axioms of inner products, including being positive definite. However if we define $f(x) = \sin(x)^{(1/2)}, g(x) = \cos(x)^{1/2}$ and $u(x) = g(x) - f(x)$, then $\|u(x)\| = 0$ (in the interval $[\frac{\pi}{4}, \frac{9\pi}{4}]$) even if $u(x)$ is not the $zero$ vector, like in the following:
\begin{equation} \left<u(x),u(x)\right> =\|u\|^2 = \int_{\pi/4}^{9\pi/4} u(x)u(x)\,dx = 0 \end{equation}
So I wonder what I have miss understood about the $L^2$ space, are the functions $f$ and $g$ not in $L^2$? If they are, how can the inner product not be positive definite?
It looks as if possibly you thought that $\big((\sin x)^{1/2}\big)^2 = \sin x$ for $\tfrac \pi 4 \le x\le \tfrac{9\pi} 4.$
But $\sin x$ is negative in half of that interval. What happens then?