Sage Beginner's Guide
eBook - ePub

Sage Beginner's Guide

  1. 364 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Sage Beginner's Guide

Book details
Book preview
Table of contents
Citations

About This Book

In Detail

Your work demands results, and you don't have time for tedious, repetitive mathematical tasks. Sage is a free, open-source software package that automates symbolic and numerical calculations with the power of the Python programming language, so you can focus on the analytical and creative aspects of your work or studies.

Sage Beginner's Guide shows you how to do calculations with Sage. Each concept is illustrated with a complete example that you can use as a starting point for your own work. You will learn how to use many of the functions that are built in to Sage, and how to use Python to write sophisticated programs that utilize the power of Sage.

This book starts by showing you how to download and install Sage, and introduces the command-line interface and the graphical notebook interface. It also includes an introduction to Python so you can start programming in Sage. Every major concept is illustrated with a practical example.

After learning the fundamentals of variables and functions in Sage, you will learn how to symbolically simplify expressions, solve equations, perform integrals and derivatives, and manipulate vectors and matrices. You will learn how Sage can produce numerous kinds of plots and graphics. The book will demonstrate numerical methods in Sage, and explain how to use object-oriented programming to improve your code.

Sage Beginner's Guide will give you the tools you need to unlock the full potential of Sage for simplifying and automating mathematical computing.

Effectively use Sage to eliminate tedious algebra, speed up numerical calculations, implement algorithms and data structures, and illustrate your work with publication-quality plots and graphics

Approach

This is a beginner's guide with clear step-by-step instructions, explanations, and advice. Each concept is illustrated with a complete example that you can use as a starting point for your own work.

Who this book is for

If you are an engineer, scientist, mathematician, or student, this book is for you. To get the most from Sage by using the Python programming language, we'll give you the basics of the language to get you started. For this, it will be helpful if you have some experience with basic programming concepts.

Frequently asked questions

Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes, you can access Sage Beginner's Guide by Craig Finch in PDF and/or ePUB format, as well as other popular books in Informatik & Informatik Allgemein. We have over one million books available in our catalogue for you to explore.

Information

Year
2011
ISBN
9781849514460

Sage

Beginner's Guide


Table of Contents

Sage
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Time for action - heading
What just happened?
Pop quiz - heading
Have a go hero - heading
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. What Can You Do with Sage?
Getting started
Using Sage as a powerful calculator
Symbolic mathematics
Have a go hero -
Linear algebra
Solving an ordinary differential equation
More advanced graphics
Visualising a three-dimensional surface
Typesetting mathematical expressions
A practical example: analysing experimental data
Time for action - fitting the standard curve
What just happened?
Time for action - plotting experimental data
What just happened?
Time for action - fitting a growth model
What just happened?
Summary
2. Installing Sage
Before you begin
Installing a binary version of Sage on Windows
Downloading VMware Player
Installing VMWare Player
Downloading and extracting Sage
Launching the virtual machine
Start Sage
Installing a binary version of Sage on OS X
Downloading Sage
Installing Sage
Starting Sage
Installing a binary version of Sage on GNU/Linux
Downloading and decompressing Sage
Running Sage from your user account
Installing for multiple users
Building Sage from source
Prerequisites
Downloading and decompressing source tarball
Building Sage
Installation
Summary
3. Getting Started with Sage
How to get help with Sage
Starting Sage from the command line
Using the interactive shell
Time for action - doing calculations on the command line
What just happened?
Getting help
Command history
Tab completion
Interactively tracing execution
Using the notebook interface
Starting the notebook interface
Time for action - doing calculations with the notebook interface
What just happened?
Getting help in the notebook interface
Working with cells
Working with code
Closing the notebook interface
Have a go hero - using the notebook interface
Displaying results of calculations
Operators and variables
Arithmetic operators
Pop quiz - working with operators
Numerical types
Integers and rational numbers
Real numbers
Complex numbers
Symbolic expressions
Defining variables on rings
Combining types in expressions
Pop quiz - understanding types
Strings
Time for action - using strings
What just happened?
Callable symbolic expressions
Time for action - defining callable symbolic expressions
What just happened?
Automatically typesetting expressions
Functions
Time for action - calling functions
What just happened?
Have a go hero - make some more plots
Built-in functions
Numerical approximations
The reset and restore functions
Defining your own functions
Time for action - defining and using your own functions
What just happened?
Functions with keyword arguments
Time for action - defining a function with keyword arguments
What just happened?
Objects
Time for action - working with objects
What just happened?
Getting help with objects
Summary
4. Introducing Python and Sage
Python 2 and Python 3
Writing code for Sage
Long lines of code
Running scripts
Sequence types: lists, tuples, and strings
Time for action - creating lists
What just happened?
Getting and setting items in lists
Time for action - accessing items in a list
What just happened?
Pop quiz - lists and indexing
List functions and methods
Tuples: read-only lists
Time for action - returning multiple values from a function
What just happened?
Strings
Time for action - working with strings
What just happened?
Other sequence types
For loops
Time for action - iterating over lists
What just happened?
Time for action - computing a solution to the diffusion equation
What just happened?
Pop quiz - lists and for loops
Have a go hero - adding another for loop
List comprehensions
Time for action - using a list comprehension
What just happened?
While loops and text file I/O
Time for action - saving data in a text file
What just happened?
Time for action - reading data from a text file
What just happened?
While loops
Parsing strings and extracting data
Alternative approach to reading from a text file
Have a go hero - define a function for reading the text file
Have a go hero - replace a for loop with a while loop
If statements and conditional expressions
Storing data in a dictionary
Time for action - defining and accessing dictionaries
What just happened?
Lambda forms
Time for action - using lambda to create an anonymous function
What just happened?
Summary
5. Vectors, Matrices, and Linear Algebra
Vectors and vector spaces
Time for action - working with vectors
What just happened?
Creating a vector space
Creating and manipulating vectors
Time for action - manipulating elements of vectors
What just happened?
Vector operators and methods
Matrices and matrix spaces
Time for action - solving a system of linear equations
What just happened?
Creating matrices and matrix spaces
Accessing and manipulating matrices
Time for action - accessing elements and parts of a matrix
What just happened?
Manipulating matrices
Time for action - manipulating matrices
What just happened?
Pop quiz - manipulating matrices
Matrix algebra
Time for action - matrix algebra
What just happened?
Other matrix methods
Time for action - trying other matrix methods
What just happened?
Eigenvalues and eigenvectors
Time for action - computing eigenvalues and eigenvectors
What just happened?
Have a go hero - verifying the eigenvalues and eigenvectors
Decomposing matrices
Time for action - computing ...

Table of contents

  1. Sage