diff options
-rw-r--r-- | getting_started_with_symbolics/script.rst | 504 | ||||
-rw-r--r-- | getting_started_with_symbolics/slides.org | 100 | ||||
-rw-r--r-- | getting_started_with_symbolics/slides.tex | 179 |
3 files changed, 584 insertions, 199 deletions
diff --git a/getting_started_with_symbolics/script.rst b/getting_started_with_symbolics/script.rst index 4f714d4..93bcde6 100644 --- a/getting_started_with_symbolics/script.rst +++ b/getting_started_with_symbolics/script.rst @@ -26,315 +26,593 @@ Symbolics with Sage ------------------- -Hello friends and welcome to the tutorial on Symbolics with Sage. +.. L1 -{{{ Show welcome slide }}} +{{{ Show the first slide containing title, name of the production +team along with the logo of MHRD }}} -During the course of the tutorial we will learn +.. R1 -{{{ Show outline slide }}} +Hello friends and welcome to the tutorial on "Symbolics with Sage". -* Defining symbolic expressions in Sage. -* Using built-in constants and functions. -* Performing Integration, differentiation using Sage. -* Defining matrices. -* Defining symbolic functions. -* Simplifying and solving symbolic expressions and functions. +.. L2 -In addtion to a lot of other things, Sage can do Symbolic Math and we shall -start with defining symbolic expressions in Sage. +{{{ Show objectives slide }}} + +.. R2 + +At the end of this tutorial, you will be able to, + + 1. Define symbolic expressions in sage. + #. Use built-in constants and functions. + #. Perform Integration, differentiation using sage. + #. Define matrices. + #. Define Symbolic functions. + #. Simplify0and solve symbolic expressions and functions. + +.. L3 + +{{{ Switch to the pre-requisite slide }}} + +.. R3 + +Before beginning this tutorial,we would suggest you to complete the +tutorial on "Getting started with sage notebook". + +In addtion to a lot of other things, Sage can do Symbolic Math and +we shall start with defining symbolic expressions in Sage. + +.. L4 + +{{{ Open the sage notebook }}} + +.. R4 Have your Sage notebook opened. If not, pause the video and start you Sage notebook right now. -On the sage notebook type:: +.. R5 + +On the sage notebook type + +.. L5 +:: sin(y) +.. R6 + It raises a name error saying that ``y`` is not defined. We need to declare ``y`` as a symbol. We do it using the ``var`` function. + +.. L6 :: var('y') + +.. R7 -Now if you type:: +Now if you type sin(y),Sage simply returns the expression. + +.. L7 +:: sin(y) -Sage simply returns the expression. +.. R8 Sage treats ``sin(y)`` as a symbolic expression. We can use this to do symbolic math using Sage's built-in constants and expressions. -Let us try out a few examples. :: +Let us try out a few examples. + +.. L8 +:: - var('x,alpha,y,beta') - x^2/alpha^2+y^2/beta^2 + var('x,alpha,y,beta') + x^2/alpha^2+y^2/beta^2 + +.. R9 We have defined 4 variables, ``x``, ``y``, ``alpha`` and ``beta`` and have defined a symbolic expression using them. -Here is an expression in ``theta`` :: +Here is an expression in ``theta`` + +.. L9 +:: - var('theta') - sin(theta)*sin(theta)+cos(theta)*cos(theta) + var('theta') + sin(theta)*sin(theta)+cos(theta)*cos(theta) + +.. R10 Now that you know how to define symbolic expressions in Sage, here is an exercise. -{{ show slide showing question 1 }} +Pause the video here, try out the following exercise and resume the video. + +.. L10 + +.. L11 + +{{{ show slide showing exercise 1 }}} -%% %% Define following expressions as symbolic expressions in Sage. +.. R11 + + Define following expressions as symbolic expressions in Sage. 1. x^2+y^2 #. y^2-4ax - -Please, pause the video here. Do the exercise and then continue. + +.. L12 + +{{{continue from paused state}}} +{{{ show slide showing solution 1 }}} + +.. R12 The solution is on your screen. +<pause for sometime,then continue> -{{ show slide showing solution 1 }} +.. R13 Sage also provides built-in constants which are commonly used in mathematics, for instance pi, e, infinity. The function ``n`` gives the numerical values of all these constants. + +.. L13 :: + n(pi) n(e) n(oo) + +.. R14 If you look into the documentation of function ``n`` by doing +n<tab>, You will see what all arguments it takes and what it returns. +.. L14 :: - n(<Tab> -You will see what all arguments it takes and what it returns. It will -be very helpful if you look at the documentation of all functions -introduced in the course of this script. + n<Tab> + +.. R15 + +It will be very helpful if you look at the documentation of all +functions introduced in the course of this script. Also we can define the number of digits we wish to have in the -constants. For this we have to pass an argument -- digits. Type +constants. For this we have to pass an argument -- digits. +.. L15 :: - n(pi, digits = 10) + n(pi, digits = 10) + +.. R16 Apart from the constants Sage also has a lot of built-in functions like ``sin``, ``cos``, ``log``, ``factorial``, ``gamma``, ``exp``, ``arcsin`` etc ... Lets try some of them out on the Sage notebook. + +.. L16 :: - sin(pi/2) - - arctan(oo) - - log(e,e) + sin(pi/2) + arctan(oo) + log(e,e) + +.. R17 -Following are exercises that you must do. +Pause the video here, try out the following exercise and resume the video. -{{ show slide showing question 2 }} +.. L17 -%% %% Find the values of the following constants upto 6 digits - precision +.. L18 + +{{{ show slide showing exercise 2 }}} + +.. R18 + + Find the values of the following constants upto 6 digits precision 1. pi^2 #. euler_gamma^2 -%% %% Find the value of the following. + Find the value of the following. 1. sin(pi/4) #. ln(23) -Please, pause the video here. Do the exercises and then continue. +.. L19 + +{{{continue from paused state}}} +{{{ show slide showing solution 2 }}} + +.. R19 -The solutions are on your screen +The solutions are on your screen. +<pause for sometime,then continue> -{{ show slide showing solution 2 }} +.. R20 Given that we have defined variables like x, y etc., we can define an -arbitrary function with desired name in the following way.:: +arbitrary function with desired name in the following way. - var('x') - function('f',x) +.. L20 +:: + + var('x') + function('f',x) + +.. R21 Here f is the name of the function and x is the independent variable . -Now we can define f(x) to be :: +Now we can define f(x) + +.. L21 +:: - f(x) = x/2 + sin(x) + f(x) = x/2 + sin(x) -Evaluating this function f for the value x=pi returns pi/2.:: +.. R22 + +Evaluating this function f for the value x=pi returns pi/2. + +.. L22 +:: - f(pi) + f(pi) + +.. R23 We can also define functions that are not continuous but defined piecewise. Let us define a function which is a parabola between 0 to 1 and a constant from 1 to 2 . Type the following + +.. L23 :: + var('x') + h(x)=x^2 + g(x)=1 + f=Piecewise([[(0,1),h(x)],[(1,2),g(x)]],x) + f - var('x') - h(x)=x^2 - g(x)=1 - - f=Piecewise([[(0,1),h(x)],[(1,2),g(x)]],x) - f +.. R24 We can also define functions convergent series and other series. -We first define a function f(n) in the way discussed above.:: +We first define a function f(n) in the way discussed before. - var('n') - function('f', n) +.. L24 +:: + var('n') + function('f', n) + +.. R25 To sum the function for a range of discrete values of n, we use the sage function sum. -For a convergent series , f(n)=1/n^2 we can say :: +For a convergent series , f(n)=1/n^2 we can say + +.. L25 +:: - var('n') - function('f', n) - f(n) = 1/n^2 - sum(f(n), n, 1, oo) + var('n') + function('f', n) + f(n) = 1/n^2 + sum(f(n), n, 1, oo) - -Lets us now try another series :: +.. R26 + +Let us now try another series +.. L26 +:: f(n) = (-1)^(n-1)*1/(2*n - 1) sum(f(n), n, 1, oo) +.. R27 + This series converges to pi/4. -Following are exercises that you must do. +Pause the video here, try out the following exercise and resume the video. + +.. L27 + +.. L28 + +{{{ show slide showing exercise 3 }}} -{{ show slide showing question 3 }} +.. R28 -%% %% Define the piecewise function. + 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. -%% %% Sum of 1/(n^2-1) where n ranges from 1 to infinity. + Sum of 1/(n^2-1) where n ranges from 1 to infinity. -Please, pause the video here. Do the exercise(s) and then continue. +.. L29 -{{ show slide showing solution 3 }} +{{{continue from paused state}}} +{{{ show slide showing solution 3 }}} + +.. R29 + +The solution is on your screen +<pause for sometime,then continue> + +.. R30 Moving on let us see how to perform simple calculus operations using Sage -For example lets try an expression first :: +For example lets try an expression first + +.. L30 +:: diff(x**2+sin(x),x) -The diff function differentiates an expression or a function. It's +.. R31 + +The ``diff`` function differentiates an expression or a function. It's first argument is expression or function and second argument is the independent variable. -We have already tried an expression now lets try a function :: +We have already tried an expression now lets try a function + +.. L31 +:: + + f=exp(x^2)+arcsin(x) + diff(f(x),x) - f=exp(x^2)+arcsin(x) - diff(f(x),x) +.. R32 To get a higher order differential we need to add an extra third argument -for order :: +for order + +.. L32 +:: - diff(f(x),x,3) + diff(f(x),x,3) + +.. R33 in this case it is 3. -Just like differentiation of expression you can also integrate them :: +Just like differentiation of expression you can also integrate them + +.. L33 +:: - x = var('x') - s = integral(1/(1 + (tan(x))**2),x) - s + x = var('x') + s = integral(1/(1 + (tan(x))**2),x) + s + +.. R34 Many a times we need to find factors of an expression, we can use the "factor" function +.. L34 :: y = (x^100 - x^70)*(cos(x)^2 + cos(x)^2*tan(x)^2) f = factor(y) -One can simplify complicated expression :: +.. R35 + +One can simplify complicated expression by using the function ``simplify``. + +.. L35 +:: f.simplify_full() +.. R36 + This simplifies the expression fully. We can also do simplification of -just the algebraic part and the trigonometric part :: +just the algebraic part and the trigonometric part + +.. L36 +:: f.simplify_exp() f.simplify_trig() + +.. R37 -One can also find roots of an equation by using ``find_root`` function:: +One can also find roots of an equation by using ``find_root`` function + +.. L37 +:: phi = var('phi') find_root(cos(phi)==sin(phi),0,pi/2) +.. R38 + Let's substitute this solution into the equation and see we were -correct :: +correct + +.. L38 +:: + + var('phi') + f(phi)=cos(phi)-sin(phi) + root=find_root(f(phi)==0,0,pi/2) + f.substitute(phi=root) - var('phi') - f(phi)=cos(phi)-sin(phi) - root=find_root(f(phi)==0,0,pi/2) - f.substitute(phi=root) +.. R39 as we can see when we substitute the value the answer is almost = 0 showing the solution we got was correct. -Following are a few exercises that you must do. +Pause the video here, try out the following exercise and resume the video. + +.. L39 + +.. L40 + +{{{ show slide showing exercise 4 }}} + +.. R40 -%% %% Differentiate the following. + Differentiate the following. 1. sin(x^3)+log(3x) , degree=2 #. x^5*log(x^7) , degree=4 -%% %% Integrate the given expression + Integrate the given expression sin(x^2)+exp(x^3) -%% %% Find x + Find x cos(x^2)-log(x)=0 Does the equation have a root between 1,2. -Please, pause the video here. Do the exercises and then continue. +.. L41 +{{{continue from paused state}}} +{{{ show slide showing solution 4 }}} -Lets us now try some matrix algebra symbolically :: +.. R41 - var('a,b,c,d') - A=matrix([[a,1,0],[0,b,0],[0,c,d]]) - A +The solution is on your screen +<pause for sometime,then continue> + +.. R42 + +Lets us now try some matrix algebra symbolically + +.. L42 +:: + + var('a,b,c,d') + A=matrix([[a,1,0],[0,b,0],[0,c,d]]) + A + +.. R43 Now lets do some of the matrix operations on this matrix + +.. L43 :: + A.det() A.inverse() +.. R44 + +As we can see, we got the determinant and the inverse of the matrix +respectively. -Following is an (are) exercise(s) that you must do. +Pause the video here, try out the following exercise and resume the video. -%% %% Find the determinant and inverse of : +.. L44 + +.. L45 + +{{{ show slide showing exercise 5 }}} + +.. R45 + + Find the determinant and inverse of A=[[x,0,1][y,1,0][z,0,y]] -Please, pause the video here. Do the exercise(s) and then continue. +.. L46 + +{{{continue from paused state}}} +{{{ show slide showing solution 4 }}} +.. R47 + +The solution is on your screen +<pause for sometime,then continue> + +.. L48 {{{ Show the summary slide }}} -That brings us to the end of this tutorial. In this tutorial we learnt -how to +.. R48 + +This brings us to the end of this tutorial. In this tutorial, +we have learnt to, + +1. Define symbolic expression and functions using the method ``var``. +#. Use built-in constants like pi,e,oo and functions like + sum,sin,cos,log,exp and many more. +#. Use <Tab> to see the documentation of a function. +#. Do simple calculus using functions + - diff()--to find a differential of a function + - integral()--to integrate an expression + - simplify--to simplify complicated expression. +#. Substitute values in expressions using ``substitute`` function. +#. Create symbolic matrices and perform operations on them like-- + - det()--to find out the determinant of a matrix + - inverse()--to find out the inverse of a matrix. + +.. L49 + +{{{Show self assessment questions slide}}} + +.. R49 + +Here are some self assessment questions for you to solve + +1. How do you define a name 'y' as a symbol? + + +2. Get the value of pi upto precision 5 digits using sage? + + +3. Find third order differential function of + + f(x)=sin(x^2)+exp(x^3) + +.. L50 + +{{{solution of self assessment questions on slide}}} + +.. R50 + +And the answers, + +1. We define a symbol using the function ``var``.In this case it will be +:: + + var('y') + +2. The value of pi upto precision 5 digits is given as, +:: + + n(pi,5) + +3. The third order differential function can be found out by adding the + third argument which states the order.The syntax will be, +:: + + diff(f(x),x,3) + +.. L51 + +{{{Show thank you slide}}} + +.. R51 -* define symbolic expression and functions -* use built-in constants and functions -* use <Tab> to see the documentation of a function -* do simple calculus -* substitute values in expressions using ``substitute`` function -* create symbolic matrices and perform operations on them +Hope you have enjoyed this tutorial and found it useful. +Thank You! diff --git a/getting_started_with_symbolics/slides.org b/getting_started_with_symbolics/slides.org index 5d9391e..15d793b 100644 --- a/getting_started_with_symbolics/slides.org +++ b/getting_started_with_symbolics/slides.org @@ -18,7 +18,7 @@ #+LaTeX_HEADER: commentstyle=\color{red}\itshape, stringstyle=\color{darkgreen}, #+LaTeX_HEADER: showstringspaces=false, keywordstyle=\color{blue}\bfseries} -#+TITLE: Getting started with symbolics +#+TITLE: #+AUTHOR: FOSSEE #+EMAIL: #+DATE: @@ -29,15 +29,37 @@ #+OPTIONS: H:3 num:nil toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t #+OPTIONS: TeX:t LaTeX:nil skip:nil d:nil todo:nil pri:nil tags:not-in-toc -* Outline - - Defining symbolic expressions in sage. - - Using built-in constants and functions. - - Performing Integration, differentiation using sage. - - Defining matrices. - - Defining Symbolic functions. - - Simplifying and solving symbolic expressions and functions. - -* Question 1 +* +#+begin_latex +\begin{center} +\vspace{12pt} +\textcolor{blue}{\huge Getting started with Symbolics} +\end{center} +\vspace{18pt} +\begin{center} +\vspace{10pt} +\includegraphics[scale=0.95]{../images/fossee-logo.png}\\ +\vspace{5pt} +\scriptsize Developed by FOSSEE Team, IIT-Bombay. \\ +\scriptsize Funded by National Mission on Education through ICT\\ +\scriptsize MHRD,Govt. of India\\ +\includegraphics[scale=0.30]{../images/iitb-logo.png}\\ +\end{center} +#+end_latex +* Objectives + At the end of this tutorial, you will be able to, + + - Define symbolic expressions in sage. + - Use built-in constants and functions. + - Perform Integration, differentiation using sage. + - Define matrices. + - Define Symbolic functions. + - Simplify0and solve symbolic expressions and functions. + +* Pre-requisite + Spoken tutorial on - + - Getting started with Sage Notebook. +* Exercise 1 - Define the following expression as symbolic expression in sage. @@ -52,11 +74,11 @@ var('a,x,y') y^2-4*a*x #+end_src python -* Question 2 +* Exercise 2 - Find the values of the following constants upto 6 digits precision - pi^2 - - euler_gamma^2 + - euler\_gamma^2 - Find the value of the following. @@ -70,7 +92,7 @@ n(sin(pi/4)) n(log(23,e)) #+end_src python -* Question 3 +* Exercise 3 - Define the piecewise function. f(x)=3x+2 when x is in the closed interval 0 to 4. @@ -94,7 +116,7 @@ sum(f(n), n, 1, oo) #+end_src python -* Question 4 +* Exercise 4 - Differentiate the following. - sin(x^3)+log(3x), to the second order @@ -122,8 +144,8 @@ find_root(f(x)==0,1,2) #+end_src -* Question 5 - - Find the determinant and inverse of : +* Exercise 5 + - Find the determinant and inverse of A=[[x,0,1][y,1,0][z,0,y]] @@ -135,23 +157,45 @@ A.inverse() #+end_src * Summary - - We learnt about defining symbolic expression and functions. - - Using built-in constants and functions. - - Using <Tab> to see the documentation of a function. - - Simple calculus operations . - - Substituting values in expression using substitute function. - - Creating symbolic matrices and performing operation on them . -* Thank you! +In this tutorial, we have learnt to, + +- Define symbolic expression and functions using the method ``var``. +- Use built-in constants like pi,e,oo and functions like + sum,sin,cos,log,exp and many more. +- Use <Tab> to see the documentation of a function. +- Do simple calculus using functions like -- + - diff()--to find a differential of a function + - integral()--to integrate an expression + - simplify--to simplify complicated expression. +- Substitute values in expressions using ``substitute`` function. +- Create symbolic matrices and perform operations on them like -- + - det()--to find out the determinant of a matrix + - inverse()--to find out the inverse of a matrix. +* Evaluation +1. How do you define a name 'y' as a symbol? + +2. Get the value of pi upto precision 5 digits using sage? + +3. Find third order differential function of + + f(x)=sin(x^2)+exp(x^3) +* Solutions + 1. var('y') + + 2. n(pi,5) + + 3. diff(f(x),x,3) +* #+begin_latex \begin{block}{} \begin{center} - This spoken tutorial has been produced by the - \textcolor{blue}{FOSSEE} team, which is funded by the + \textcolor{blue}{\Large THANK YOU!} \end{center} + \end{block} +\begin{block}{} \begin{center} - \textcolor{blue}{National Mission on Education through \\ - Information \& Communication Technology \\ - MHRD, Govt. of India}. + For more Information, visit our website\\ + \url{http://fossee.in/} \end{center} \end{block} #+end_latex diff --git a/getting_started_with_symbolics/slides.tex b/getting_started_with_symbolics/slides.tex index 51e8997..3f6552f 100644 --- a/getting_started_with_symbolics/slides.tex +++ b/getting_started_with_symbolics/slides.tex @@ -1,4 +1,4 @@ -% Created 2010-11-11 Thu 02:03 +% Created 2011-06-14 Tue 13:44 \documentclass[presentation]{beamer} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} @@ -23,14 +23,14 @@ commentstyle=\color{red}\itshape, stringstyle=\color{darkgreen}, showstringspaces=false, keywordstyle=\color{blue}\bfseries} \providecommand{\alert}[1]{\textbf{#1}} -\title{Getting started with symbolics} +\title{} \author{FOSSEE} \date{} \usetheme{Warsaw}\usecolortheme{default}\useoutertheme{infolines}\setbeamercovered{transparent} \begin{document} -\maketitle + @@ -41,38 +41,66 @@ showstringspaces=false, keywordstyle=\color{blue}\bfseries} \begin{frame} -\frametitle{Outline} -\label{sec-1} + +\begin{center} +\vspace{12pt} +\textcolor{blue}{\huge Getting started with Symbolics} +\end{center} +\vspace{18pt} +\begin{center} +\vspace{10pt} +\includegraphics[scale=0.95]{../images/fossee-logo.png}\\ +\vspace{5pt} +\scriptsize Developed by FOSSEE Team, IIT-Bombay. \\ +\scriptsize Funded by National Mission on Education through ICT\\ +\scriptsize MHRD,Govt. of India\\ +\includegraphics[scale=0.30]{../images/iitb-logo.png}\\ +\end{center} +\end{frame} +\begin{frame} +\frametitle{Objectives} +\label{sec-2} + + At the end of this tutorial, you will be able to, + \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. +\item Define symbolic expressions in sage. +\item Use built-in constants and functions. +\item Perform Integration, differentiation using sage. +\item Define matrices. +\item Define Symbolic functions. +\item Simplify and solve symbolic expressions and functions. \end{itemize} \end{frame} \begin{frame} -\frametitle{Question 1} -\label{sec-2} +\frametitle{Pre-requisite} +\label{sec-3} + + Spoken tutorial on - + +\begin{itemize} +\item Getting started with Sage Notebook. +\end{itemize} +\end{frame} +\begin{frame} +\frametitle{Exercise 1} +\label{sec-4} + \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{Solution 1} -\label{sec-3} +\label{sec-5} \lstset{language=Python} \begin{lstlisting} @@ -84,33 +112,29 @@ y^2-4*a*x \end{lstlisting} \end{frame} \begin{frame} -\frametitle{Question 2} -\label{sec-4} +\frametitle{Exercise 2} +\label{sec-6} \begin{itemize} \item Find the values of the following constants upto 6 digits precision - \begin{itemize} \item pi$^2$ -\item euler$_{\mathrm{gamma}}$$^2$ +\item euler\_gamma$^2$ \end{itemize} - \end{itemize} \begin{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{Solution 2} -\label{sec-5} +\label{sec-7} \lstset{language=Python} \begin{lstlisting} @@ -120,21 +144,23 @@ n(log(23,e)) \end{lstlisting} \end{frame} \begin{frame} -\frametitle{Question 3} -\label{sec-6} +\frametitle{Exercise 3} +\label{sec-8} + \begin{itemize} -\item Define the piecewise function. +\item Define the piecewise function\\ f(x)=3x+2 - when x is in the closed interval 0 to 4. + when x is in the closed interval 0 to 4\\ f(x)=4x$^2$ between 4 to 6. +\vspace{4pt} \item Sum of 1/(n$^2$-1) where n ranges from 1 to infinity. \end{itemize} \end{frame} \begin{frame}[fragile] \frametitle{Solution 3} -\label{sec-7} +\label{sec-9} \lstset{language=Python} \begin{lstlisting} @@ -153,35 +179,32 @@ sum(f(n), n, 1, oo) \end{lstlisting} \end{frame} \begin{frame} -\frametitle{Question 4} -\label{sec-8} +\frametitle{Exercise 4} +\label{sec-10} + \begin{itemize} \item Differentiate the following. - \begin{itemize} \item sin(x$^3$)+log(3x), to the second order \item x$^5$*log(x$^7$), to the fourth order \end{itemize} - +\vspace{4pt} \item Integrate the given expression - \begin{itemize} \item x*sin(x$^2$) \end{itemize} - +\vspace{4pt} \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{Solution 4} -\label{sec-9} +\label{sec-11} \lstset{language=Python} \begin{lstlisting} @@ -198,18 +221,19 @@ find_root(f(x)==0,1,2) \end{lstlisting} \end{frame} \begin{frame} -\frametitle{Question 5} -\label{sec-10} +\frametitle{Exercise 5} +\label{sec-12} + \begin{itemize} -\item Find the determinant and inverse of : +\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 5} -\label{sec-11} +\label{sec-13} \lstset{language=Python} \begin{lstlisting} @@ -221,32 +245,71 @@ A.inverse() \end{frame} \begin{frame} \frametitle{Summary} -\label{sec-12} +\label{sec-14} +In this tutorial, we have learnt to, + + +\begin{itemize} +\item Define symbolic expression and functions using the method ``var``. +\item Use built-in constants like pi,e,oo and functions like + sum,sin,cos,log,exp and many more. +\item Use <Tab> to see the documentation of a function. +\item Do simple calculus using functions like -- +\begin{itemize} +\item diff()--to find a differential of a function +\item integral()--to integrate an expression +\item simplify--to simplify complicated expression. +\end{itemize} +\item Substitute values in expressions using ``substitute`` function. +\item Create symbolic matrices and perform operations on them like -- \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. -\item Simple calculus operations . -\item Substituting values in expression using substitute function. -\item Creating symbolic matrices and performing operation on them . +\item det()--to find out the determinant of a matrix +\item inverse()--to find out the inverse of a matrix. +\end{itemize} \end{itemize} \end{frame} \begin{frame} -\frametitle{Thank you!} -\label{sec-13} +\frametitle{Evaluation} +\label{sec-15} + + +\begin{enumerate} +\item How do you define a name `y' as a symbol? +\vspace{8pt} +\item Get the value of pi upto precision 5 digits using sage? +\vspace{8pt} +\item Find third order differential function of + + f(x)=sin(x$^2$)+exp(x$^3$) +\end{enumerate} +\end{frame} +\begin{frame} +\frametitle{Solutions} +\label{sec-16} + + +\begin{enumerate} +\item var(`y') +\vspace{8pt} +\item n(pi,5) +\vspace{8pt} +\item diff(f(x),x,3) +\end{enumerate} +\end{frame} +\begin{frame} \begin{block}{} \begin{center} - This spoken tutorial has been produced by the - \textcolor{blue}{FOSSEE} team, which is funded by the + \textcolor{blue}{\Large THANK YOU!} \end{center} + \end{block} +\begin{block}{} \begin{center} - \textcolor{blue}{National Mission on Education through \\ - Information \& Communication Technology \\ - MHRD, Govt. of India}. + For more Information, visit our website\\ + \url{http://fossee.in/} \end{center} \end{block} \end{frame} -\end{document} +\end{document}
\ No newline at end of file |