summaryrefslogtreecommitdiff
path: root/day1
diff options
context:
space:
mode:
authorPuneeth Chaganti2009-11-05 09:21:11 +0530
committerPuneeth Chaganti2009-11-05 09:21:11 +0530
commit337939cff3fa5a44de4f04d596660c00d5410382 (patch)
tree67e1bd17d633f258cbdfdaa6b00d08cbbd649a55 /day1
parent71ee07a230d3b2a0cbf45b8104dba04b1a6e467c (diff)
downloadworkshops-337939cff3fa5a44de4f04d596660c00d5410382.tar.gz
workshops-337939cff3fa5a44de4f04d596660c00d5410382.tar.bz2
workshops-337939cff3fa5a44de4f04d596660c00d5410382.zip
Commented out all finding roots content in session6.
Diffstat (limited to 'day1')
-rwxr-xr-xday1/session6.tex133
1 files changed, 64 insertions, 69 deletions
diff --git a/day1/session6.tex b/day1/session6.tex
index 06e2eb0..efa20b6 100755
--- a/day1/session6.tex
+++ b/day1/session6.tex
@@ -226,18 +226,18 @@ In []: pend_sol = odeint(pend_int,
%% \end{lstlisting}
%% \end{frame}
-\begin{frame}[fragile]
-\frametitle{Bisection Method}
-\begin{enumerate}
-\item Start with the given interval $(-\pi/2, \pi/2)$ ($(a, b)$)
-\item $f(a)\cdot f(b) < 0$
-\item Bisect the interval. $c = \frac{a+b}{2}$
-\item Change the interval to $(a, c)$ if $f(a)\cdot f(c) < 0$
-\item Else, change the interval to $(c, b)$
-\item Go back to 3 until $(b-a) \le$ tolerance
-\end{enumerate}
-\alert{\typ{tolerance = 1e-5}}
-\end{frame}
+%% \begin{frame}[fragile]
+%% \frametitle{Bisection Method}
+%% \begin{enumerate}
+%% \item Start with the given interval $(-\pi/2, \pi/2)$ ($(a, b)$)
+%% \item $f(a)\cdot f(b) < 0$
+%% \item Bisect the interval. $c = \frac{a+b}{2}$
+%% \item Change the interval to $(a, c)$ if $f(a)\cdot f(c) < 0$
+%% \item Else, change the interval to $(c, b)$
+%% \item Go back to 3 until $(b-a) \le$ tolerance
+%% \end{enumerate}
+%% \alert{\typ{tolerance = 1e-5}}
+%% \end{frame}
%% \begin{frame}[fragile]
%% \frametitle{Bisection \dots}
@@ -255,15 +255,15 @@ In []: pend_sol = odeint(pend_int,
%% \end{lstlisting}
%% \end{frame}
-\begin{frame}[fragile]
-\frametitle{Newton-Raphson Method}
-\begin{enumerate}
-\item Start with an initial guess of x for the root
-\item $\Delta x = -f(x)/f^{'}(x)$
-\item $ x \leftarrow x + \Delta x$
-\item Go back to 2 until $|\Delta x| \le$ tolerance
-\end{enumerate}
-\end{frame}
+%% \begin{frame}[fragile]
+%% \frametitle{Newton-Raphson Method}
+%% \begin{enumerate}
+%% \item Start with an initial guess of x for the root
+%% \item $\Delta x = -f(x)/f^{'}(x)$
+%% \item $ x \leftarrow x + \Delta x$
+%% \item Go back to 2 until $|\Delta x| \le$ tolerance
+%% \end{enumerate}
+%% \end{frame}
%% \begin{frame}[fragile]
%% \frametitle{Newton-Raphson \dots}
@@ -290,41 +290,41 @@ In []: pend_sol = odeint(pend_int,
%% \end{itemize}
%% \end{frame}
-\begin{frame}[fragile]
-\frametitle{Initial Estimates}
-\begin{itemize}
-\item Given an interval
-\item How to find \alert{all} the roots?
-\end{itemize}
-\begin{enumerate}
-\item Check for change of signs of $f(x)$ in the given interval
-\item A root lies in the interval where the sign change occurs
-\end{enumerate}
-\end{frame}
+%% \begin{frame}[fragile]
+%% \frametitle{Initial Estimates}
+%% \begin{itemize}
+%% \item Given an interval
+%% \item How to find \alert{all} the roots?
+%% \end{itemize}
+%% \begin{enumerate}
+%% \item Check for change of signs of $f(x)$ in the given interval
+%% \item A root lies in the interval where the sign change occurs
+%% \end{enumerate}
+%% \end{frame}
-\begin{frame}[fragile]
-\frametitle{Initial Estimates \ldots}
-\begin{lstlisting}
-In []: def our_f(x):
- ....: return cos(x) - x*x
- ....:
-In []: x = linspace(-pi/2, pi/2, 11)
-In []: y = our_f(x)
-\end{lstlisting}
-Get the intervals of x, where sign changes occur
-\end{frame}
+%% \begin{frame}[fragile]
+%% \frametitle{Initial Estimates \ldots}
+%% \begin{lstlisting}
+%% In []: def our_f(x):
+%% ....: return cos(x) - x*x
+%% ....:
+%% In []: x = linspace(-pi/2, pi/2, 11)
+%% In []: y = our_f(x)
+%% \end{lstlisting}
+%% Get the intervals of x, where sign changes occur
+%% \end{frame}
-\begin{frame}[fragile]
-\frametitle{Initial Estimates \ldots}
-\begin{lstlisting}
-In []: pos = y[:-1]*y[1:] < 0
-In []: rpos = zeros(x.shape, dtype=bool)
-In []: rpos[:-1] = pos
-In []: rpos[1:] += pos
-In []: rts = x[rpos]
-\end{lstlisting}
-Now use Newton-Raphson?
-\end{frame}
+%% \begin{frame}[fragile]
+%% \frametitle{Initial Estimates \ldots}
+%% \begin{lstlisting}
+%% In []: pos = y[:-1]*y[1:] < 0
+%% In []: rpos = zeros(x.shape, dtype=bool)
+%% In []: rpos[:-1] = pos
+%% In []: rpos[1:] += pos
+%% In []: rts = x[rpos]
+%% \end{lstlisting}
+%% Now use Newton-Raphson?
+%% \end{frame}
\begin{frame}[fragile]
@@ -355,29 +355,24 @@ Now use Newton-Raphson?
\end{lstlisting}
\end{frame}
-\begin{frame}[fragile]
-\frametitle{Scipy Methods \dots}
-\begin{small}
-\begin{lstlisting}
-In []: from scipy.optimize import fixed_point
+%% \begin{frame}[fragile]
+%% \frametitle{Scipy Methods \dots}
+%% \begin{small}
+%% \begin{lstlisting}
+%% In []: from scipy.optimize import fixed_point
-In []: from scipy.optimize import bisect
+%% In []: from scipy.optimize import bisect
-In []: from scipy.optimize import newton
-\end{lstlisting}
-\end{small}
-\end{frame}
+%% In []: from scipy.optimize import newton
+%% \end{lstlisting}
+%% \end{small}
+%% \end{frame}
\begin{frame}
\frametitle{Things we have learned}
\begin{itemize}
\item Solving ODEs
\item Finding Roots
- \begin{itemize}
- \item Estimating Interval
- \item Newton-Raphson
- \item Scipy methods
- \end{itemize}
\end{itemize}
\end{frame}