1
$\begingroup$

The following code produces a {4,4} rational interpolation approximation accurate to 10^-6 or better over the range {0,Pi/2} for α in the range {.001,.999}:

Needs["FunctionApproximations`"];

r[kz_, α_] := (Cos[(kz*α)/2]*Csc[kz/2]*Sin[(kz*α)/2])/α;
p[kz_, α_] := 
  RationalInterpolation[
   r[2 ArcSin[Sqrt[α]], α], {α, 4, 4}, 
   Table[Max[N[Sin[i Pi/17]], .00001], {i, 0, 8}]] /. α -> Sin[kz/2]^2

However, applying this procedure to the alternative function

r[kz_, α_] := (Cos[(kz*α)/2]*Csc[kz/2]*Sin[(kz*α)/2])/(α*Sinc[kz/2])

produces much worse results at certain values of α, such as 0.653.

Relative error at 0.653

I am seeking advice on obtaining a more uniformly accurate rational approximation to the second function by a better choice of interpolation points or even by a better algorithm.

The code used to obtain the plot is

Manipulate[
 pe = Evaluate[p[kz, α]];
 re = Evaluate[r[kz, α]]; 
 Plot[1 - pe/re, {kz, 0, Pi/2}, 
  AxesLabel -> {"\!\(\*SubscriptBox[\(k\), \(z\)]\) Δz",Error},
  PlotRange -> {-.00001, .00001}, 
  AxesStyle -> Directive[Bold, FontSize -> 16], 
  PlotStyle -> AbsoluteThickness[1.7]],
 {{α, .653}, .01, .999, Appearance -> "Labeled"}]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.