Approximate the solution of $y=a \arctan(x/a)-\arctan (x)$

approximationtaylor expansiontrigonometry

After this question, related to the Prandtl–Meyer function
$$\nu(M)
= \int \frac{\sqrt{M^2-1}}{1+\frac{\gamma -1}{2}M^2}\frac{\,dM}{M}=
\sqrt{\frac{\gamma + 1}{\gamma -1}} \tan^{-1}\left( \sqrt{\frac{\gamma -1}{\gamma +1} (M^2 -1)}\right) – \tan^{-1} \left(\sqrt{M^2 -1}\right)$$ where $\gamma=\frac {Cp}{Cv}$is the ratio of the specific heat capacities, I wondered if we could, at least, get an approximation of $x$, solution of the equation
$$\color{blue}{y=a \tan^{-1} \left(\frac x a\right)-\tan^{-1} (x)}\tag 1$$ when $y$ is close to the asymptote $(y_\infty=\frac \pi2 (a-1))$ for the range of "physical" values of $a$ (from a numerical point of view, solving $(1)$ does not present any difficulty).

For the ideal gas state,

$$\left(
\begin{array}{ccc}
\color{blue}{\text{molecules}} &\color{blue}{ \gamma} & \color{blue}{a} \\
\text{monoatomic} & \frac{5}{3} & 2 \\
\text{diatomic} & \frac{7}{5} & \sqrt{6} \\
\text{triatomic} & \frac{9}{7} & \sqrt{8} \\
\text{polyatomic} & \frac{4}{3} & \sqrt{7}
\end{array}
\right)$$

Fortunately, for $a=2$, we can recombine the arctangents making the equation to be
$$y=\tan^{-1}\left(\frac{x^3}{4+3x^2}\right)$$ the solution of which being
$$x=k \left(1+2 \cosh \left(\frac{1}{3} \cosh
^{-1}\left(1+\frac{2}{k^2}\right)\right)\right)\qquad \text{where}\qquad k=\tan(y)$$ which is valid for any $y$.

What is interesting to notice is that $x(k)$ is almost a linear function which is far away to be the case for $x(y)$ as one could expect. For large values of $k$, corresponding to $y \to \frac \pi 2$, Taylor expansion gives
$$x=3 k+\frac{4}{9 k}-\frac{32}{243 k^3}+O\left(\frac{1}{k^5}\right)$$

My problem is that I do not see how this could be used to generate an approximation for other values of $a$.

Any idea will be more than welcome.

Edit

After @Mariusz Iwaniuk's comments, we could expand $y$ as a Taylor series for infinitely large values of $x$ and use series reversion.

Using $\Delta=y_\infty-y$, we should end with

$$x=\frac{a^2-1}{\Delta }-\frac{\left(a^2+1\right) }{3(a^2-1)}\Delta -\frac{\left(a^4+11
a^2+1\right) }{45 \left(a^2-1\right)^3}\Delta ^3+O\left(\Delta ^5\right)$$ which, numerically, seems to be quite good.

Update

Combining
$$y_\infty=\frac \pi2 (a-1) \tag 2$$
$$y=a \tan^{-1} \left(\frac x a\right)-\tan^{-1} (x)\tag 3$$
$$\Delta=y_\infty-y=a \left(\frac \pi2-\tan^{-1} \left(\frac x a\right) \right) -\left( \frac \pi2-\tan^{-1} (x)\right)=a \tan^{-1} \left(\frac a x \right)-\tan ^{-1}\left(\frac{1}{x}\right)\tag 4$$ seems to be an easier approach for large $x$.

Expanding as Taylor series
$$\Delta=\sum_{k=1}^\infty (-1)^{k+1}\frac{ \left(a^{2 k}-1\right) }{(2 k-1)\,x^{2k-1}}$$
Using series reversion
$$x=\frac{a^2-1}{\Delta }-\frac{\left(a^2+1\right) }{3( a^2-1)}\Delta -\frac{\left(a^4+11
a^2+1\right)}{45 \left(a^2-1\right)^3} \Delta ^3-\frac{2
\left(a^2+1\right) \left(a^4+56 a^2+1\right) }{945
\left(a^2-1\right)^5}\Delta ^5+O\left(\Delta ^{7}\right)$$ which makes
$$\Delta-\left(a \tan^{-1} \left(\frac a x \right)-\tan ^{-1}\left(\frac{1}{x}\right) \right)=\frac{\left(a^8+247 a^6+723 a^4+247 a^2+1\right) }{4725
\left(a^2-1\right)^8}\Delta ^9+O\left(\Delta ^{11}\right)$$ For diatomic molecules, such as air, $(a=\sqrt 6)$, the coefficient is $\frac{11737}{263671875}\approx 4.5 \times 10^{-5}$.

On the other side, for small $x$, we can build the simplest Padé approximant and get
$$k=\frac{5 \left(a^2-1\right) x^3}{15a^2+9 \left(a^2+1\right) x^2}$$ leading to the cubic equation
$$5\left( a^2-1\right) x^3-9 \left(a^2 +1\right)k\,x^2-15 a^2 k=0 $$ which can be solved using the hyperbolic method for one real root. The expression is too messy to be reported here.

Best Answer

An analytic approximation for large $k$ and $a \ge 2$ is $$ x=\frac{-k-a\cos(\pi/a)\sin(\pi/a) + a^2\,k\,\sin^2(\pi/a)} {\sin^2(\pi/a) + a\,k\,\cos(\pi/a)\,\sin(\pi/a)} .$$ What's nice about it is that it reduces to $x=3k$ as given in Claude's initial exposition for $a=2.$ This is a large $k$ expansion. For a numerical check I let $a$ run from 2 to 3 by 0.05, and $k=5+1.5^m$ for $m$ = 0 to 20. The largest relative error of about 1.2% was obtained on the 'small k' side of $k=6.$

The technique was to take the tangent of eq. (1) above and write it, using the tangent addition formula, in the equivalent form $$x=\tan(a\,\tan^{-1}(x/a)) - k\big(1+x\tan(a\,\tan^{-1}(x/a))\big). $$ At first I tried expanding $\tan(a\,\tan^{-1}(x/a))$ in a Laurent series around its singular point to get an equation in $x$ that could be solved analytically. Unfortunately it takes too many terms to give an accurate representation of the RHS of the equation. They will have to be included to go beyond the given approximation. In making the plots I noticed that a ballpark approximation to the solution was $x=a \tan(\pi/a).$ Furthermore the curve is decently approximated by a line over a fairly large region. Finally, a $k \to \infty$ analysis suggests that the point $x=a \tan(\pi/a)$ is the best. Thus the RHS of the previous equation is expanded around this point to first order in $(x-a \tan(\pi/a))$ and, solve for $x$ to get the equation at the top of this answer.

Related Question