From 3aba88ca005ce951e8052d41d1cb4b448971c3ad Mon Sep 17 00:00:00 2001 From: canuel Date: Tue, 23 Aug 2022 16:19:51 +0200 Subject: chapter about recurrence relation of Legendre Associated Functions and Spherical Harmonics --- buch/papers/kugel/packages.tex | 4 +- buch/papers/kugel/proofs.tex | 2 +- buch/papers/kugel/references.bib | 9 ++ buch/papers/kugel/spherical-harmonics.tex | 166 ++++++++++++++++++++++++++++-- 4 files changed, 169 insertions(+), 12 deletions(-) (limited to 'buch/papers') diff --git a/buch/papers/kugel/packages.tex b/buch/papers/kugel/packages.tex index ead7653..c02589f 100644 --- a/buch/papers/kugel/packages.tex +++ b/buch/papers/kugel/packages.tex @@ -16,5 +16,5 @@ \node[gray, anchor = center] at ({#1 / 2}, {#2 / 2}) {\Huge \ttfamily \bfseries TODO}; \end{tikzpicture}} -\DeclareMathOperator{\sphlaplacian}{\nabla^2_{\mathit{S}}} -\DeclareMathOperator{\surflaplacian}{\nabla^2_{\partial \mathit{S}}} +\DeclareMathOperator{\sphlaplacian}{\nabla^2_{S}} +\DeclareMathOperator{\surflaplacian}{\nabla^2_{\partial S}} diff --git a/buch/papers/kugel/proofs.tex b/buch/papers/kugel/proofs.tex index 143caa8..4fbef26 100644 --- a/buch/papers/kugel/proofs.tex +++ b/buch/papers/kugel/proofs.tex @@ -166,7 +166,7 @@ \end{proof} -\begin{lemma} +\begin{lemma}\label{kugel:lemma:sol_associated_leg_eq} If $Z_n(z)$ is a solution of the Legendre equation \eqref{kugel:eqn:legendre}, then \begin{equation*} diff --git a/buch/papers/kugel/references.bib b/buch/papers/kugel/references.bib index e5d6452..e3c0f85 100644 --- a/buch/papers/kugel/references.bib +++ b/buch/papers/kugel/references.bib @@ -17,6 +17,15 @@ file = {Submitted Version:/Users/npross/Zotero/storage/SN4YUNQC/Carvalhaes and de Barros - 2015 - The surface Laplacian technique in EEG Theory and.pdf:application/pdf}, } +@article{implementation, + title = {New Implementation of Legendre Polynomials for Solving Partial Differential Equations}, + issn = {272767969}, + url = {https://www.researchgate.net/publication/272767969_New_Implementation_of_Legendre_Polynomials_for_Solving_Partial_Differential_Equations}, + shorttitle = {Implementation og Legendre Polynom}, + date = {2013-12}, + author = {Ali Davari, Abozar Ahmadi} +} + @video{minutephysics_better_2021, title = {A Better Way To Picture Atoms}, url = {https://www.youtube.com/watch?v=W2Xb2GFK2yc}, diff --git a/buch/papers/kugel/spherical-harmonics.tex b/buch/papers/kugel/spherical-harmonics.tex index 72f7402..7dcb461 100644 --- a/buch/papers/kugel/spherical-harmonics.tex +++ b/buch/papers/kugel/spherical-harmonics.tex @@ -313,22 +313,20 @@ obtain the \emph{associated Legendre functions}. The functions \begin{equation} P^m_n (z) = (1-z^2)^{\frac{m}{2}}\frac{d^{m}}{dz^{m}} P_n(z) - = \frac{1}{2^n n!}(1-z^2)^{\frac{m}{2}}\frac{d^{m+n}}{dz^{m+n}}(1-z^2)^n + = \frac{1}{2^n n!}(1-z^2)^{\frac{m}{2}}\frac{d^{m+n}}{dz^{m+n}}(1-z^2)^n, \quad |m| Date: Fri, 26 Aug 2022 16:59:18 +0200 Subject: added the chapter about spherical harmonic expansion and corrected some errors --- buch/papers/kugel/preliminaries.tex | 7 +- buch/papers/kugel/proofs.tex | 2 +- buch/papers/kugel/spherical-harmonics.tex | 183 ++++++++++++++++++++++-------- 3 files changed, 143 insertions(+), 49 deletions(-) (limited to 'buch/papers') diff --git a/buch/papers/kugel/preliminaries.tex b/buch/papers/kugel/preliminaries.tex index e48abe4..1fa78d7 100644 --- a/buch/papers/kugel/preliminaries.tex +++ b/buch/papers/kugel/preliminaries.tex @@ -1,6 +1,6 @@ % vim:ts=2 sw=2 et spell tw=78: -\section{Preliminaries} +\section{Preliminaries}\label{kugel:sec:preliminaries} The purpose of this section is to dust off some concepts that will become important later on. This will enable us to be able to get a richer and more @@ -318,11 +318,12 @@ convergence. \end{definition} \begin{theorem}[Fourier Theorem] - \[ + \label{fourier-theorem-1D} + \begin{equation*} \lim_{N \to \infty} \left \| f(x) - \sum_{n = -N}^N \hat{f}(n) E_n(x) \right \|_2 = 0 - \] + \end{equation*} \end{theorem} \begin{lemma} diff --git a/buch/papers/kugel/proofs.tex b/buch/papers/kugel/proofs.tex index 4fbef26..93b3857 100644 --- a/buch/papers/kugel/proofs.tex +++ b/buch/papers/kugel/proofs.tex @@ -1,5 +1,5 @@ % vim:ts=2 sw=2 et spell tw=80: -\section{Proofs} +\section{(long) Proofs} \subsection{Legendre Functions} \label{kugel:sec:proofs:legendre} diff --git a/buch/papers/kugel/spherical-harmonics.tex b/buch/papers/kugel/spherical-harmonics.tex index b3487be..f51a772 100644 --- a/buch/papers/kugel/spherical-harmonics.tex +++ b/buch/papers/kugel/spherical-harmonics.tex @@ -111,7 +111,10 @@ that satisfy the equation \surflaplacian f = -\lambda f. \end{equation} Perhaps it may not be obvious at first glance, but we are in fact dealing with a -partial differential equation (PDE) \kugeltodo{Boundary conditions?}. If we +partial differential equation (PDE)\footnote{ + Considering the fact that we are dealing with a PDE, + you may be wondering what are the boundary conditions. Well, since this eigenvalue problem is been developed on + the spherical surface (boundary of a sphere), the boundary in this case are empty, i.e no boundary condition has to be considered.}. unpack the notation of the operator $\nabla^2_{\partial S}$ according to definition \ref{kugel:def:surface-laplacian}, we get: @@ -283,7 +286,7 @@ representation} which are \end{equation*} respectively, both of which we will not prove (see chapter 3 of \cite{bell_special_2004} for a proof). Now that we have a solution for the -Legendre equation, we can make use of the following lemma patch the solutions +Legendre equation, we can make use of the following lemma to patch the solutions such that they also become solutions of the associated Legendre equation \eqref{kugel:eqn:associated-legendre}. @@ -317,7 +320,7 @@ obtain the \emph{associated Legendre functions}. \end{equation} are known as Ferrers or associated Legendre functions. \end{definition} -The constraint $|m| Date: Fri, 26 Aug 2022 23:01:40 +0200 Subject: some minor corrections --- buch/papers/kugel/references.bib | 2 +- buch/papers/kugel/spherical-harmonics.tex | 62 ++++++++++++++++++------------- 2 files changed, 38 insertions(+), 26 deletions(-) (limited to 'buch/papers') diff --git a/buch/papers/kugel/references.bib b/buch/papers/kugel/references.bib index e3c0f85..984d555 100644 --- a/buch/papers/kugel/references.bib +++ b/buch/papers/kugel/references.bib @@ -17,7 +17,7 @@ file = {Submitted Version:/Users/npross/Zotero/storage/SN4YUNQC/Carvalhaes and de Barros - 2015 - The surface Laplacian technique in EEG Theory and.pdf:application/pdf}, } -@article{implementation, +@article{usecase_recursion_paper, title = {New Implementation of Legendre Polynomials for Solving Partial Differential Equations}, issn = {272767969}, url = {https://www.researchgate.net/publication/272767969_New_Implementation_of_Legendre_Polynomials_for_Solving_Partial_Differential_Equations}, diff --git a/buch/papers/kugel/spherical-harmonics.tex b/buch/papers/kugel/spherical-harmonics.tex index f51a772..9349b61 100644 --- a/buch/papers/kugel/spherical-harmonics.tex +++ b/buch/papers/kugel/spherical-harmonics.tex @@ -685,23 +685,26 @@ harmonics, so from now on, unless specified otherwise when we say spherical harmonics or write $Y^m_n$, we mean the orthonormal spherical harmonics of definition \ref{kugel:def:spherical-harmonics-orthonormal}. -\subsection{Recurrence Relations}\kugeltodo[replace x with z] +\subsection{Recurrence Relations}\kugeltodo{replace x with z} The idea of this subsection is to introduce first some recursive relations regarding the Associated Legendre Functions, defined in eq.\eqref{kugel:def:ferrers-functions}. Subsequently we will extend them, in order to derive recurrence formulas for the case of Spherical Harmonic functions as well. \subsubsection{Associated Legendre Functions} To start this journey, we can first write the following equations, which relate the Associated Legendre functions of different indeces $m$ and $n$ recursively: -\begin{enumerate}[(i)] - \item $(2n+1) x P^m_n(z)= (m+n) P^m_{n-1}(z) + (n-m+1) P^m_{n+1}(z)$, \label{kugel:eq:rec_rel_1} - \item $\dfrac{2mz}{\sqrt{1-z^2}} P^m_n(z) = P^{m+1}_n(z) + [n(n+1)-m(m-1)] P^{m-1}_n(z)$, \label{kugel:eq:rec_rel_2} - \item $\sqrt{1-z^2} P^m_n(z) = \dfrac{1}{2n+1} \left[ P^{m+1}_{n+1}(z) - P^{m+1}_{n-1}(z) \right]$, \label{kugel:eq:rec_rel_3} - \item $\sqrt{1-z^2} P^m_n(z) = \dfrac{1}{2n+1} \left[ (n+m)(n+m-1)P^{m-1}_{n-1}(z) - (n-m+1)(n-m+2)P^{m-1}_{n+1}(z) \right]$. \label{kugel:eq:rec_rel_4} -\end{enumerate} +\begin{subequations} + \begin{align} + P^m_n(z) &= \dfrac{1}{(2n+1)x} \left[ (m+n) P^m_{n-1}(z) + (n-m+1) P^m_{n+1}(z) \right] \label{kugel:eq:rec-leg-1} \\ + P^m_n(z) &= \dfrac{\sqrt{1-z^2}}{2mz} \left[ P^{m+1}_n(z) + [n(n+1)-m(m-1)] P^{m-1}_n(z) \right] \label{kugel:eq:rec-leg-2} \\ + P^m_n(z) &= \dfrac{1}{(2n+1)\sqrt{1-z^2}} \left[ P^{m+1}_{n+1}(z) - P^{m+1}_{n-1}(z) \right] \label{kugel:eq:rec-leg-3} \\ + P^m_n(z) &= \dfrac{1}{(2n+1)\sqrt{1-z^2}} \left[ (n+m)(n+m-1)P^{m-1}_{n-1}(z) - (n-m+1)(n-m+2)P^{m-1}_{n+1}(z) \right] \label{kugel:eq:rec-leg-4} + \end{align} +\end{subequations} Much of the effort will be proving this bunch of equalities. Then, in the second part, where we will derive the recursion equations for $Y^m_n(\vartheta,\varphi)$, we will basically reuse the ones presented above. -Maybe it is worth mentioning at least one use case for these relations: They are widely used in some software implementations, as they lead to better numerical accuracy and computational cost lower by a factor of six\cite{usecase_recursion_paper}. +Maybe it is worth mentioning at least one use case for these relations: In some software implementations (that include lighting computations in computer graphics, antenna modelling softwares, 3-D modelling in medical applications, etc.) +they are widely used, as they lead to better numerical accuracy and computational cost lower by a factor of six\cite{usecase_recursion_paper}. \begin{enumerate}[(i)] \item \begin{proof} - This is the relation that links the associated Legendre functions with the same $m$ index but different $n$. Using \ref{} \kugeltodo{ref alla recurrence dei polinomi di legendre (è da qualche parte nel libro)}, we have + This is the relation that links the associated Legendre functions with the same $m$ index but different $n$. Using \ref{} \kugeltodo{search the general equation of recursion for orthogonal polynomials (is somewhere in the book)}, we have \begin{equation*} (n+1)P_{n+1}(z)-(2n+1)xP_n(z)+nP_{n-1}(z)=0, \end{equation*} @@ -749,9 +752,9 @@ Maybe it is worth mentioning at least one use case for these relations: They are \begin{equation*} P^{m+2}_n(x) - \frac{2(m+1)x}{\sqrt{1-x^2}}P^{m+1}_n(x) + [n(n+1)-m(m+1)]P^m_n(x)=0. \end{equation*} - Furthermore, we can adjust the indeces and terms, obtaining + Further, we can adjust the indeces and terms, obtaining \begin{equation*} - \frac{2mx}{\sqrt{(1-x^2)}} P^m_n(x) = P^{m+1}_n(x) + [n(n+1)-m(m-1)] P^{m-1}_n(x) + \frac{2mx}{\sqrt{(1-x^2)}} P^m_n(x) = P^{m+1}_n(x) + [n(n+1)-m(m-1)] P^{m-1}_n(x). \end{equation*} \end{proof} @@ -774,7 +777,7 @@ Maybe it is worth mentioning at least one use case for these relations: They are \item \begin{proof} - For this proof we can rely on (\ref{kugel:eq:rec_rel_1}), and therefore rewrite (\ref{kugel:eq:rec_rel_2}) as + For this proof we can rely on eq.\eqref{kugel:eq:rec-leg-1}, and therefore rewrite eq.\eqref{kugel:eq:rec-leg-2} as \begin{equation*} \frac{2m}{(2n+1)\sqrt{1-x^2}} \left[ (m+n)P^m_{n-1}(x) + (n-m+1)P^m_{n+1}(x) \right] = P^{m+1}_n(x) + [ n(n+1)-m(m-1) ]P^{m-1}_n(x). \end{equation*} @@ -793,18 +796,26 @@ Maybe it is worth mentioning at least one use case for these relations: They are \subsubsection{Spherical Harmonics} The goal of this subsection's part is to apply the recurrence relations of the $P^m_n(z)$ functions to the Spherical Harmonics. - With some little adjustments we will be able to have recursion equations for them too. As previously written the most of the work is already done. Now it is only a matter of minor mathematical operations/rearrangements. We can start by listing all of them: +\begin{subequations} + \begin{align} + Y^m_n(\vartheta, \varphi) &= \dfrac{1}{(2n+1)\cos \vartheta} \left[ (m+n)Y^m_{n-1}(\vartheta, \varphi) + (m-n+1)Y^m_{n+1}(\vartheta, \varphi) \right] \label{kugel:eq:rec-sph_harm-1} \\ + Y^m_n(\vartheta, \varphi) &= \dfrac{\tan \vartheta}{2m}\left[ Y^{m+1}_n(\vartheta, \varphi)e^{-i\varphi} + [n(n+1)-m(m-1)]Y^{m-1}_n(\vartheta, \varphi)e^{i\varphi} \right] \label{kugel:eq:rec-sph_harm-2} \\ + Y^m_n(\vartheta, \varphi) &= \dfrac{e^{-i\varphi}}{ (2n+1)\sin \vartheta } \left[ Y^{m+1}_{n+1}(\vartheta, \varphi) - Y^{m+1}_{n-1}(\vartheta, \varphi) \right] \label{kugel:eq:rec-sph_harm-3} \\ + Y^m_n(\vartheta, \varphi) &= \dfrac{e^{i\varphi}}{(2n+1)\sin \vartheta} \left[ (n+m)(n+m-1)Y^{m-1}_{n-1}(\vartheta, \varphi) - (n-m+1)(n-m+2)Y^{m-1}_{n+1}(\vartheta, \varphi) \right] \label{kugel:eq:rec-sph_harm-4} + \end{align} +\end{subequations} + \begin{enumerate}[(i)] - \item $Y^m_n(\vartheta, \varphi) = \dfrac{1}{(2n+1)\cos \vartheta} \left[ (m+n)Y^m_{n-1}(\vartheta, \varphi) + (m-n+1)Y^m_{n+1}(\vartheta, \varphi) \right]$ + \item \begin{proof} - We can multiply both sides of equality in eq.\eqref{} by $e^{im \varphi}$ and perform the substitution $z=\cos \vartheta$. After a few simple algebraic steps, we will obtain the relation we are looking for + We can multiply both sides of equality in eq.\eqref{kugel:eq:rec-leg-1} by $e^{im \varphi}$ and perform the substitution $z=\cos \vartheta$. After a few simple algebraic steps, we will obtain the relation we are looking for \end{proof} - \item $Y^m_n(\vartheta, \varphi) = \dfrac{\tan \vartheta}{2m}\left[ Y^{m+1}_n(\vartheta, \varphi)e^{-i\varphi} + [n(n+1)-m(m-1)]Y^{m-1}_n(\vartheta, \varphi)e^{i\varphi} \right]$ + \item \begin{proof} - In this proof, as before, we can perform the substitution $z=\cos \vartheta$, and notice that $\sqrt{1-z^2}=\sin \vartheta$, hence, the relation in eq.\eqref{} will be + In this proof, as before, we can perform the substitution $z=\cos \vartheta$, and notice that $\sqrt{1-z^2}=\sin \vartheta$, hence, the relation in eq.\eqref{kugel:eq:rec-leg-2} will be \begin{equation*} \frac{2m \cos \vartheta}{\sin \vartheta} P^m_n(\cos \vartheta) = P^{m+1}_n(\cos \vartheta) + [n(n+1)-m(m-1)]P^{m-1}_n P^m_n(\cos \vartheta). \end{equation*} @@ -812,34 +823,35 @@ We can start by listing all of them: \begin{align*} \frac{2m \cos \vartheta}{\sin \vartheta} P^m_n(\cos \vartheta)e^{im\varphi} &= P^{m+1}_n(\cos \vartheta)e^{im\varphi} + [n(n+1)-m(m-1)]P^{m-1}_n P^m_n(\cos \vartheta)e^{im\varphi} \\ &= P^{m+1}_n(\cos \vartheta)e^{i(m+1)\varphi}e^{-i\varphi} + [n(n+1)-m(m-1)]P^{m-1}_n (\cos \vartheta)e^{i(m-1)\varphi}e^{i\varphi} \\ - &= Y^{m+1}_n(\vartheta, \varphi)e^{-i\varphi} + [n(n+1)-m(m-1)]Y^{m-1}_n(\vartheta, \varphi)e^{i\varphi} \\ + &= Y^{m+1}_n(\vartheta, \varphi)e^{-i\varphi} + [n(n+1)-m(m-1)]Y^{m-1}_n(\vartheta, \varphi)e^{i\varphi}. \end{align*} Finally, after some ``cleaning'' \begin{equation*} Y^m_n(\vartheta, \varphi) = \frac{\tan \vartheta}{2m} \left[ Y^{m+1}_n(\vartheta, \varphi)e^{-i\varphi} + [n(n+1)-m(m-1)]Y^{m-1}_n(\vartheta, \varphi)e^{i\varphi} \right] \end{equation*} \end{proof} - \item $Y^m_n(\vartheta, \varphi) = \dfrac{e^{-i\varphi}}{ (2n+1)\sin \vartheta } \left[ Y^{m+1}_{n+1}(\vartheta, \varphi) - Y^{m+1}_{n-1}(\vartheta, \varphi) \right]$ + \item \begin{proof} - Now we can consider eq.\eqref{}, and multiply it by $e^{im\varphi}$. After the usual substitution $z=\cos \vartheta$, we have + Now we can consider eq.\eqref{kugel:eq:rec-leg-3}, and multiply it by $e^{im\varphi}$. After the usual substitution $z=\cos \vartheta$, we have \begin{align*} \sin \vartheta P^m_n(\cos \vartheta)e^{im\varphi} &= \dfrac{e^{im\varphi}}{2n+1}\left[ P^{m+1}_{n+1}(\cos \vartheta) - P^{m+1}_{n-1}(\cos \vartheta)\right] \\ - &= \dfrac{e^{-i\varphi}}{2n+1}\left[ P^{m+1}_{n+1}(\cos \vartheta)e^{i(m+1)\varphi} - P^{m+1}_{n-1}(\cos \vartheta)e^{i(m+1)\varphi}\right] \\ + &= \dfrac{e^{-i\varphi}}{2n+1}\left[ P^{m+1}_{n+1}(\cos \vartheta)e^{i(m+1)\varphi} - P^{m+1}_{n-1}(\cos \vartheta)e^{i(m+1)\varphi}\right]. \end{align*} A few manipulations later, we will obtain \begin{equation*} - Y^m_n(\vartheta, \varphi) = \frac{e^{-i\varphi}}{(2n+1)\sin \vartheta} \left[ Y^{m+1}_{n+1}(\vartheta, \varphi)-Y^{m+1}_{n-1}(\vartheta, \varphi) \right] + Y^m_n(\vartheta, \varphi) = \frac{e^{-i\varphi}}{(2n+1)\sin \vartheta} \left[ Y^{m+1}_{n+1}(\vartheta, \varphi)-Y^{m+1}_{n-1}(\vartheta, \varphi) \right]. \end{equation*} \end{proof} - \item $Y^m_n(\vartheta, \varphi) = \dfrac{e^{i\varphi}}{(2n+1)\sin \vartheta} \left[ (n+m)(n+m-1)Y^{m-1}_{n-1}(\vartheta, \varphi) - (n-m+1)(n-m+2)Y^{m-1}_{n+1}(\vartheta, \varphi) \right]$ + \item \begin{proof} This proof is very similar to the previous one. We just have to perform the substitution $z = \cos \vartheta$, as always. Secondly we can multiply the right side by $e^{im\varphi}$ and the left one too but in a different form, namely $e^{im\varphi}=e^{i(m-1)\varphi}e^{i\varphi}$. Then it is only a question of recalling the definition of $Y^m_n(\vartheta, \varphi)$. \end{proof} \end{enumerate} \section{Series Expansions in $L^2(S^2)$} - -We want now to recall the definition of the inner product on the spherical surface of definition \ref{kugel:def:inner-product-s2} +We have now reach a point where we have all the tools that are necessary to build something truly amazing: a general series expansion formula for +function on the surface of the sphere. +Before starting we want to recall the definition of the inner product on the spherical surface of definition \ref{kugel:def:inner-product-s2} \begin{equation*} \langle f, g \rangle = \int_{0}^\pi \int_0^{2\pi} -- cgit v1.2.1