I have the following formulas:
$$S = 4 \times \tan\left(\frac{180^\circ-a}{2}\right) - \frac{π}{90^\circ} \times (180^\circ-a)$$
where:
$$S \gt 0$$
$$0^\circ \lt a \lt 180^\circ$$
and I want to solve them by α but I don't know how to take α out of the tan().
I tried to use some functions with arctan() but with no luck.
Could someone help me out with it?
You also have, in the relation of degree and radian units, $\pi=180^∘$, $90^∘=\frac\pi2$ etc. so that the equation reduces to $$ \frac{S}4=\tan(x)-x $$ where $x=\frac{180^∘−α}2$.
Now apply Newton's method or apply a fixed-point method. For the Newton method consider $f(x)=\arctan(x+\frac S4)-x$. For small $S$, $x$ dominates the sum with $S/4$,see below. Thus $f(x)\sim x^3$. To remove this multiple root, divide by $x^2$ which gives a Newton iteration $N(x)=x-\frac{xf(x)}{xf'(x)-2f(x)}$ which converges very rapidly
A suitable fixed-point equation that works without trying too many alternative formulations is $x=g(x)=\arctan(x+\frac S4)$. It converges reliably, however slowly.
Finally, convert back $α=180^∘-360^∘\frac{x}\pi$.
For small values of $S$ and thus small $x$ this gives approximately $$ \frac S4\approx \frac{x^3}3\implies x\approx\sqrt[3]{\frac34S}. $$ For larger $S$ you can use the approximation $\frac{x}{1-4x^2/\pi^2}$ of the tangent function, so that an approximation is obtained as the smaller solution of a quadratic equation. $$ 0=\left(\frac{2x}\pi\right)^2+2\frac{2x}{\pi}\frac{\pi}{S}-1 =\left(\frac{2x}\pi+\frac{\pi}{S}\right)^2-1-\frac{\pi^2}{S^2} \\ \implies x=\frac\pi2\left(\sqrt{1+\frac{\pi^2}{S^2}}-\frac{\pi}{S}\right) =\frac{\pi S}{2(\sqrt{S^2+\pi^2}+\pi)} $$