Improve the numerator in the approximation by including a third-order term in it.
$\tan x\approx\frac{x}{\left(1-\frac{4x^{2}}{\pi^{2}}\right)\left(1+ax^{2}\right)}$
I can include a third-order term, but I don't know how to specify "a"
$ \tan x\approx\left(\frac{\pi}{2}-x\right)^{-1\ }$ $x\to\frac{\pi}{2}$
I will be grateful for the idea