summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPuneeth Chaganti2009-10-15 11:34:35 +0530
committerPuneeth Chaganti2009-10-15 11:34:35 +0530
commite74fbe5e0add9bc16bd7fc8650031220c516d936 (patch)
treed6c94155d1fc06fb609ce3c6e37394866f31e31f
parent0c376fb79ea1b69029984eef3ea8e54e95937f56 (diff)
parent61a25b24b856f7529b4082693424765457e20336 (diff)
downloadworkshops-e74fbe5e0add9bc16bd7fc8650031220c516d936.tar.gz
workshops-e74fbe5e0add9bc16bd7fc8650031220c516d936.tar.bz2
workshops-e74fbe5e0add9bc16bd7fc8650031220c516d936.zip
Manual merge with mainline.
-rw-r--r--day1/session4.tex22
1 files changed, 22 insertions, 0 deletions
diff --git a/day1/session4.tex b/day1/session4.tex
index 737e829..b2175ad 100644
--- a/day1/session4.tex
+++ b/day1/session4.tex
@@ -184,6 +184,28 @@
\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.