Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Sage beginners guide - Finch Kraigh copy.pdf
Скачиваний:
15
Добавлен:
10.02.2015
Размер:
6 Мб
Скачать
☆

What Can You Do with Sage?

The plot looks like this:

What just happened?

We defined another Python function called gompertz to model the growth of bacteria in the presence of limited resources. Based on the data plot from the previous example, we estimated values for the parameters of the model to use an initial guess for the fitting routine. We used the find_fit function again to fit the model to the experimental data, and displayed the fitted values. Finally, we plotted the fitted model and the experimental data on the same axes.

Summary

This chapter has given you a quick, high-level overview of some of the many things that Sage can do for you. Don't worry if you feel a little lost, or if you had trouble trying to modify the examples. Everything you need to know will be covered in detail in later chapters.

Specifically, we looked at:

Using Sage as a sophisticated scientific and graphing calculator Speeding up tedious tasks in symbolic mathematics

Solving a system of linear equations, a system of algebraic equations, and an ordinary differential equation

[ 26 ]

Chapter 1

Making publication-quality plots in two and three dimensions

Using Sage for data analysis and model fitting in a practical setting

Hopefully, you are convinced that Sage will be the right tool to assist you in your work, and you are ready to install Sage on your computer. In the next chapter, you will learn how to install Sage on various platforms.

[ 27 ]

2

InstallingSage

Remember that you don't actually have to install Sage to start using it. You can start learning Sage by utilizing one of the free public notebook servers that can be found at http://www. sagenb.org/. However, if you find that Sage suits your needs, you will want to install a copy on your own computer. This will guarantee that Sage is always available to you, and

it will reduce the load on the public servers so that others can experiment with Sage. In addition, your data will be more secure, and you can utilize more computing power to solve larger problems. This chapter will take you through the process of installing Sage on various platforms.

In this chapter we shall:

Install a binary version of Sage on Windows and install a binary version of Sage on

OS X

Install a binary version of Sage on GNU/Linux

Compile Sage from source

Beforeyoubegin

At the moment, Sage is fully supported on certain versions of the following platforms: some Linux distributions (Fedora, openSUSE, Red Hat, and Ubuntu), Mac OS X, OpenSolaris, and Solaris. Sage is tested on all of these platforms before each release, and binaries are always available for these platforms. The latest list of supported platforms is available at http:// wiki.sagemath.org/SupportedPlatforms. The page also contains information about platforms that Sage will probably run on, and the status of efforts to port Sage to various platforms.

Installing Sage

When downloading Sage, the website attempts to detect which operating system you are using, and directs you to the appropriate download page. If it sends you to the wrong download page, use the "Download" menu at the top of the page to choose the correct platform. If you get stuck at any point, the official Sage installation guide is available at

http://www.sagemath.org/doc/installation/.

InstallingabinaryversionofSageonWindows

Installing Sage on Windows is slightly more involved than installing a typical Windows program. Sage is a collection of over 90 different tools. Many of these tools are developed within a UNIX-like environment, and some have not been successfully ported to Windows. Porting programs from UNIX-like environments to Windows requires the installation of Cygwin (http://www.cygwin.com/), which provides many of the tools that are standard on a Linux system. Rather than attempting to port all of the necessary tools to Cygwin on Windows, the developers of Sage have chosen to distribute Sage as a virtual machine that can run on Windows with the use of the free VMWare Player. A port to Cygwin is in progress, and more information can be found at http://trac.sagemath.org/sage_trac/wiki/

CygwinPort.

DownloadingVMwarePlayer

The VMWare Player can be found at http://www.vmware.com/products/player/. Clicking the Download link will direct you to a registration form. Fill out and submit the form. You will receive a confirmation email that contains a link that must be clicked to complete the registration process and take you to the download page. Choose Start Download Manager, which downloads and runs a small application that performs the actual download and saves the file to a location of your choice.

InstallingVMWarePlayer

After downloading VMWare Player, double-click the saved file to start the installation wizard. Follow the instructions in the wizard to install the Player. You will have to reboot the computer when instructed.

DownloadingandextractingSage

Download Sage by following the Download link from http://www.sagemath.org. The site should automatically detect that you are using Windows, and direct you to the right download page. Choose the closest mirror and download the compressed virtual machine. Be aware that the file is nearly 1GB in size. Once the download is complete, right-click the compressed file and choose Extract all from the pop-up menu.

[ 30 ]

Chapter 2

Launchingthevirtualmachine

LaunchVMwarePlayerandacceptthelicenseterms.WhenthePlayerhasstarted,click Opena VirtualMachineandselecttheSagevirtualmachine,whichiscalled sage-vmware.vmx.Click PlayvirtualmachinetorunSage.IfyouhaverunSagebefore,itshouldappearinthelistof virtualmachinesontheleftsideofthedialogbox,andyoucandouble-clicktorunit.

When the virtual machine launches, you may receive one or more warnings about various devices (such as Bluetooth adapters) that the virtual machine cannot connect to. Don't worry about this, since Sage doesn't need these devices.

[ 31 ]

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]