From f0a65873ef71c3b2055e033fb81aedc6058d0cf3 Mon Sep 17 00:00:00 2001 From: ajarifi Date: Wed, 29 Jul 2026 14:02:34 +0900 Subject: [PATCH] add comments on instability issue and n max. --- src/CoulombTwoBody.jl | 6 ++++++ src/HarmonicOscillator.jl | 3 +++ src/HydrogenAtom.jl | 6 ++++++ src/MorsePotential.jl | 3 +++ src/PoschlTeller.jl | 3 +++ src/RigidRotor.jl | 3 +++ src/SphericalOscillator.jl | 6 ++++++ 7 files changed, 30 insertions(+) diff --git a/src/CoulombTwoBody.jl b/src/CoulombTwoBody.jl index 7fceb40..2283d80 100644 --- a/src/CoulombTwoBody.jl +++ b/src/CoulombTwoBody.jl @@ -213,6 +213,9 @@ where ``\frac{1}{\mu} = \frac{1}{m_1}+\frac{1}{m_2}``, ``a_\mu = a_0 \frac{m_\ma !!! note The associated Laguerre polynomials $L_n^{k}(x)$, not the generalized Laguerre polynomials $L_n^{(\alpha)}(x)$, are used in this model. +!!! note + The closed-form expression has been verified to be numerically stable up to $n=10$. For larger $n$, numerical instabilities may arise; a recurrence-relation implementation will address this limitation. + Rodrigues' formula & closed-form: ```math \begin{aligned} @@ -264,6 +267,9 @@ i^{|m|+m} \sqrt{\frac{(l-|m|)!}{(l+|m|)!}} P_l^{|m|} = (-1)^{\frac{|m|+m}{2}} \s @doc raw""" `legendre_polynomial(model::CoulombTwoBody, x; n=0, m=0)` +!!! note + The closed-form expression has been verified to be numerically stable up to $n=10$. For larger $n$, numerical instabilities may arise; a recurrence-relation implementation will address this limitation. + Rodrigues' formula & closed-form: ```math \begin{aligned} diff --git a/src/HarmonicOscillator.jl b/src/HarmonicOscillator.jl index f755f68..fd0ffe7 100644 --- a/src/HarmonicOscillator.jl +++ b/src/HarmonicOscillator.jl @@ -135,6 +135,9 @@ where ``\omega = \sqrt{k/m}``, ``\xi = \sqrt{\frac{m\omega}{\hbar}}x``, ``A_n = @doc raw""" `laguerre_polynomial(model::HarmonicOscillator, x; n=0)` +!!! note + The closed-form expression has been verified to be numerically stable up to $n=10$. For larger $n$, numerical instabilities may arise; a recurrence-relation implementation will address this limitation. + Rodrigues' formula & closed-form: ```math \begin{aligned} diff --git a/src/HydrogenAtom.jl b/src/HydrogenAtom.jl index c612e33..411cc37 100644 --- a/src/HydrogenAtom.jl +++ b/src/HydrogenAtom.jl @@ -179,6 +179,9 @@ where the Laguerre polynomials are defined as ``L_n(x) = \frac{1}{n!} \mathrm{e} !!! note The associated Laguerre polynomials $L_n^{k}(x)$, not the generalized Laguerre polynomials $L_n^{(\alpha)}(x)$, are used in this model. +!!! note + The closed-form expression has been verified to be numerically stable up to $n=10$. For larger $n$, numerical instabilities may arise; a recurrence-relation implementation will address this limitation. + Rodrigues' formula & closed-form: ```math \begin{aligned} @@ -230,6 +233,9 @@ i^{|m|+m} \sqrt{\frac{(l-|m|)!}{(l+|m|)!}} P_l^{|m|} = (-1)^{\frac{|m|+m}{2}} \s @doc raw""" `legendre_polynomial(model::HydrogenAtom, x; n=0, m=0)` +!!! note + The closed-form expression has been verified to be numerically stable up to $n=10$. For larger $n$, numerical instabilities may arise; a recurrence-relation implementation will address this limitation. + Rodrigues' formula & closed-form: ```math \begin{aligned} diff --git a/src/MorsePotential.jl b/src/MorsePotential.jl index bc135f1..ac6b3be 100644 --- a/src/MorsePotential.jl +++ b/src/MorsePotential.jl @@ -181,6 +181,9 @@ where ``\omega = \sqrt{k/ยต}`` is defined. !!! note The generalized Laguerre polynomials $L_n^{(\alpha)}(x)$, not the associated Laguerre polynomials $L_n^{k}(x)$, are used in this model. +!!! note + The closed-form expression has been verified to be numerically stable up to $n=10$. For larger $n$, numerical instabilities may arise; a recurrence-relation implementation will address this limitation. + Rodrigues' formula & closed-form: ```math \begin{aligned} diff --git a/src/PoschlTeller.jl b/src/PoschlTeller.jl index d1e9545..39204d4 100644 --- a/src/PoschlTeller.jl +++ b/src/PoschlTeller.jl @@ -167,6 +167,9 @@ where ``\mu = \mu(n) = n_\mathrm{max}-n+1``, and ``n_\mathrm{max} = \left\lfloor @doc raw""" `legendre_polynomial(model::PoschlTeller, x; n=0, m=0)` +!!! note + The closed-form expression has been verified to be numerically stable up to $n=10$. For larger $n$, numerical instabilities may arise; a recurrence-relation implementation will address this limitation. + Associated Legendre polynomials are the associated Legendre functions for integer indices. Here we use the same notation of the associated Legendre functions as in the model HydrogenAtom. ```math diff --git a/src/RigidRotor.jl b/src/RigidRotor.jl index 6bfc282..a34d5b7 100644 --- a/src/RigidRotor.jl +++ b/src/RigidRotor.jl @@ -150,6 +150,9 @@ i^{|m|+m} \sqrt{\frac{(l-|m|)!}{(l+|m|)!}} P_l^{|m|} = (-1)^{\frac{|m|+m}{2}} \s @doc raw""" `legendre_polynomial(model::RigidRotor, x; n=0, m=0)` +!!! note + The closed-form expression has been verified to be numerically stable up to $n=10$. For larger $n$, numerical instabilities may arise; a recurrence-relation implementation will address this limitation. + Rodrigues' formula & closed-form: ```math \begin{aligned} diff --git a/src/SphericalOscillator.jl b/src/SphericalOscillator.jl index 0e8a4c2..2427709 100644 --- a/src/SphericalOscillator.jl +++ b/src/SphericalOscillator.jl @@ -174,6 +174,9 @@ where ``\gamma = \mu\omega/\hbar`` and ``\xi = \sqrt{\gamma}r = \sqrt{\mu\omega/ !!! note The generalized Laguerre polynomials $L_n^{(\alpha)}(x)$, not the associated Laguerre polynomials $L_n^{k}(x)$, are used in this model. +!!! note + The closed-form expression has been verified to be numerically stable up to $n=10$. For larger $n$, numerical instabilities may arise; a recurrence-relation implementation will address this limitation. + Rodrigues' formula & closed-form: ```math \begin{aligned} @@ -222,6 +225,9 @@ i^{|m|+m} \sqrt{\frac{(l-|m|)!}{(l+|m|)!}} P_l^{|m|} = (-1)^{\frac{|m|+m}{2}} \s @doc raw""" `legendre_polynomial(model::SphericalOscillator, x; n=0, m=0)` +!!! note + The closed-form expression has been verified to be numerically stable up to $n=10$. For larger $n$, numerical instabilities may arise; a recurrence-relation implementation will address this limitation. + Rodrigues' formula & closed-form: ```math \begin{aligned}