You can use (special) functions that appear in the field of physics in the scipy.special package [1].
from scipy.special import *
** Typical (special) function usages (function names, arguments, etc.) are summarized below so that they can be referred to as appropriate when performing scientific / technical calculations using Python. ** ** Please refer to the official page [1] for a detailed explanation of the options. The definition of special functions is described in reference [2] in an easy-to-understand manner and is helpful.
This paper will be revised and revised as necessary.
● August 7, 2017: Added type 1 and type 2 perfect elliptic integrals.
** Application example in physics **: Proprietary solution for linear restoring force potential for steady-state Schrodinger equation in quantum mechanics [3], etc.
#Usage
from scipy.special import *
eval_hermite(n, x)
Application example in physics: [Laplace's equation](https://ja.wikipedia.org/wiki/%E3%83%A9%E3%83%97%E3%83%A9%E3%82%B9%E6% 96% B9% E7% A8% 8B% E5% BC% 8F) [4], Schrodinger equation of three-dimensional central force field [4], [multipole expansion] in electromagnetism (https://en.wikipedia.org) / wiki / Multipole_expansion) Appears in [4] etc.
#Usage
eval_legendre(n, x)
** Application example in physics **: Solution of Laplace's equation, representation of spherical harmonics
#Usage
lpmv(m, n, t)
$L_n(x) = \sum_{k=0}^n (-1)^k {n \choose k} \frac{n!}{k!} x^k $
** Application in physics **: Solving the radial Schrodinger equation under the Coulomb potential [4].
#Usage
eval_laguerre(n, x)
here
** Application example in physics **: Appears when the Schrodinger equation of the one-particle steady state for the spherically symmetric potential is separated into variables [3]. Also, since it forms a complete system in the angular direction, it is often used as an expansion basis for functions with angle dependence.
#Usage
sph_harm(m, l, theta, phi)
** Application in physics **: Often appears in statistical mechanics. Free Fermi electronic system specific heat formula [3,5], [Stirling's formula](https://ja.wikipedia.org/wiki/%E3%82%B9%E3%82%BF%E3%83%BC% Derivation of E3% 83% AA% E3% 83% B3% E3% 82% B0% E3% 81% AE% E8% BF% 91% E4% BC% BC) (asymptotic expansion of Γ function) [5], etc. ..
#Usage
gamma(z)
Logarithmic derivative of gamma function, $\psi^{(n)}(z) = \frac{d^{n+1}}{dz^{n+1}} \ln{\Gamma(z)} = \frac{d^n}{dz^n} \psi(z) $ Is called the polygamma function. Often used.
#Usage
polygamma(n, x)
#Usage
beta(x, y)
** Examples of applications in physics **: Laplace's equation [5], which appears when solving the Helmholtz equation in a column coordinate system or a polar coordinate system [4]. Propagation of electromagnetic waves, heat conduction of cylindrical objects, vibration solution of thin films [6], etc.
#Usage
jn(n, z) #Integer-order Bessel function
jv(v, z) #Bessel function of general degree
#Usage
yn(n,x) #Integer order
yv(v,z) #General degree
Special solution to Vessel's differential equation
#Usage
hankel1(v, z) #First-class Hankel function
[Vessel's differential equations] for pure imaginary variables (https://en.wikipedia.org/wiki/%E3%83%99%E3%83%83%E3%82%BB%E3%83%AB%E9% A special solution of 96% A2% E6% 95% B0).
#Usage
kn(n,x) #Integer order
kv(v,z) #General degree
** Application examples in physics **: Regular solution of Schrodinger equation of free particles in spherical coordinate system (non-regular solution is sphere Neumann function) [3], etc.
#Usage
spherical_jn(n, z, derivative=False)
** Application example in physics **: Classical by [WKB method] in quantum mechanics (https://ja.wikipedia.org/wiki/WKB%E8%BF%91%E4%BC%BC) [3] A solution that connects regression points, etc.
#Usage
airy(z)
** Application examples in physics **: Vibration of elliptical membrane [6], Parameter excitation in forced vibration [6], Solution of steady-state Schrodinger equation for triangular function type potential [3], In general relativity [Einstein equations](https://ja.wikipedia.org/wiki/%E3%82%A2%E3%82%A4%E3%83%B3%E3%82%B7%E3%83%A5%E3% 82% BF% E3% 82% A4% E3% 83% B3% E6% 96% B9% E7% A8% 8B% E5% BC% 8F), etc.
#Usage
mathieu_a(m, q) #Matthew cosine function
mathieu_b(m, q) #Matthew sine function
** Application example in physics **: Appears in large-amplitude pendulum motion [6], exact solution of 2D Ising model in statistical mechanics, etc.
#Usage: ellipk(m)
a=ellipk(0.45)
print(a)
Result: 1.81388393682
As $ m = k ^ 2 \ le 1 $
#Usage: ellipe(m)
a=ellipe(0.9)
print(a)
Result: 1.1047747327
[1] Scipy Official: Special functions
[2] Yoshitaka Onodera, [Applied Mathematics for Physics](https://www.amazon.co.jp/%E7%89%A9%E7%90%86%E3%81%AE%E3%81 % 9F% E3% 82% 81% E3% 81% AE% E5% BF% 9C% E7% 94% A8% E6% 95% B0% E5% AD% A6-% E5% B0% 8F% E9% 87% 8E%E5%AF%BA-%E5%98%89%E5%AD%9D/dp/4785320311/ref=sr_1_2?s=books&ie=UTF8&qid=1501826776&sr=1-2&keywords=%E5%B0%8F%E9% 87% 8E% E5% AF% BA +% E5% 98% 89% E5% AD% 9D), Shokabo, (1988); by Hirokazu Terazawa, [Introduction to Mathematics for Natural Scientists](https: // www.amazon.co.jp/%E8%87%AA%E7%84%B6%E7%A7%91%E5%AD%A6%E8%80%85%E3%81%AE%E3%81%9F % E3% 82% 81% E3% 81% AE% E6% 95% B0% E5% AD% A6% E6% A6% 82% E8% AB% 96-% E5% A2% 97% E8% A8% 82% E7% 89% 88-% E5% AF% BA% E6% B2% A2-% E5% AF% 9B% E4% B8% 80 / dp / 4000054805 / ref = sr_1_1? s = books & ie = UTF8 & qid = 1501697831 & sr = 1- 1 & keywords =% E8% 87% AA% E7% 84% B6% E7% A7% 91% E5% AD% A6% E8% 80% 85% E3% 81% AE% E3% 81% 9F% E3% 82% 81 % E3% 81% AE% E6% 95% B0% E5% AD% A6% E6% A6% 82% E8% AB% 96), Iwanami Shoten, (1983); by Tetsuro Inui, [Special Function](https:: //www.amazon.co.jp/%E7%89%B9%E6%AE%8A%E5%87%BD%E6%95%B0-%E5%B2%A9%E6%B3%A2%E5% 85% A8% E6% 9B% B8-252-% E7% 8A % AC% E4% BA% 95-% E9% 89% 84% E9% 83% 8E / dp / 4000214128), Iwanami Shoten, (1962).
[3] by Landau Rifsitz, [Quantum Mechanics](https://www.amazon.co.jp/%E9%87%8F%E5%AD%90%E5%8A%9B%E5%AD%A6% E2% 80% 95% E9% 9D% 9E% E7% 9B% B8% E5% AF% BE% E8% AB% 96% E7% 9A% 84% E7% 90% 86% E8% AB% 96-1- % E3% 83% A9% E3% 83% B3% E3% 83% 80% E3% 82% A6-% E3% 83% AA% E3% 83% 95% E3% 82% B7% E3% 83% 83% E3% 83% 84% E7% 90% 86% E8% AB% 96% E7% 89% A9% E7% 90% 86% E5% AD% A6% E6% 95% 99% E7% A8% 8B-% E3 % 83% AC% E3% 83% 95% E3% 83% BB% E3% 83% 80% E3% 83% 93% E3% 83% 89% E3% 83% B4% E3% 82% A3% E3% 83 % 81% E3% 83% BB% E3% 83% A9% E3% 83% B3% E3% 83% 80% E3% 82% A6 / dp / 4489000588), Tokyo Tosho, (1983); Kenichi Goto et al., [Quantum mechanics exercise](https://www.amazon.co.jp/%E8%A9%B3%E8%A7%A3%E7%90%86%E8%AB%96%E5%BF%9C%E7 % 94% A8% E9% 87% 8F% E5% AD% 90% E5% 8A% 9B% E5% AD% A6% E6% BC% 94% E7% BF% 92-% E5% BE% 8C% E8% 97% A4-% E6% 86% B2% E4% B8% 80 / dp / 4320031717 / ref = sr_1_1? S = books & ie = UTF8 & qid = 15018825682 & sr = 1-1 & keywords =% E9% 87% 8F% E5% AD% 90% E5% 8A% 9B% E5% AD% A6% E6% BC% 94% E7% BF% 92), Kyoritsu Publishing, (1982).
[4] by Shigenobu Sunakawa, [Theoretical Electromagnetism](https://www.amazon.co.jp/%E7%90%86%E8%AB%96%E9%9B%BB%E7%A3%81% E6% B0% 97% E5% AD% A6-% E7% A0% 82% E5% B7% 9D-% E9% 87% 8D% E4% BF% A1 / dp / 4314008547 / ref = sr_1_1? S = books & ie = UTF8 & qid = 15018259222 & sr = 1-1 & keywords =% E7% 90% 86% E8% AB% 96% E9% 9B% BB% E7% A3% 81% E6% B0% 97% E5% AD% A6) Third Edition, Kii Kuniya Bookstore, (1999).
[5] Ryogo Kubo, [University Exercise Thermology / Statistical Dynamics](https://www.amazon.co.jp/%E5%A4%A7%E5%AD%A6%E6%BC%94%E7 % BF% 92-% E7% 86% B1% E5% AD% A6% E3% 83% BB% E7% B5% B1% E8% A8% 88% E5% 8A% 9B% E5% AD% A6-% E4 % B9% 85% E4% BF% 9D-% E4% BA% AE% E4% BA% 94 / dp / 4785380322 / ref = sr_1_1? s = books & ie = UTF8 & qid = 1501826038 & sr = 1-1 & keywords =% E5% A4% A7 % E5% AD% A6% E6% BC% 94% E7% BF% 92% E3% 80% 80% E7% 86% B1% E5% AD% A6% E3% 83% BB% E7% B5% B1% E8 % A8% 88% E5% 8A% 9B% E5% AD% A6), Revised Edition, Shokabo, (1998).
[6] Morikazu Toda, [Vibration Theory](https://www.amazon.co.jp/%E6%8C%AF%E5%8B%95%E8%AB%96-%E6%96%B0 % E7% 89% A9% E7% 90% 86% E5% AD% A6% E3% 82% B7% E3% 83% AA% E3% 83% BC% E3% 82% BA-3-% E6% 88% B8% E7% 94% B0-% E7% 9B% 9B% E5% 92% 8C / dp / 4563024031 / ref = sr_1_2? s = books & ie = UTF8 & qid = 1501826199 & sr = 1-2 & keywords =% E6% 8C% AF% E5% 8B% 95% E8% AB% 96), Baifukan, (1968).