A recent issue of Quanta Magazine is titled Mathematician Solves Centuries-Old Grazing Goat Problem Exactly. The geometric goat problem—not to be confused with other sites of similar names, such as this one—is described in detail in the paper A Closed-Form Solution to the Geometric Goat Problem [1] by Ingo Ullisch, which gives a “closed-form” solution to this problem.
Closed-Form
Closed-Form
Note that I have written “closed-form” as, to quote :
Wikipedia
In mathematics, a closed-form expression is a mathematical expression expressed using a finite number of standard operations. It may contain constants, variables, certain "well-known" operations (e.g., + − × ÷), and functions (e.g., nth root, exponent, logarithm, trigonometric functions, and inverse hyperbolic functions), but usually no limit, differentiation, or integration.
See also Chow [2] and Borwein and Crandall [3].
Explicit Roots of Transcendental Equations
Explicit Roots of Transcendental Equations
In Explicit Roots of Transcendental Equations [4], which appeared in my Tricks of the Trade column in The Mathematica Journal (unfortunately, not presently available online), I used a very similar approach to compute explicit roots of transcendental equations.
∮
γ
(
1
)for any closed contour completely contained in . The roots of a function can be determined by locating the singularities of the reciprocal of the function, . If has a simple pole at , then is analytic. Luck and Stevens [5] use this to obtain an explicit expression for the root of ,
γ
ℛ
g(z)
h(z)=1/g(z)
h(z)
z
0
f(z)=(z-)h(z)
z
0
z
0
g(z)
∮
γ
z
0
z
0
∮
γ
∮
γ
(
2
)where the contour contains the single pole at . We see that the roots are, essentially, the normalized (complex) first or mean of .
γ
z
0
moment
h(z)
Example: Roots of Bessel Functions
Example: Roots of Bessel Functions
Here we apply this idea to compute roots of the Bessel function.
The roots of (z) lie on the real axis:
J
0
In[]:=
Plot[(z),{z,0,10}]
J
0
Out[]=
Exact Roots
Exact Roots
First note that we can use to compute these results directly and (implicitly) exactly:
In[]:=
Solve[{(z)0,0<z<10},z]
J
0
Out[]=
{{z},{z},{z}}
j
0,1
j
0,2
j
0,3
Complex Roots
Complex Roots
In the complex plane, the singularities of the reciprocal of the function are simple poles lying on the real axis:
In[]:=
h(z_):=(z)
1
J
0
In[]:=
ComplexPlot3D[h(z),{z,-2,10+2},BoxRatios{5,2,1},Mesh10,MeshStyle{White,Gray},PlotPoints25]
Out[]=
Numerical Integration
Numerical Integration
To determine the first root, we use equation (
2
), integrating around an arbitrary (diamond-shaped) contour enclosing just this root:In[]:=
/:=//Chop
0,1
NIntegrate[zh(z),{z,1,2-,3,2+,1}]
NIntegrate[h(z),{z,1,2-,3,2+,1}]
Out[]=
2.40483
We verify that this value is correct to machine precision:
In[]:=
J
0
0,1
Out[]=
1.75159×
-16
10
Circular Contour
Circular Contour
Alternatively, evaluating both integrals around the same circular contour
z=a+rz=rθ,
θ
θ
(
3
)equation (
3
) becomesz
0
2π
∫
0
2θ
2π
∫
0
θ
(
4
)where . The values of and do not matter as long as the contour circumscribes the root.
f(θ):=h(a+r)
θ
a
r
To determine the second zero of (z), we choose a circle centered at with radius that circumscribes this root and no other.
J
0
a=5
r=1
In[]:=
a=5;r=1;f(θ_):=h(a+r);
θ
We use equation (:
4
) to determine j
0,2
In[]:=
/:=a+r//Chop
0,2
NIntegrate[f(θ),{θ,0,2π}]
2θ
NIntegrate[f(θ),{θ,0,2π}]
θ
Out[]=
5.52008
This is an good approximation to the second root:
In[]:=
J
0
0,2
Out[]=
1.06129×
-7
10
Fourier Integration
Fourier Integration
c
n
1
2π
2π
∫
0
nθ
(
5
)so equation (
5
) reduces toz
0
c
2
c
1
(
6
)involving a simple ratio of Fourier coefficients.
To determine the third zero of (z), we choose a circle centered at with radius that circumscribes this root and no other, computing the Fourier coefficients approximately using Fourier, sampling uniformly over just 16 times:
J
0
a=9
r=1
f(θ)
[0,2π]
In[]:=
a=9;cs=FourierTablef(θ),θ,0,2π-,//Rest//Chop
π
8
π
8
Out[]=
{-14.7356,5.10251,-1.76687,0.611787,-0.211934,0.0731576,-0.0260457,0.00728334,-0.00824435,-0.0100118,-0.042844,-0.0765791,-0.346537,-0.463324,-2.64574}
We use equation (:
6
) to determine j
0,3
In[]:=
/:=a+r
0,3
cs〚2〛
cs〚1〛
Out[]=
8.65373
Then we check that this value is a good approximation to the third root:
In[]:=
J
0
0,3
Out[]=
-7.16756×
-8
10
Increasing the number of sample points improves the accuracy of roots computed via .
Goat Problem
Goat Problem
Ullisch reduces the goat problem to finding the (unique) solution of the transcendental equation
sin(β)-βcos(β),
π
2
(
7
)where
-<β<π.
π
2
(
8
)Now, of course, we can compute the unique solution to this transcendental equation exactly as a object:
In[]:=
goatangle=First@SolveSin[β]-βCos[β],<β<π
π
2
-π
2
Out[]=
β
Defining
we can immediately compute the numerical value of the solution to any desired precision:
References
References