diff --git a/Lectures_my/NumMet/Lecture2/mchrzasz.tex b/Lectures_my/NumMet/Lecture2/mchrzasz.tex index d374721..ceb7088 100644 --- a/Lectures_my/NumMet/Lecture2/mchrzasz.tex +++ b/Lectures_my/NumMet/Lecture2/mchrzasz.tex @@ -696,13 +696,63 @@ p_k&=\frac{y_k}{h_k}-\frac{m_k h_k}{6}\\ p_{k+1}&=\frac{y_{k+1}}{h_{k+1}}-\frac{m_{k+1} h_{k+1}}{6} \end{align*} +\ARROW Putting all the things together: +\begin{align} +S_k(x)= &\frac{m_k}{6h_k} (x_k-x)^3 + \frac{m_{k+1}}{6h_k}(x-x_k)^3+ \left( \frac{y_k}{h_k} -\frac{m_k h_k}{6}\right) (x_{k+1}-x)\\ + & \left(\frac{y_{k+1}}{h_k} - \frac{m_{k+1} h_k}{6} \right) (x-x_k) +\label{eq:almostthere} +\end{align} +\end{small} +\end{frame} + + +\begin{frame}\frametitle{Third degree splain function} +\begin{small} +\ARROW The only unknown in the above equation are the $m_i$ variables. To get those we need to use the equation: $S^{\prime}_{k-1}(x_k)=s^{\prime}(x_k)$: +\begin{align*} +-\frac{1}{3}m_k h_k - \frac{1}{6} m_{k+1}h_k + d_k = \frac{1}{3}m_k h_{k-1} + \frac{1}{6}m_{k-1}h_{k-1}+d_{k-1} +\end{align*} +\ARROW So the complete solution is: +\begin{align*} +a_{k,0}&=y_k\\ +a_{k,1}&=d_k -\frac{h_k}{6}(2m_k+m_{k+1})\\ +a_{k,2}&= \frac{m_k}{2}\\ +a_{k,3}&= \frac{m_{k+1}-m_k}{6 h_k} +\end{align*} +\ARROW To get the $m_0$ and $m_n$ one needs to use one of the aforementioned conditions. + +\end{small} +\end{frame} + + +\begin{frame}\frametitle{Third degree splain function algorithm} +\begin{small} + +\begin{itemize} +\item Get the input interpolation points. +\item Calculate the temporary variables: $d_i, h_i$. +\item Assume adequate conditions to get $m_0$, $m_n$. +\item Solve linear equation system. +\item Obtained values of the $a_{i,j}$ coefficients put in the interpolation equation. +\end{itemize} + \end{small} \end{frame} +\begin{frame}\frametitle{Summary} +\begin{small} +\ARROW Interpolation playes essential role in almost all numerical methods!\\ +\ARROW Even an very old algorithms like Lagrange are still used(we used it in splains).\\ +\ARROW There is a lot of algorithms on the market. From simple Lagrange and Newton interpolation algorithms up to modern splains.\\ +\ARROW The most common used today are splains. They require a bit of work but they work very effectively.\\ + + + +\end{small} +\end{frame} \backupbegin