From b12e0358be2b89b5b0545c72977c1c25b4daa8a9 Mon Sep 17 00:00:00 2001
From: Santosh G. Vattam
Date: Mon, 8 Mar 2010 20:45:33 +0530
Subject: Updated for day1 of GRD workshop.

---
 day1/session6.tex | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

(limited to 'day1/session6.tex')

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}
-- 
cgit 

