Finding the function from a definite integral?

If I had an integral, as shown below, $ $ \dfrac{\int_{0}^{1} a(x) \cdot x^{2} \; dx}{\int_{0}^{1} a(x)\; dx}=\dfrac{1}{2}$ $ How would I figure out the function $ a(x)$ , is there way or do I have to make a guess and test it?