A similar constant as the Dottie number, now for the Gudermannian function and what should be your numerical strategy to calculate it

236 Views Asked by At

This MathWorld how was defined the Dottie number. I want to know what should be a good way to define a different constant involving the Gudermannian function $\operatorname{gd}(x)$. See this MathWorld for the definition of this special function.

My definition is the solution of $$1-x=\operatorname{gd}(x),\tag{1}$$

(I don't know if there is a more natural definiton) and Wolfram Alpha online calculator with code

solve gd(x)=1-x

provide us a good approximation $$r\approx 0.51041\ldots,$$ and more digits.

Question. What is a right way, and with what numerical method, to justify a good approximation of our $r$ defined as $$1-r=\operatorname{gd}(r)?$$ Isn't required the calculations, only the name of the numerical method and with what identity one should to work, a) with the integral representation for the Gudermannian function or well b) with the relationship involving the inverse tangent function? Thus I am asking about this draft: with what expression I work and with what numerical method. Many thanks.

2

There are 2 best solutions below

3
On BEST ANSWER

The point behind the "Dottie number" is that if you iterate the cosine function, you will converge to a fixed point of that function. That is we find a solution of the equation $$\cos(x) = x.$$

It's important that one side be the identity. Thus, I guess the most obvious thing to do is to write your equation as $$1-\text{gd}(x) = x$$ and then iterate the function $f(x) = 1-\text{gd}(x)$. We can do so in WolframAlpha like by typing NestList[1 - Gudermannian[#] &, 1.0, 120].

We clearly see convergence. The general topic is called fixed point iteration and we can expect convergence when the value of the derivative at the fixed point is less than one in absolute value - which is is in this case. In fact, the derivative of $0 < \text{gd}'(x) \leq 1$ for all $x$ so that (like the cosine) we can expect convergence to the fixed point for all starting values.

More precisely, if $f(x) = 1-\text{gd}(x)$, then $f'(x) \approx -0.882526$, as we can compute on WolframAlpha. As a result, we expect somewhat weakly attracting fixed point. Here's an illustration:

enter image description here

1
On

Newton method will do a good job for finding the root of $$f(x)=1-\text{gd}(x)-x\qquad \text{and}f'(x)=-1-\text{sech}(x)$$ Using $x_0=1$ as Mark McClure did, the following iterates will be generated $$\left( \begin{array}{cc} n & x_n \\ 0 & 1 \\ 1 & 0.474671740442797381839960212004667814869157793115505244324090 \\ 2 & \color{red}{0.510}274102963764155170918024831381195730507581289697276018448 \\ 3 & \color{red}{0.510409}698618401805030200483403471453158277517329356886284684 \\ 4 & \color{red}{0.5104097006448871}29881627387868880322014411056043394900062686 \\ 5 & \color{red}{0.510409700644887130334301245058831675}184146586594448235368770 \\ 6 & \color{red}{0.510409700644887130334301245058831675206734146434315862766445} \end{array} \right)$$

Less iterations would be required using Halley or Householder methods.

For example, using Householder method, the following iterates will be generated $$\left( \begin{array}{cc} n & x_n \\ 0 & 1 \\ 1 & \color{red}{0.51}1599258877318220738741385206814044119594396507686980085584 \\ 2 & \color{red}{0.510409700644}932808766243282898431272771942065938857826177343 \\ 3 & \color{red}{0.510409700644887130334301245058831675206734146434315862}865683 \\ 4 & \color{red}{0.510409700644887130334301245058831675206734146434315862766445} \end{array} \right)$$

Edit

We could have started iterations much closer to the solution considering the $[2,2]$ Padé approximant of the considered function. Built around $x=0$ we have $$f(x)=\frac{1-2x+\frac 1 {12}x^2} {1+\frac 1 {12}x^2 }$$ leading to an estimate $$x=2 \left(6-\sqrt{33}\right)\approx 0.510875$$