# Is this task impossible?

I'm dealing with what I can only assume is an impossible problem. I want to find the coefficients such that

$$x^2+2y^2+3z^2=\sum_{l=0}^\infty \sum_{m=-l}^l a_{lm}\rho^l P_l^m (cos(\theta))e^{im\phi} |_{\rho=1}$$

Where $$P_l^m$$ is the associated Legendre function. We write the LHS in spherical coordinates:

$$\sin^2{\theta}\sin^2{\phi}+2\sin^2{\theta}\cos^2{\phi}+3\cos^2{\theta}=\sum_{l=0}^\infty \sum_{m=-l}^l a_{lm}P_l^m (cos(\theta))e^{im\phi}$$

The main problem is I can't write the first two terms as any sort of associated legendre polynomial. The last term on the LHS is fairly telling of at least one coefficient, as it is equal to $$2P_2^0(\cos\theta)+2$$. It couldn't possibly be any other way. Now for the first two terms.

$$\sin^2{\theta}\sin^2{\phi}+2\sin^2{\theta}\cos^2{\phi}=\sin^2{\theta}[\sin^2{\phi}+2\cos^2{\phi}]$$

Now, $$\sin^2{\theta}$$ simply has to be expressed as $$\frac{1}{3}P_2^2(\cos\theta)$$, but the remaining part seems like it doesn't fit into the sum as it is defined at all. If $$m=2$$, then we have $$e^{\pm 2i\phi }$$. We can certainly get both squared trig functions by manipulating the exponential and then just taking the real part, but I believe we will never get the same form as the LHS unless by magic. Thoughts?