Merge Mainline and Madhu branches.
authorMadhusudan.C.S <madhusudancs@gmail.com>
Thu, 15 Oct 2009 15:04:08 +0530
changeset 126 a4bbc14342f9
parent 125 99ca3cb18fd2 (current diff)
parent 124 d43a698712e0 (diff)
child 128 b4a83ea1a517
Merge Mainline and Madhu branches.
--- a/day1/session4.tex	Thu Oct 15 15:03:27 2009 +0530
+++ b/day1/session4.tex	Thu Oct 15 15:04:08 2009 +0530
@@ -23,6 +23,7 @@
 \usepackage[latin1]{inputenc}
 %\usepackage{times}
 \usepackage[T1]{fontenc}
+\usepackage{amsmath}
 
 % Taken from Fernando's slides.
 \usepackage{ae,aecompl}
@@ -120,7 +121,7 @@
 \begin{frame}
   \frametitle{Outline}
   \tableofcontents
-  \pausesections
+%  \pausesections
 \end{frame}
 
 \section{Matrices}
@@ -183,4 +184,52 @@
 \end{lstlisting}
 \end{frame}
 
+\section{Solving linear equations}
+\begin{frame}[fragile]
+\frametitle{Solution of equations}
+Example problem: Consider the set of equations
+  \begin{align*}
+    3x + 2y - z  & = 1 \\
+    2x - 2y + 4z  & = -2 \\
+    -x + \frac{1}{2}y -z & = 0
+  \end{align*}
+
+  To Solve this, 
+  \begin{lstlisting}
+    In []: A = array([[3,2,-1],[2,-2,4],[-1, 0.5, -1]])
+    In []: b = array([1, -2, 0])
+    In []: x = linalg.solve(A, b)
+    In []: Ax = dot(A, x)
+    In []: allclose(Ax, b)
+    Out[]: True
+  \end{lstlisting}
+\end{frame}
+
+
+\begin{frame}[fragile]
+\frametitle{ODE Integration}
+We shall use the simple ODE of a simple pendulum. 
+\begin{equation*}
+\ddot{\theta} = -\frac{g}{L}sin(\theta)
+\end{equation*}
+\begin{itemize}
+\item This equation can be written as a system of two first order ODEs
+\item $\dot{\theta} = \omega$
+\item $\dot{\omega} = -\frac{g}{L}sin(\theta)$
+\item At $t = 0$  \\
+$\theta = \theta_0$ \&
+$\omega = 0$
+\end{itemize}
+\begin{lstlisting}
+\end{lstlisting}
+\end{frame}
+
+
+
 \end{document}
+
+\begin{frame}[fragile]
+\frametitle{}
+\begin{lstlisting}
+\end{lstlisting}
+\end{frame}