summaryrefslogtreecommitdiff
path: root/day1/session6.tex
diff options
context:
space:
mode:
authorSantosh G. Vattam2010-03-08 20:45:33 +0530
committerSantosh G. Vattam2010-03-08 20:45:33 +0530
commitb12e0358be2b89b5b0545c72977c1c25b4daa8a9 (patch)
treebac9712c676e4f47ef6d5f58eda077cc3270ddcb /day1/session6.tex
parent50b0f8505d095e4a72df4161b1eab1c84c0af042 (diff)
downloadworkshops-b12e0358be2b89b5b0545c72977c1c25b4daa8a9.tar.gz
workshops-b12e0358be2b89b5b0545c72977c1c25b4daa8a9.tar.bz2
workshops-b12e0358be2b89b5b0545c72977c1c25b4daa8a9.zip
Updated for day1 of GRD workshop.
Diffstat (limited to 'day1/session6.tex')
-rwxr-xr-xday1/session6.tex19
1 files changed, 19 insertions, 0 deletions
diff --git a/day1/session6.tex b/day1/session6.tex
index b7d1422..61b536c 100755
--- a/day1/session6.tex
+++ b/day1/session6.tex
@@ -311,6 +311,25 @@ Out[]: -0.66623943249251527
\end{center}
\end{frame}
+\begin{frame}[fragile]
+ \frametitle{Exercise Problem}
+ Find the root of the equation $x^2 - sin(x) + cos^2(x)$ nearest to $0$
+\end{frame}
+
+\begin{frame}[fragile]
+ \frametitle{Solution}
+ \begin{small}
+ \begin{lstlisting}
+ def f(x):
+ return x**2 - sin(x) + cos(x)*cos(x)
+ fsolve(f, 0)
+ \end{lstlisting}
+ \end{small}
+ \begin{center}
+\includegraphics[height=2in, interpolate=true]{data/fsolve_tanx}
+ \end{center}
+\end{frame}
+
%% \begin{frame}[fragile]
%% \frametitle{Scipy Methods \dots}
%% \begin{small}