Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Evaluate the Heuman lambda function
| ResourceFunction["HeumanLambda"][ϕ,m] gives the Heuman lambda function  | 
 .
. and at
 and at  .
.Evaluate numerically:
| In[1]:= | ![ResourceFunction["HeumanLambda"][2, 0.5]](https://www.wolframcloud.com/obj/resourcesystem/images/229/2293c977-684b-40fd-8d1a-a258aa64325b/00f089417ac38d61.png)  | 
| Out[1]= |   | 
Plot over a subset of the reals:
| In[2]:= | ![Plot[ResourceFunction["HeumanLambda"][z, 0.5], {z, -3, 3}]](https://www.wolframcloud.com/obj/resourcesystem/images/229/2293c977-684b-40fd-8d1a-a258aa64325b/3221d64fe717d3a6.png)  | 
| Out[2]= |   | 
Series expansion about the origin:
| In[3]:= | ![Series[ResourceFunction["HeumanLambda"][z, m], {z, 0, 4}]](https://www.wolframcloud.com/obj/resourcesystem/images/229/2293c977-684b-40fd-8d1a-a258aa64325b/733e53a014cb775d.png)  | 
| Out[3]= |   | 
Evaluate for complex arguments and parameters:
| In[4]:= | ![ResourceFunction["HeumanLambda"][2 + 3 I, 0.8 I]](https://www.wolframcloud.com/obj/resourcesystem/images/229/2293c977-684b-40fd-8d1a-a258aa64325b/18050a995a79d28c.png)  | 
| Out[4]= |   | 
Evaluate to high precision:
| In[5]:= | ![N[ResourceFunction["HeumanLambda"][2, 3], 30]](https://www.wolframcloud.com/obj/resourcesystem/images/229/2293c977-684b-40fd-8d1a-a258aa64325b/0de0e7ad49398f01.png)  | 
| Out[5]= |   | 
The precision of the output tracks the precision of the input:
| In[6]:= | ![ResourceFunction["HeumanLambda"][2, 3.0000000000000000000000]](https://www.wolframcloud.com/obj/resourcesystem/images/229/2293c977-684b-40fd-8d1a-a258aa64325b/5434384e3f3cc90a.png)  | 
| Out[6]= |   | 
Simple exact values are generated automatically:
| In[7]:= | ![{ResourceFunction["HeumanLambda"][0, m], ResourceFunction["HeumanLambda"][\[Pi]/2, m]}](https://www.wolframcloud.com/obj/resourcesystem/images/229/2293c977-684b-40fd-8d1a-a258aa64325b/1cd7191338261f13.png)  | 
| Out[7]= |   | 
| In[8]:= | ![{ResourceFunction["HeumanLambda"][\[Phi], 0], ResourceFunction["HeumanLambda"][\[Phi], 1]}](https://www.wolframcloud.com/obj/resourcesystem/images/229/2293c977-684b-40fd-8d1a-a258aa64325b/2e4a08950f4535d0.png)  | 
| Out[8]= |   | 
HeumanLambda threads elementwise over lists:
| In[9]:= | ![ResourceFunction["HeumanLambda"][{\[Alpha], \[Beta]}, m]](https://www.wolframcloud.com/obj/resourcesystem/images/229/2293c977-684b-40fd-8d1a-a258aa64325b/790c0ba38742bc27.png)  | 
| Out[9]= |   | 
Parity transformation and quasiperiodicity relations are automatically applied:
| In[10]:= | ![ResourceFunction["HeumanLambda"][-\[Phi], m]](https://www.wolframcloud.com/obj/resourcesystem/images/229/2293c977-684b-40fd-8d1a-a258aa64325b/1244a85e68f3ff03.png)  | 
| Out[10]= |   | 
| In[11]:= | ![ResourceFunction["HeumanLambda"][\[Phi] - 5 \[Pi], m]](https://www.wolframcloud.com/obj/resourcesystem/images/229/2293c977-684b-40fd-8d1a-a258aa64325b/62b9c7ebbec221a7.png)  | 
| Out[11]= |   | 
Apsidal angle of a gyroscopic pendulum, plotted as a function of the initial angle θ and the coefficient of stability μ:
| In[12]:= | ![ContourPlot[\[Pi]/
   2 ResourceFunction[
    "HeumanLambda"][\[Pi]/2 - ArcCos[Sqrt[1 + \[Mu]^2 + 2 \[Mu] Cos[\[Theta]]] - \[Mu]], 1/2 - (\[Mu] + Cos[\[Theta]])/(
     2 Sqrt[1 + \[Mu]^2 + 2 \[Mu] Cos[\[Theta]]])] - Sqrt[\[Mu]/Sqrt[1 + \[Mu]^2 + 2 \[Mu] Cos[\[Theta]]]]
    Cos[\[Theta]] EllipticK[
    1/2 - (\[Mu] + Cos[\[Theta]])/(
     2 Sqrt[1 + \[Mu]^2 + 2 \[Mu] Cos[\[Theta]]])], {\[Theta], 0, \[Pi]}, {\[Mu], 0, 6}, AspectRatio -> Automatic, Contours -> Range[5, 180, 5] \[Degree], PlotRange -> {0, 2 \[Pi]}]](https://www.wolframcloud.com/obj/resourcesystem/images/229/2293c977-684b-40fd-8d1a-a258aa64325b/2c7222f28fad7a76.png)  | 
| Out[12]= |   | 
Visualize the solid angle subtended by a circular disk:
| In[13]:= | ![With[{L = 2, r0 = 2/5, rm = 1},
 Graphics3D[{EdgeForm[], Polygon[PadRight[N@CirclePoints[rm, 24], {Automatic, 3}]], {Dashed,
     Line[{{r0, 0, 0}, {r0, 0, L}}]}, Sphere[{r0, 0, L}, rm/20]}, Boxed -> False, ViewPoint -> {-2.4, -1.3, 2.}]]](https://www.wolframcloud.com/obj/resourcesystem/images/229/2293c977-684b-40fd-8d1a-a258aa64325b/0a1d879852ad83f1.png)  | 
| Out[13]= |   | 
Evaluate the solid angle:
| In[14]:= | ![With[{L = 2, r0 = 2/5, rm = 1}, N[2 \[Pi] Boole[r0 < rm] - (2 L)/Sqrt[L^2 + (rm + r0)^2]
     EllipticK[(4 r0 rm)/(L^2 + (rm + r0)^2)] - \[Pi] Sign[
     r0 - rm] ResourceFunction["HeumanLambda"][
     ArcTan[Abs[r0 - rm]/L] - \[Pi]/2, (4 r0 rm)/(L^2 + (rm + r0)^2)],
   20]]](https://www.wolframcloud.com/obj/resourcesystem/images/229/2293c977-684b-40fd-8d1a-a258aa64325b/752dc0fbb9927fc9.png)  | 
| Out[14]= |   | 
Compare with the result of NIntegrate:
| In[15]:= | ![With[{L = 2, r0 = 2/5, rm = 1}, L NIntegrate[r/(r^2 - 2 r0 r Cos[\[Theta]] + r0^2 + L^2)^(
   3/2), {r, 0, rm}, {\[Theta], 0, 2 \[Pi]}]]](https://www.wolframcloud.com/obj/resourcesystem/images/229/2293c977-684b-40fd-8d1a-a258aa64325b/45434bbf340d0055.png)  | 
| Out[15]= |   | 
Visualize the gravitational attraction of a point to a semi-infinite right circular cylinder:
| In[16]:= | ![With[{x0 = 5/3, z0 = 4/7, r = 1}, Graphics3D[{Cylinder[{{0, 0, -z0}, {0, 0, -7 z0/2}}, r], Sphere[{x0, 0, 0}, r/20]}]]](https://www.wolframcloud.com/obj/resourcesystem/images/229/2293c977-684b-40fd-8d1a-a258aa64325b/1f0f83c0d5e6ccfc.png)  | 
| Out[16]= |   | 
Evaluate the vertical component of gravitational attraction, assuming the cylinder has the density of iron:
| In[17]:= | ![With[{x0 = Quantity[5/3, "Meters"], z0 = Quantity[4/7, "Meters"], r = Quantity[1, "Meters"], \[Rho] = Entity["Element", "Iron"][EntityProperty["Element", "Density"]]}, UnitConvert[
  2 \[Rho] Quantity[
    "GravitationalConstant"] N[(r^2 - x0^2)/Sqrt[(x0 + r)^2 + z0^2]
       EllipticK[(4 r x0)/((x0 + r)^2 + z0^2)] + Sqrt[(x0 + r)^2 + z0^2]
       EllipticE[(4 r x0)/((x0 + r)^2 + z0^2)] + \[Pi]/
      2 z0 (ResourceFunction["HeumanLambda"][
         ArcCos[(r - x0)/Sqrt[(x0 - r)^2 + z0^2]], (
         4 r x0)/((x0 + r)^2 + z0^2)] - 2)], $UnitSystem]]](https://www.wolframcloud.com/obj/resourcesystem/images/229/2293c977-684b-40fd-8d1a-a258aa64325b/77f48b9bd21aa8f8.png)  | 
| Out[17]= |   | 
Compare with the result of NIntegrate:
| In[18]:= | ![With[{x0 = 5/3, z0 = 4/7, r = 1, \[Rho] = Entity["Element", "Iron"][EntityProperty["Element", "Density"]]}, UnitConvert[
  2 \[Pi] \[Rho] Quantity[r, "Meters"] Quantity[
    "GravitationalConstant"] NIntegrate[
    BesselJ[0, x0 t] BesselJ[1, r t] E^(-z0 t)/t, {t, 0, \[Infinity]}], $UnitSystem]]](https://www.wolframcloud.com/obj/resourcesystem/images/229/2293c977-684b-40fd-8d1a-a258aa64325b/618b973fd8dc6af8.png)  | 
| Out[18]= |   | 
HeumanLambda can be expressed in terms of Legendre-Jacobi elliptic integrals:
| In[19]:= | ![With[{\[Phi] = 2, m = 2/3}, N[{ResourceFunction["HeumanLambda"][\[Phi], m], 2/\[Pi] (EllipticE[m] EllipticF[\[Phi], 1 - m] + EllipticK[
        m] (EllipticE[\[Phi], 1 - m] - EllipticF[\[Phi], 1 - m]))}]]](https://www.wolframcloud.com/obj/resourcesystem/images/229/2293c977-684b-40fd-8d1a-a258aa64325b/78a46c7ffe4c78fd.png)  | 
| Out[19]= |   | 
| In[20]:= | ![With[{\[Phi] = 2, m = 2/3}, N[{ResourceFunction["HeumanLambda"][\[Phi], m], 2/\[Pi] EllipticK[m] JacobiZeta[\[Phi], 1 - m] + EllipticF[\[Phi], 1 - m]/EllipticK[1 - m]}]]](https://www.wolframcloud.com/obj/resourcesystem/images/229/2293c977-684b-40fd-8d1a-a258aa64325b/68a84d1d2b963bb1.png)  | 
| Out[20]= |   | 
Certain cases of EllipticPi can be expressed in terms of EllipticK and HeumanLambda:
| In[21]:= | ![With[{n = -11/5, m = 3/4},
 N[{EllipticPi[n, m], ConditionalExpression[
    EllipticK[m]/(
     1 - n) + (n \[Pi])/(
      2 Sqrt[n (1 - n) (n - m)]) (ResourceFunction["HeumanLambda"][
         ArcSin[1/Sqrt[1 - n]], m] - 1), n < 0]}]]](https://www.wolframcloud.com/obj/resourcesystem/images/229/2293c977-684b-40fd-8d1a-a258aa64325b/6a2e10cdd0b97b5d.png)  | 
| Out[21]= |   | 
| In[22]:= | ![With[{n = 2/3, m = 1/4},
 N[{EllipticPi[n, m], ConditionalExpression[(\[Pi] Sqrt[n])/(2 Sqrt[(1 - n) (n - m)])
      ResourceFunction["HeumanLambda"][
      ArcSin[Sqrt[(n - m)/(n (1 - m))]], m], m < n < 1]}]]](https://www.wolframcloud.com/obj/resourcesystem/images/229/2293c977-684b-40fd-8d1a-a258aa64325b/63192b6e9d19ab04.png)  | 
| Out[22]= |   | 
This work is licensed under a Creative Commons Attribution 4.0 International License