summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMadhusudan.C.S2009-10-15 15:04:08 +0530
committerMadhusudan.C.S2009-10-15 15:04:08 +0530
commit59bcf5898743aa94fdf0cbf1a1edfa8fd51e581d (patch)
treecd0a18dba7ef1869be437a84ddf2cc926e877748
parent0811854852b1fc85fd7f14a0826ea6da940f2aee (diff)
parente74fbe5e0add9bc16bd7fc8650031220c516d936 (diff)
downloadworkshops-59bcf5898743aa94fdf0cbf1a1edfa8fd51e581d.tar.gz
workshops-59bcf5898743aa94fdf0cbf1a1edfa8fd51e581d.tar.bz2
workshops-59bcf5898743aa94fdf0cbf1a1edfa8fd51e581d.zip
Merge Mainline and Madhu branches.
-rw-r--r--day1/session4.tex51
1 files changed, 50 insertions, 1 deletions
diff --git a/day1/session4.tex b/day1/session4.tex
index 978ef66..b2175ad 100644
--- a/day1/session4.tex
+++ b/day1/session4.tex
@@ -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}