From 39cbd7098d35d0f39c7890580653a8110d73fb6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor?= Date: Mon, 13 Nov 2023 18:19:08 +0100 Subject: [PATCH] updated numerical methods pdes --- .../Numerical_methods/Numerical_methods.tex | 2 +- .../Numerical_methods_for_PDEs.tex | 36 ++++++++++++++++--- 2 files changed, 32 insertions(+), 6 deletions(-) diff --git a/Mathematics/2nd/Numerical_methods/Numerical_methods.tex b/Mathematics/2nd/Numerical_methods/Numerical_methods.tex index 98ff9bf..f21ccf7 100644 --- a/Mathematics/2nd/Numerical_methods/Numerical_methods.tex +++ b/Mathematics/2nd/Numerical_methods/Numerical_methods.tex @@ -316,7 +316,7 @@ \begin{minipage}{\linewidth} \centering \includestandalone[mode=image|tex,width=0.95\linewidth]{Images/runge} - \captionof{figure}{Runge's phenomenon. In this case $f(x)=\frac{1}{1+25x^2}$. $p_5(x)$ is the 5th-order Lagrange interpolating polynomial with equally-spaced interpolating points; $p_9(x)$, the 9th-order Lagrange interpolating polynomial with equally-spaced interpolating points, and $p_{13}(x)$, the 13th-order Lagrange interpolating polynomial with equally-spaced interpolating points.} + \captionof{figure}{\emph{Runge's phenomenon}. In this case $f(x)=\frac{1}{1+25x^2}$. $p_5(x)$ is the 5th-order Lagrange interpolating polynomial with equally-spaced interpolating points; $p_9(x)$, the 9th-order Lagrange interpolating polynomial with equally-spaced interpolating points, and $p_{13}(x)$, the 13th-order Lagrange interpolating polynomial with equally-spaced interpolating points.} \label{NM:fig_runge} \end{minipage} \end{center} diff --git a/Mathematics/5th/Numerical_methods_for_PDEs/Numerical_methods_for_PDEs.tex b/Mathematics/5th/Numerical_methods_for_PDEs/Numerical_methods_for_PDEs.tex index 098a1a9..6c3fcfc 100644 --- a/Mathematics/5th/Numerical_methods_for_PDEs/Numerical_methods_for_PDEs.tex +++ b/Mathematics/5th/Numerical_methods_for_PDEs/Numerical_methods_for_PDEs.tex @@ -289,20 +289,30 @@ \end{remark} \subsubsection{Non-periodic problems} \begin{remark} - Recall that using trigonometric polynomials as trial functions for problems with non-periodic boundary conditions can lead to the Gibbs phenomenon. To prevent that from happening, we will usually use algebraic polynomials as trial functions. But in that case, we need to choose the collocation points carefully, to prevent the so-called \emph{Runge phenomenon} (see \mcref{NM:fig_runge}). + Recall that using trigonometric polynomials as trial functions for problems with non-periodic boundary conditions can lead to the Gibbs phenomenon. To prevent that from happening, we will use algebraic polynomials as trial functions. But in that case, we need to choose the collocation points carefully, to prevent the so-called Runge phenomenon (see \mcref{NM:fig_runge}). - In this section we will only consider one case of polynomial trial functions, the so-called \emph{Chebyshev polynomials} (see \mcref{NM:chebyshev_poly}). + In this section we will only consider one case of polynomial trial functions, the so-called Chebyshev polynomials (see \mcref{NM:chebyshev_poly}). \end{remark} \begin{definition} - Given a real-valued function $u$ defined in $[-1,1]$ and $N\in\NN$, we define the \emph{interpolant} of $u$ choosing set of orthogonal polynomials $\{ p_k\}_{k\in\NN\cup\{0\}}$ with weight function $\omega(x)$ as: + Given a real-valued function $u$ defined in $[-1,1]$ and $N\in\NN$, we define the \emph{interpolant} of $u$ with orthogonal polynomials $\{p_k\}_{k\in\NN\cup\{0\}}$ and weight function $\omega(x)$ as: $$ I_Nu(x)=\sum_{k=0}^N \tilde{u}_k p_k(x) $$ - where $\tilde{u}_k=\frac{1}{\gamma_k}\sum_{j=0}^N u(x_j)p_k(x_j)\omega_j$, $\gamma_k=\sum_{j=0}^N p_k(x_j)^2\omega_j$, $x_j$ are the chosen nodes and $\omega_j$ are the weights corresponding to the Gau\ss-Lobatto formula: + where $\displaystyle \tilde{u}_k=\frac{1}{\gamma_k}\sum_{j=0}^N u(x_j)p_k(x_j)\omega_j$, $\displaystyle\gamma_k=\sum_{j=0}^N p_k(x_j)^2\omega_j$, $x_j$ are the chosen nodes and $\omega_j$ are the weights corresponding to the Gau\ss-Lobatto formula: $$ - \sum_{j=0}^N\abs{x_j}^2 \omega_j= + \sum_{j=0}^N{x_j}^k\omega_j=\int_{-1}^1{x}^k\omega(x)\dd{x} $$ \end{definition} + \begin{remark} + Recall that from Gau\ss\ quadrature, we have + $$ + \sum_{j=0}^N u(x_j) v(x_j) \omega_j = \int_{-1}^1 u(x) v(x) \omega(x) \dd{x} + $$ + for all $uv\in \mathcal{P}_{2N-1}$ (space of polynomials of degree less than $2N-1$). + \end{remark} + \begin{remark} + Recall that the Chebyshev polynomials are those defined by being the family of orthogonal polynomials with respect to the weight function $\omega(x)=\frac{1}{\sqrt{1-x^2}}$ in $[-1,1]$. + \end{remark} \begin{lemma} Chebyshev polynomials satisfy the following properties: \begin{enumerate} @@ -311,5 +321,21 @@ \item $2T_k(x)=\frac{1}{k+1}{(T_{k+1})}'(x)-\frac{1}{k-1}{(T_{k-1})}'(x)$ $\forall k\in\NN$, and ${(T_0)}'(x)=0$ and ${(T_1)}'(x)=1$. \end{enumerate} \end{lemma} + \begin{proposition} + For Chebyshev polynomials, we have $\omega_j=\frac{\pi}{N\bar{c_j}}$ with $\bar{c_j}=2-\indi{0