Message Boards Message Boards

A "Closed-Form" Solution to the Geometric Goat Problem

POSTED BY: Paul Abbott
2 Replies
Posted 3 years ago

As an addendum to Paul's notes:

The Luck-Stevens formula is useful if you are unwilling or unable to compute function derivatives. This, however, comes at the expense of having to compute a ratio of two integrals.

The Delves-Lyness method,

$$z_0=\oint_\gamma \frac{z\, h^\prime(z)}{h(z)}\mathrm dz,$$

on the other hand, only requires a single integral, but one needs to compute derivatives. If the function whose root is being sought is easily differentiated, this might be acceptable.

Using Paul's examples above, here are the Delves-Lyness equivalents of some of his examples:

(* first root of Bessel function BesselJ[0, u], diamond contour  *)
NIntegrate[u (-BesselJ[1, u])/(BesselJ[0, u]), {u, 1, 2 - I, 3, 2 + I, 1}, WorkingPrecision -> 20]/(2 Pi I)

(* second root of Bessel function BesselJ[0, u], circular contour  *)
With[{h = 5, r = 1}, 
     Re[(r/(2 Pi)) NIntegrate[# (-BesselJ[1, #])/(BesselJ[0, #]) &[h + r Exp[I t]] Exp[I t], {t, 0, 2 Pi}, 
                              Method -> {"Trapezoidal", "SymbolicProcessing" -> 0}, 
                              WorkingPrecision -> 20]]]

(We use the trapezoidal rule here, as it is very efficient for numerically evaluating such integrands; see e.g. this and this)

(* third root of Bessel function BesselJ[0, u] via FFT *)
With[{h = 9, r = 1, n = 32}, 
     Chop[r Fourier[Table[N[# (-BesselJ[1, #])/(BesselJ[0, #]) &[h + r Exp[I t]], 20],
                          {t, 0, 2 Pi - Pi/n, Pi/n}], 
                    FourierParameters -> {-1, 1}]][[2]]]

As for the original "goat problem" solution, we have the following:

Re[NIntegrate[# (# Sin[#])/(Sin[#] - # Cos[#] - Pi/2) &[Pi/2 + Pi Exp[I t]/4] Exp[I t],
              {t, 0, 2 Pi}, Method -> {"Trapezoidal", "SymbolicProcessing" -> 0}, 
              WorkingPrecision -> 20]/8]

The survey paper of Austin, Kravanja, and Trefethen is of interest if you wish to delve further into these matters.


enter image description here -- you have earned Featured Contributor Badge enter image description here Your exceptional post has been selected for our editorial column Staff Picks and Your Profile is now distinguished by a Featured Contributor Badge and is displayed on the Featured Contributor Board. Thank you!

POSTED BY: Moderation Team
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract