I hope I'm in the right forum, since I'm trying to solve for x.

I have an equation with 6 variables (a through e and x):

and I need to know what x is in terms of the other 5 variables.

When d=0 and e=0 (which is sometimes but not always true):

I was able to solve for x:

However, when it's not true that d=0 and e=0, those addends throw me off (they make it harder to just square the sqrt's away). I find myself bumbling around back and forth, and I feel like there's some rule or simplification that I'm not applying.

Can anyone lend some advice?

I got this far and realized I don't know what to do: