Fundamentally I have a differential equation for $f(x)$. I was able to find the coefficients of its Fourier expansion
$$ f(x) = \dfrac{f_0}{2} + \sum_{k = 1}^{n} f_k \cos(k x)$$
in terms of the relevant parameters of the equation. As it is an even function, a Cos expansion suffices. My question is, how can I find then the (also Cos) Fourier coefficients of an other function $f(x)^{-1/2}$ (evaluated pointwise) without having to explicitly calculate horrible integrals of the form
$$ \int_0^{\pi}\dfrac{\cos(m x)}{\sqrt{\dfrac{f_0}{2} + \sum_{k = 1}^{n} f_k \cos(k x)}} dx$$
Clearly this can't be done in all cases as the reciprocal function may not have a finite $L^2$ norm, but in my case it does. I have already surmised that (in my particular example) a finite series in $f(x)$ means and infinite series in $f(x)^{-1/2}$