Home / Math and Physics Files / Physics / E&M / Electrostatics / bowl / bowl in toroidals / Support doc files
P and Q for large nu REVIEWED
DOCX · 242.7 KB
Open DOCX file
Working note by Phil dated 12.10.15, later moved to Appendix H of the bowl document. It checks Abramowitz-Stegun large-ν Bessel approximations for P and Q against Maple, finds the Q mismatch comes from AS's bold Q normalization (division by Γ(ν+1)), and tabulates errors for n up to about 60. It then traces Maple breakdowns at large n and small ξ to the hypergeometric F part, and asks whether the series truncation error is bounded by the last term.
AI-written summary; may contain errors.
Extracted text (machine-read; may contain errors)
P and Q functions for large ν PhL 12.10.15
Now in Appendix H of bowl doc 12.31.15
I was still using the problematic Q function at this point, causing breakups and various problems as you see looking at what is below.
Motivation: I want to know how many terms you should keep in toroidal sums for potential and capacitance. These equations are these:
V(ξ,u) = V0 Σn=0∞ εn Pn-1/2(chξ) cos(nu) , (10.1.11)
C = (2a/π ) Σn=0∞ εn εn = 2-δn,0 . (10.2.3)
So today at least I am only interested in z ≥ 1.
Tools: I have these home-grown P and Q functions
Comment: Since ν is not isolated into the c argument of F(a,b,c;z), these are not natural forms with which to study large ν limits. Still, to the extent that Maple implements F(a,b,c;z) correctly, these functions should be accurate for all values of ν and ξ. It is hard to imagine they suddenly become inaccurate if you take say ν > 10.
Theory Side. I start with this AS result ("as ν → ∞")
Supposedly OK for μ ≥ 0 and I only care about μ = 0. The I and K are Bessel functions. I think the above come from work of Older.
Experiment #1. Let's test the above claims in Maple.
BesselI(v, x)
BesselK(v, x)
So let's construct the right sides and compare to the left sides for large ν. I will call the right sides of the above equations P1 and Q1, so keeping just the first terms,
P1ν(chξ) = I0[(ν+1/2)ξ] (14.15.13)AS
Q1ν(chξ) = K0[(ν+1/2)ξ] / Γ(ν+1) (14.15.14)AS
I enter these as follows
and verify that things are entered correctly. I then evaluate
The P look good, the Q look suspicious. I raise ν from 10 to 20
So without going any further, I know that something is wrong with (14.15.14)AS for Q. Now I notice that this Q is bolded and in italics. What does this mean? First at the very start of the AS chapter I see this
Well there it is! AS are using
Qν(z) = Qν(z)/Γ(ν+1)
I don't care about bolded Q functions, so I will rework things above:
So let's construct the right sides and compare to the left sides for large ν. I will call the right sides of the above equations P1 and Q1, so keeping just the first terms,
P1ν(chξ) = I0[(ν+1/2)ξ] (14.15.13)AS
Q1ν(chξ) = K0[(ν+1/2)ξ] (14.15.14)AS
I enter these as follows
and the train is now back on the track!!!
I updated H.5 with this fix, and now my claim is this
Pn-1/2(chξ) = e-n(2ξ-ξ) for large n.
Let's test this equation in Maple ! I define
I now compare these two expressions for a range of ξ and ξ0 values but with ξ < ξ0 since that will always be the case for my toroid plot -- only care about region outside the torus.
Case ξ0 = 0.1
Here is what I find with this plot command where I start the ξ0 scan at 0.1 which is fairly small value:
plot3d(G-F, xi0 = 0.1..2, xi = 0.1..xi0, axes = boxed);
With n = 10, the max difference G-F occurs at the corner where xi = xi0 and is about 0.7
With n = 20, difference drops to 0.3
With n = 30, difference drops to 0.1
With n = 40, difference drops to 0.035
Above n = 40 I start getting anomalies. So the above as about as good as I can do.
Here is the 0.1 case
so the toroid is very close to being "degenerate".
Conclusion: For n = 40 I can get the difference between the exact function G and the asymptotic limit F to be as small as about .04 for the challenging ξ0 = 0.1 value.
Case ξ0 =1
For a more typical case with ξ0 = 1 here is what happens:
With n = 1, difference drops to - 3 x 10-2
With n = 2, difference drops to 2 x 10-2
With n = 3, difference drops to 10-2
With n = 5, difference drops to 10-3
With n = 10, difference drops to 10-5
With n = 20, difference drops to 10-9
With n = 30, difference drops to 10-13
With n = 40, difference drops to 10-18
With n = 50, difference drops to 10-22
With n = 60, difference drops to 10-26
So in this case, I have unlimited accuracy, and 5 terms is just fine for a plot.
Restatement. I know from doing many plots that that the worst case error in F - G always occurs when ξ = ξ0. But in that case we have this equation
Pn-1/2(chξ) = e-n(2ξ-ξ) for large n.
becomes this equation
Qn-1/2(chξ0) = e-nξ
So then the question is this: how close are these two functions for values of ξ0 and n ?
Now simple 1D plots are fine. For example,
Here you see the error going down nicely to about n = 45, but then Maple has problems of some sort. Here is a plot of Qn-1/2(chξ0) rather than the difference
What is this plot telling us?? In theory, we know that
Qn-1/2(chξ0) → e-nξ
Here I plot the two curves separately,
The black curve is what we know must happen in theory, whereas the red curve is what happens in Maple.
Explanation #1. Go back to
How does Maple actually compute such a thing? I don't really know, but I can consider the Q function above to be the product of two factors: F, and everything else, which I will call H. Now let's see how Maple does with this H function,
The value of ξ does not matter for H, since ch(ξ) → 1.What we find is that for n up to 91, Maple seems able to compute the H function. Here is a log plot
If cannot plot beyond n = 91! How consider this situation,
I think Maple has a max and min FP number which it can handle, and we are getting close here. I forget where this is discussed in Maple help. I do have this
I remember now. This came up in one of my docs where it is a plotting problem only.
"Maple is uncomfortable plotting numbers larger than about 1040 so we pre-scale Ω down by 101519 to make the scaled Ω be Maple-digestible. This scaling process in turn creates numbers smaller than 10-40 which are also rejected by the Maple plotter, so we use a Heaviside function to pin small numbers to 0 "
from Lagrange doc.
Conclusion: I don't think Maple has any problem computing the H part of the Q function, even up to n = 1000 as you see. So the problem is, not surprisingly, with the F part of the function.
Here is a plot
You see that trouble starts brewing around n = 50 when ξ = 0.1. When ξ = 1 the above plot is clean. It seems clean all the way with ξ = .01 up to ξ = .08, but then trouble again at ξ = .09. Has trouble at ξ = 0.2. So something is "spotty" in the way Maple computes this F function!
Here is another way to look at the problem.
Here you see the breakup in the region above n = 40 and in the small ξ region.
Raising Digits to 30 has no effect on this breakup.
There is nothing I can do about this.
Fact: As you increase n in the high range further, the problems with ξ move higher.
For example, with n = 40 you are OK with ξ > .25, but at n = 90 you break up there.
New Question: Does our series
Σn=0∞ εn Pn-1/2(chξ) cos(nu)
have the property that if you truncate somewhere, the error is less in magnitude than the last term.! I recall a theorem from Buck on this which I will go and find right now and quote here: Oops, I see that rule only applies to an alternating series.
Is our series monotonically decreasing for any compatible pair ξ and ξ0?