diff options
author | Madhusudan.C.S | 2009-10-27 13:10:39 +0530 |
---|---|---|
committer | Madhusudan.C.S | 2009-10-27 13:10:39 +0530 |
commit | 45ea8d3f8db839d9288dacf10a9f014529f6d2f3 (patch) | |
tree | 453215e0f5e21374ac45ef7cd466f60abefd87b3 /day1/session4.tex | |
parent | 55c9fffa7154dec03dc409dd5c586f1c340ba8ce (diff) | |
parent | afbc641895fe93a7fa42b6b4fb325620a9b21314 (diff) | |
download | workshops-45ea8d3f8db839d9288dacf10a9f014529f6d2f3.tar.gz workshops-45ea8d3f8db839d9288dacf10a9f014529f6d2f3.tar.bz2 workshops-45ea8d3f8db839d9288dacf10a9f014529f6d2f3.zip |
Merged Madhu and Puneeth branches.
Diffstat (limited to 'day1/session4.tex')
-rw-r--r-- | day1/session4.tex | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/day1/session4.tex b/day1/session4.tex index 0fe9c7a..4f1eb7d 100644 --- a/day1/session4.tex +++ b/day1/session4.tex @@ -255,7 +255,7 @@ matrix([[ 0.07734807, 0.01657459, 0.32044199], \end{itemize} \begin{lstlisting} In []: x = 0 -In []: integrate.quad(sin(x)+x**2, 0, 1) +In []: quad(sin(x)+x**2, 0, 1) \end{lstlisting} \alert{\typ{error:}} \typ{First argument must be a callable function.} @@ -266,7 +266,7 @@ In []: integrate.quad(sin(x)+x**2, 0, 1) \begin{lstlisting} In []: def f(x): return sin(x)+x**2 -In []: integrate.quad(f, 0, 1) +In []: quad(f, 0, 1) \end{lstlisting} \begin{itemize} \item \typ{def} @@ -338,9 +338,13 @@ Out[]: 1.0 \begin{frame}[fragile] \frametitle{Quadrature \ldots} \begin{lstlisting} -In []: integrate.quad(f, 0, 1) +In []: quad(f, 0, 1) \end{lstlisting} Returns the integral and an estimate of the absolute error in the result. +\begin{itemize} +\item Use \typ{dblquad} for Double integrals +\item Use \typ{tplquad} for Triple integrals +\end{itemize} \end{frame} \subsection{ODEs} @@ -403,5 +407,25 @@ In []: pend_sol = odeint(pend_int, \end{lstlisting} \end{frame} +\begin{frame} + \frametitle{Things we have learned} + \begin{itemize} + \item + \item + \item Functions + \begin{itemize} + \item Definition + \item Calling + \item Default Arguments + \item Keyword Arguments + \end{itemize} + \item Integration + \begin{itemize} + \item Quadrature + \item ODEs + \end{itemize} + \end{itemize} +\end{frame} + \end{document} |