# Isolate P from an expression from a sum of arctan

I am trying to isoloate an expression for $P$ from

$\theta = -\frac{1}{3}\arctan(X_1\cdot P)-\arctan(\frac{X_2\cdot P}{X_3^2+X_2\cdot X_4})$

I have been trying for some days, but the $\frac{1}{3}$ makes lives harder.

I have used the the laws of $\arctan$, which ends in $\tan(\theta) = \frac{\tan(\frac{1}{3}\arctan(X_1\cdot P)) - \frac{X_2\cdot P}{X_3^2+X_2X_4})}{1+\tan(\frac{1}{3}\arctan(X_1\cdot P)) \cdot \frac{X_2\cdot P}{X_3^2+X_2X_4})}$

Anyone that have a tip how to tackle this problem. Cheers

Let $$c = \frac{X_3^2 + X_2 X_4}{X_1 X_2}$$ and let $z = X_1 P/c$. We want to solve for $P$ in $$-3\theta = \tan^{-1} cz + 3 \tan^{-1} z.$$ To this end, we use the identity $$\tan^{-1} u + \tan^{-1}v = \tan^{-1} \frac{u+v}{1-uv},$$ which gives $$\tan^{-1} cz + \tan^{-1} z = \tan^{-1} \frac{(1+c)z}{1 - cz^2},$$ and $$2 \tan^{-1} z = \tan^{-1} \frac{2z}{1-z^2}.$$ Thus $$\tan^{-1} cz + 3\tan^{-1} z = \tan^{-1} \frac{z(3+c-(1+3c)z^2)}{1-3(1+c)z^2+cz^4}.$$ Then with $y = \tan (-3\theta)$, we eventually get the quartic in $z$ $$cyz^4 + (1+3c)z^3 - 3(1+c)yz^2 - (3+c)z + y = 0.$$ The exact solution of this quartic is quite tedious and lengthy, but in theory it could be solved by radicals.