diff options
author | Santosh G. Vattam | 2010-03-08 20:45:33 +0530 |
---|---|---|
committer | Santosh G. Vattam | 2010-03-08 20:45:33 +0530 |
commit | b12e0358be2b89b5b0545c72977c1c25b4daa8a9 (patch) | |
tree | bac9712c676e4f47ef6d5f58eda077cc3270ddcb /day1/session6.tex | |
parent | 50b0f8505d095e4a72df4161b1eab1c84c0af042 (diff) | |
download | workshops-b12e0358be2b89b5b0545c72977c1c25b4daa8a9.tar.gz workshops-b12e0358be2b89b5b0545c72977c1c25b4daa8a9.tar.bz2 workshops-b12e0358be2b89b5b0545c72977c1c25b4daa8a9.zip |
Updated for day1 of GRD workshop.
Diffstat (limited to 'day1/session6.tex')
-rwxr-xr-x | day1/session6.tex | 19 |
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} |