diff options
-rw-r--r-- | day1/data/pos.txt | 41 | ||||
-rw-r--r-- | day1/session3.tex | 17 | ||||
-rw-r--r-- | day1/session5.tex | 1 | ||||
-rw-r--r-- | day1/session6.tex | 10 |
4 files changed, 55 insertions, 14 deletions
diff --git a/day1/data/pos.txt b/day1/data/pos.txt new file mode 100644 index 0000000..adf92c8 --- /dev/null +++ b/day1/data/pos.txt @@ -0,0 +1,41 @@ +0. 0. +0.25 0.47775 +0.5 0.931 +0.75 1.35975 +1. 1.764 +1.25 2.14375 +1.5 2.499 +1.75 2.82975 +2. 3.136 +2.25 3.41775 +2.5 3.675 +2.75 3.90775 +3. 4.116 +3.25 4.29975 +3.5 4.459 +3.75 4.59375 +4. 4.704 +4.25 4.78975 +4.5 4.851 +4.75 4.88775 +5. 4.9 +5.25 4.88775 +5.5 4.851 +5.75 4.78975 +6. 4.704 +6.25 4.59375 +6.5 4.459 +6.75 4.29975 +7. 4.116 +7.25 3.90775 +7.5 3.675 +7.75 3.41775 +8. 3.136 +8.25 2.82975 +8.5 2.499 +8.75 2.14375 +9. 1.764 +9.25 1.35975 +9.5 0.931 +9.75 0.47775 +10. 0. diff --git a/day1/session3.tex b/day1/session3.tex index d2eb24a..7019a7c 100644 --- a/day1/session3.tex +++ b/day1/session3.tex @@ -588,18 +588,19 @@ In []: TSq = T*T \item A is also called a Van der Monde matrix \item It can be generated using \typ{vander} \end{itemize} -Van der Monde matrix of order M +\begin{lstlisting} +In []: A = vander(L, 2) +\end{lstlisting} +Gives the required Van der Monde matrix \begin{equation*} \begin{bmatrix} - l_1^{M-1} & \ldots & l_1 & 1 \\ - l_2^{M-1} & \ldots &l_2 & 1 \\ - \vdots & \ldots & \vdots & \vdots\\ - l_N^{M-1} & \ldots & l_N & 1 \\ + l_1 & 1 \\ + l_2 & 1 \\ + \vdots & \vdots\\ + l_N & 1 \\ \end{bmatrix} \end{equation*} -\begin{lstlisting} -In []: A = vander(L,2) -\end{lstlisting} + \end{frame} \begin{frame}[fragile] diff --git a/day1/session5.tex b/day1/session5.tex index a8f56b2..70c02f8 100644 --- a/day1/session5.tex +++ b/day1/session5.tex @@ -129,7 +129,6 @@ \begin{frame}[fragile] \frametitle{Interpolation} \begin{itemize} -\item Let us begin with interpolation \item Let's use the L and T arrays and interpolate this data to obtain data at new points \end{itemize} \begin{lstlisting} diff --git a/day1/session6.tex b/day1/session6.tex index 4b69748..6b02b9a 100644 --- a/day1/session6.tex +++ b/day1/session6.tex @@ -285,7 +285,7 @@ In []: pend_sol = odeint(pend_int, %% \end{frame} \begin{frame}[fragile] -\frametitle{Newton Raphson Method} +\frametitle{Newton-Raphson Method} \begin{enumerate} \item Start with an initial guess of x for the root \item $\Delta x = -f(x)/f^{'}(x)$ @@ -295,7 +295,7 @@ In []: pend_sol = odeint(pend_int, \end{frame} %% \begin{frame}[fragile] -%% \frametitle{Newton Raphson \dots} +%% \frametitle{Newton-Raphson \dots} %% \begin{lstlisting} %% In []: def our_df(x): %% ....: return -sin(x)-2*x @@ -310,10 +310,10 @@ In []: pend_sol = odeint(pend_int, %% \end{frame} \begin{frame}[fragile] -\frametitle{Newton Raphson \ldots} +\frametitle{Newton-Raphson \ldots} \begin{itemize} \item What if $f^{'}(x) = 0$? -\item Can you write a better version of the Newton Raphson? +\item Can you write a better version of the Newton-Raphson? \item What if the differential is not easy to calculate? \item Look at Secant Method \end{itemize} @@ -368,7 +368,7 @@ In []: from scipy.optimize import newton \item Finding Roots \begin{itemize} \item Estimating Interval - \item Newton Raphson + \item Newton-Raphson \item Scipy methods \end{itemize} \end{itemize} |