getting-started-with-symbolics/slides.tex
author anand
Thu, 11 Nov 2010 00:03:57 +0530
changeset 472 fcdec2d28c9a
parent 442 a9b71932cbfa
child 458 9a1c5d134feb
permissions -rw-r--r--
Checklist OK for `The other kinds of plots`

% Created 2010-11-10 Wed 17:18
\documentclass[presentation]{beamer}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fixltx2e}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{float}
\usepackage{wrapfig}
\usepackage{soul}
\usepackage{t1enc}
\usepackage{textcomp}
\usepackage{marvosym}
\usepackage{wasysym}
\usepackage{latexsym}
\usepackage{amssymb}
\usepackage{hyperref}
\tolerance=1000
\usepackage[english]{babel} \usepackage{ae,aecompl}
\usepackage{mathpazo,courier,euler} \usepackage[scaled=.95]{helvet}
\usepackage{listings}
\lstset{language=Python, basicstyle=\ttfamily\bfseries,
commentstyle=\color{red}\itshape, stringstyle=\color{darkgreen},
showstringspaces=false, keywordstyle=\color{blue}\bfseries}
\providecommand{\alert}[1]{\textbf{#1}}

\title{Getting started with symbolics}
\author{FOSSEE}
\date{}

\usetheme{Warsaw}\usecolortheme{default}\useoutertheme{infolines}\setbeamercovered{transparent}
\begin{document}

\maketitle









\begin{frame}
\frametitle{Outline}
\label{sec-1}

\begin{itemize}
\item Defining symbolic expressions in sage.
\item Using built-in constants and functions.
\item Performing Integration, differentiation using sage.
\item Defining matrices.
\item Defining Symbolic functions.
\item Simplifying and solving symbolic expressions and functions.
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Questions 1}
\label{sec-2}

\begin{itemize}
\item Define the following expression as symbolic
    expression in sage.

\begin{itemize}
\item x$^2$+y$^2$
\item y$^2$-4ax
\end{itemize}

\end{itemize}

  
\end{frame}
\begin{frame}[fragile]
\frametitle{Solutions 1}
\label{sec-3}

\begin{verbatim}
var('x,y')
x^2+y^2

var('a,x,y')
y^2-4*a*x
\end{verbatim}
\end{frame}
\begin{frame}
\frametitle{Questions 2}
\label{sec-4}

\begin{itemize}
\item Find the values of the following constants upto 6 digits  precision

\begin{itemize}
\item pi$^2$
\end{itemize}

\item Find the value of the following.

\begin{itemize}
\item sin(pi/4)
\item ln(23)
\end{itemize}

\end{itemize}
\end{frame}
\begin{frame}[fragile]
\frametitle{Solutions 2}
\label{sec-5}

\begin{verbatim}
n(pi^2,digits=6)
n(sin(pi/4))
n(log(23,e))
\end{verbatim}
\end{frame}
\begin{frame}
\frametitle{Question 2}
\label{sec-6}

\begin{itemize}
\item Define the piecewise function. 
   f(x)=3x+2 
   when x is in the closed interval 0 to 4.
   f(x)=4x$^2$
   between 4 to 6.
\item Sum  of 1/(n$^2$-1) where n ranges from 1 to infinity.
\end{itemize}
\end{frame}
\begin{frame}[fragile]
\frametitle{Solution Q1}
\label{sec-7}

\begin{verbatim}
var('x') 
h(x)=3*x+2 
g(x)= 4*x^2
f=Piecewise([[(0,4),h(x)],[(4,6),g(x)]],x)
f
\end{verbatim}
\end{frame}
\begin{frame}[fragile]
\frametitle{Solution Q2}
\label{sec-8}

\begin{verbatim}
var('n')
f=1/(n^2-1) 
sum(f(n), n, 1, oo)
\end{verbatim}
 
\end{frame}
\begin{frame}
\frametitle{Questions 3}
\label{sec-9}

\begin{itemize}
\item Differentiate the following.

\begin{itemize}
\item x$^5$*log(x$^7$)  , degree=4
\end{itemize}

\item Integrate the given expression

\begin{itemize}
\item x*sin(x$^2$)
\end{itemize}

\item Find x

\begin{itemize}
\item cos(x$^2$)-log(x)=0
\item Does the equation have a root between 1,2.
\end{itemize}

\end{itemize}
\end{frame}
\begin{frame}[fragile]
\frametitle{Solutions 3}
\label{sec-10}

\begin{verbatim}
var('x')
f(x)= x^5*log(x^7) 
diff(f(x),x,5)

var('x')
integral(x*sin(x^2),x) 

var('x')
f=cos(x^2)-log(x)
find_root(f(x)==0,1,2)
\end{verbatim}
\end{frame}
\begin{frame}
\frametitle{Question 4}
\label{sec-11}

\begin{itemize}
\item Find the determinant and inverse of :

      A=[[x,0,1][y,1,0][z,0,y]]
\end{itemize}
\end{frame}
\begin{frame}[fragile]
\frametitle{Solution 4}
\label{sec-12}

\begin{verbatim}
var('x,y,z')
A=matrix([[x,0,1],[y,1,0],[z,0,y]])
A.det()
A.inverse()
\end{verbatim}
\end{frame}
\begin{frame}
\frametitle{Summary}
\label{sec-13}

\begin{itemize}
\item We learnt about defining symbolic 
   expression and functions.
\item Using built-in constants and functions.
\item Using <Tab>  to see the documentation of a 
   function.
\end{itemize}

 
\end{frame}
\begin{frame}
\frametitle{Summary}
\label{sec-14}

\begin{itemize}
\item Simple calculus operations .
\item Substituting values in expression 
   using substitute function.
\item Creating symbolic matrices and 
   performing operation on them .
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Thank you!}
\label{sec-15}

  \begin{block}{}
  \begin{center}
  This spoken tutorial has been produced by the
  \textcolor{blue}{FOSSEE} team, which is funded by the 
  \end{center}
  \begin{center}
    \textcolor{blue}{National Mission on Education through \\
      Information \& Communication Technology \\ 
      MHRD, Govt. of India}.
  \end{center}  
  \end{block}
\end{frame}

\end{document}