day1/session6.tex
changeset 244 f4f3b36a9fba
parent 240 5a96cf81bdc5
child 258 8d5ac98e3247
equal deleted inserted replaced
243:33ede079857d 244:f4f3b36a9fba
   283 %%  ....:         
   283 %%  ....:         
   284 %% \end{lstlisting}
   284 %% \end{lstlisting}
   285 %% \end{frame}
   285 %% \end{frame}
   286 
   286 
   287 \begin{frame}[fragile]
   287 \begin{frame}[fragile]
   288 \frametitle{Newton Raphson Method}
   288 \frametitle{Newton-Raphson Method}
   289 \begin{enumerate}
   289 \begin{enumerate}
   290 \item Start with an initial guess of x for the root
   290 \item Start with an initial guess of x for the root
   291 \item $\Delta x = -f(x)/f^{'}(x)$
   291 \item $\Delta x = -f(x)/f^{'}(x)$
   292 \item $ x \leftarrow x + \Delta x$
   292 \item $ x \leftarrow x + \Delta x$
   293 \item Go back to 2 until $|\Delta x| \le$ tolerance
   293 \item Go back to 2 until $|\Delta x| \le$ tolerance
   294 \end{enumerate}
   294 \end{enumerate}
   295 \end{frame}
   295 \end{frame}
   296 
   296 
   297 %% \begin{frame}[fragile]
   297 %% \begin{frame}[fragile]
   298 %% \frametitle{Newton Raphson \dots}
   298 %% \frametitle{Newton-Raphson \dots}
   299 %% \begin{lstlisting}
   299 %% \begin{lstlisting}
   300 %% In []: def our_df(x):
   300 %% In []: def our_df(x):
   301 %%  ....:     return -sin(x)-2*x
   301 %%  ....:     return -sin(x)-2*x
   302 %%  ....: 
   302 %%  ....: 
   303 %% In []: delx = 10*tolerance
   303 %% In []: delx = 10*tolerance
   308 %%  ....:     
   308 %%  ....:     
   309 %% \end{lstlisting}
   309 %% \end{lstlisting}
   310 %% \end{frame}
   310 %% \end{frame}
   311 
   311 
   312 \begin{frame}[fragile]
   312 \begin{frame}[fragile]
   313 \frametitle{Newton Raphson \ldots}
   313 \frametitle{Newton-Raphson \ldots}
   314 \begin{itemize}
   314 \begin{itemize}
   315 \item What if $f^{'}(x) = 0$?
   315 \item What if $f^{'}(x) = 0$?
   316 \item Can you write a better version of the Newton Raphson?
   316 \item Can you write a better version of the Newton-Raphson?
   317 \item What if the differential is not easy to calculate?
   317 \item What if the differential is not easy to calculate?
   318 \item Look at Secant Method
   318 \item Look at Secant Method
   319 \end{itemize}
   319 \end{itemize}
   320 \end{frame}
   320 \end{frame}
   321 
   321 
   366   \begin{itemize}
   366   \begin{itemize}
   367   \item Solving ODEs
   367   \item Solving ODEs
   368   \item Finding Roots
   368   \item Finding Roots
   369     \begin{itemize}
   369     \begin{itemize}
   370     \item Estimating Interval
   370     \item Estimating Interval
   371     \item Newton Raphson
   371     \item Newton-Raphson
   372     \item Scipy methods
   372     \item Scipy methods
   373     \end{itemize}
   373     \end{itemize}
   374   \end{itemize}
   374   \end{itemize}
   375 \end{frame}
   375 \end{frame}
   376 
   376