︠8aa0cf2a-5b36-49af-9ccf-21daf4d25477i︠ %html

Project MOSAIC Joint Math Meetings

Ancillary Workshop:

Sage, Calculus, and Modeling

Presenting:

Karl-Dieter Crisman, Gordon College (MA)

Abstract:

This introduction to Sage will be short and sweet.  We'll talk a little bit about how to use the notebook and the range of functionality, but focus mostly on calculus and a little bit of doing modeling.   I'll also show how to use R in the notebook, and perhaps a bit of collaborative functionality in the notebook.

 

 

Thank you to the organizers for inviting me to give this talk!  

We'll do the following:

We'll be fairly quick about it, as it's best to learn while doing, so let's get started!

 

There are many Sage servers out there, and some allow anyone to create an account.  

Basically, there is not so much to do:

If you're in this workshop, you should be able to do this fairly easily.

 

So what can you do with Sage?  Well... what do you want to do?

︡00504b35-3bcc-4041-84aa-5feb5f83c5cf︡{"html": "

Project MOSAIC Joint Math Meetings

\r\n

Ancillary Workshop:

\r\n

Sage, Calculus, and Modeling

\r\n

Presenting:

\r\n

Karl-Dieter Crisman, Gordon College (MA)

\r\n

Abstract:

\r\n

This introduction to Sage will be short and sweet.  We'll talk a little bit about how to use the notebook and the range of functionality, but focus mostly on calculus and a little bit of doing modeling.   I'll also show how to use R in the notebook, and perhaps a bit of collaborative functionality in the notebook.

\r\n

 

\r\n

 

\r\n

Thank you to the organizers for inviting me to give this talk!  

\r\n

We'll do the following:

\r\n\r\n

We'll be fairly quick about it, as it's best to learn while doing, so let's get started!

\r\n

 

\r\n

There are many Sage servers out there, and some allow anyone to create an account.  

\r\n\r\n

Basically, there is not so much to do:

\r\n\r\n

If you're in this workshop, you should be able to do this fairly easily.

\r\n

 

\r\n

So what can you do with Sage?  Well... what do you want to do?

"}︡ ︠feb899ff-87f7-4af5-b494-14500744065d︠ factorial(35) ︡3f85d5a8-1647-4dfc-a572-625826e1e58b︡{"stdout": "10333147966386144929666651337523200000000"}︡ ︠d865c0c2-31bd-49ae-bfd8-cdfe529c6587i︠ %html

We can do various plots, as one would expect.

︡380a5200-427c-4c6a-92f2-4b2b74546f1e︡{"html": "

We can do various plots, as one would expect.

"}︡ ︠5d728696-26d7-487b-8e7f-b92e750e0211︠ plot(sin(x),(x,-2*pi,2*pi))+plot(diff(sin(x),x),(x,-2*pi,2*pi),color='red',linestyle='--') ︡3173e108-5808-4d80-ba15-7326be4681c0︡{"html": ""}︡ ︠d84e51bb-e3d1-4d1e-9f7d-1cff4486b40bi︠ %html

There is lots of functionality in various topics.  The graph editor is nice.

︡d818b921-f75f-44dd-9be9-85db86e7805c︡{"html": "

There is lots of functionality in various topics.  The graph editor is nice.

"}︡ ︠7dbb5ff6-3f39-4551-b269-73545e3e75fc︠ graph_editor() ︡fac9d5d8-314e-4346-ac78-3d3702ce514b︡︡ ︠c9e32e3e-f049-488e-9d09-525fcbec5b77i︠ %html

But allows for more advanced usage!

︡89b3678f-bdbc-4457-9ae0-b893ca48230b︡{"html": "

But allows for more advanced usage!

"}︡ ︠2cc7fe34-1e03-4f18-8e79-ee74f9316535︠ G.automorphism_group() ︡74e635a4-7b9c-4dd5-abb4-c10984aced02︡︡ ︠7b3cb895-c01d-41e4-90b2-a466bde53450i︠ %html

Interactive examples are fun. I love doing this myself, and is the primary way I use Sage in the classroom.  Can you find the pattern?

︡84f4edfb-4b9e-4323-87e6-13e3d5710384︡{"html": "

Interactive examples are fun. I love doing this myself, and is the primary way I use Sage in the classroom.  Can you find the pattern?

\r\n"}︡ ︠69875e25-dfba-4536-a43b-bc8f77f1b95f︠ @interact def _(p=(7,prime_range(100))): try: T = two_squares(p) html("The prime {0} can be written as ${1}^2+{2}^2$.".format(p,T[0],T[1])) except: html("Looks like the prime {0} can't be written as a sum of squares.".format(p)) ︡e8f6cb1e-d44b-484e-91f7-3acd99bc50aa︡︡ ︠1cfa0cdc-fe56-484c-8732-e736bd740268i︠ %html

 

 

Naturally, you are here to talk about calculus.   Sage has the usual functionality you'd expect from a computer algebra system.

Do you remember how to calculate $$\int \frac{1}{1+x^2}\, dx\; ?$$

︡e25853de-32e3-461e-bff9-bc3d038ba323︡{"html": "

 

\r\n

 

\r\n

Naturally, you are here to talk about calculus.   Sage has the usual functionality you'd expect from a computer algebra system.

\r\n

Do you remember how to calculate $$\\int \\frac{1}{1+x^2}\\, dx\\; ?$$

"}︡ ︠2394f1df-13ee-424d-bf78-f7c68bbd6d18︠ integrate(1/(1+x^2),x) ︡59f3cb06-d153-4434-ad69-0e77a6082c5a︡︡ ︠58382753-d254-40eb-afe2-fe6f252ab6c6i︠ %html

We can do computations inside of the things we are trying to learn about, and typeset them correctly.  (Incidentally, to get nice formulas in between the computational cells, just double click on one of the text areas!)

︡5da8745d-3a4f-450f-bd9f-91c1911be33d︡{"html": "

We can do computations inside of the things we are trying to learn about, and typeset them correctly.  (Incidentally, to get nice formulas in between the computational cells, just double click on one of the text areas!)

"}︡ ︠5d8c20a9-489c-4fd0-a232-f25bb91f7572︠ f(x) = 1/(1+x^2) P = plot(f,(x,-10,10),legend_label='$f(x)=\\frac{1}{1+x^2}$') Q = plot(diff(f,x),(x,-10,10),color='green',legend_label="$f\'(x)=%s$"%latex(diff(f,x)(x))) P+Q ︡6bb6d241-758c-4a97-8ed3-10564b19b751︡︡ ︠ace2c47d-87e6-4a1a-ad13-6552a72897fci︠ %html

I might want to find help.  Tabbing and the question mark are your ways to success.

︡1b00d7ef-979d-4694-8f92-3cee3a967f39︡{"html": "

I might want to find help.  Tabbing and the question mark are your ways to success.

"}︡ ︠fd1815cb-94d0-4bcd-b5de-21ae1dbe667e︠ density ︡723aee51-9068-4352-9095-93df1688875c︡︡ ︠f4be2445-2cb5-4d18-a6aa-6cba32afe51c︠ var('y') g(x,y) = x^2 - y^2 + x^2/4 P3 = density_plot(g,(x,-2,2),(y,-2,2),cmap='jet') Slope = plot_slope_field(g,(x,-2,2),(y,-2,2)) P3+Slope ︡83689d51-9b59-40c2-81bc-d7f0eee43b5d︡︡ ︠40d41f57-0f68-40be-bfca-dd929fecf93fi︠ %html

We can also try to find fits for models of various types, using one of the many components of Sage - in this case, SciPy.

︡39578c03-1344-4b16-ad93-39af3b1a1bc7︡{"html": "

We can also try to find fits for models of various types, using one of the many components of Sage - in this case, SciPy.

"}︡ ︠42a3dcc3-4168-4865-9eae-c281d77ce20c︠ R = [[1,2],[3.45,4],[6,5],[4,3],[1.5,2.3]] var('a,b') model(x) = a*x+b find_fit(R,model) ︡2a43a421-a268-4b8f-913d-5888be562f28︡︡ ︠57b183ed-512f-4319-a0ea-38109470a51d︠ points(R)+plot(model(a=find_fit(R,model)[0].rhs(),b=find_fit(R,model)[1].rhs()),(x,0,10),color='red') ︡dd189ee9-66e0-40d7-8bd2-25a0272777bc︡︡ ︠7ec0aad2-e41b-4be8-b751-5a7528c6c105i︠ %html

Because Python, the programming language Sage is based on, is a very powerful tool, we have everything we need to import data.

︡76e1e325-04ab-4b58-a400-140bbd44da2a︡{"html": "

Because Python, the programming language Sage is based on, is a very powerful tool, we have everything we need to import data.

"}︡ ︠786d9adb-7438-4925-9be3-e4586d818047︠ import csv data = [row for row in csv.reader(open( DATA+'blastdata.csv'))] headers = data[0] data = data[1:] ︡eac73f2b-d3a0-46ca-8b6a-9a0ec2bc4ba9︡︡ ︠cabfe7f4-2138-4c44-b41a-195799d5562ei︠ %html

Now we'll make two possible models for the data from the bomb blast in the earlier talk Danny gave.

︡a0b23eb0-0e34-4543-b0fb-c69ef6e84d86︡{"html": "

Now we'll make two possible models for the data from the bomb blast in the earlier talk Danny gave.

"}︡ ︠10583699-f5d1-44d0-a7f7-7e7e5436c959︠ var('a,b,c,d') MODEL1(x) = a + b*sqrt(x)+c*x MODEL2(x) = d*x^(0.4) ︡74187945-833a-4db8-a8a3-32b7827d0b3c︡︡ ︠4d718ad2-07b9-467d-a476-82bb2364ed61︠ fit1 = find_fit(data,MODEL1,solution_dict=True) fit2 = find_fit(data,MODEL2,solution_dict=True) ︡f6913adc-7d9a-448e-9a87-4de1aacdfc1c︡︡ ︠1902f5b0-c9d3-486a-9cce-2f190371f308i︠ %html

We've now found fits for each model.  Now we just extract the information and plot!

︡ce670a05-b2e9-4303-a874-ad122d4b018b︡{"html": "

We've now found fits for each model.  Now we just extract the information and plot!

"}︡ ︠0be993a9-8bd5-487a-86ca-a58bf8898de4︠ pts = points(data) P1 = plot(MODEL1.subs(fit1),(x,0,.07),color='green') P2 = plot(MODEL2.subs(fit2),(x,0,.07),color='red') pts+P1+P2 ︡b41d6b48-6b23-4160-930c-1475b2dceb77︡{"html": ""}︡ ︠7b09d63f-17f0-419f-97d1-370c3547a8fdi︠ %html

Like Danny said, which one is better?

 

As another example of what can be done, let's see how to use R from the notebook.  All I have to do is insert '%r' at the beginning of a cell, and then everything is done in R.  (It's also possible to have a whole worksheet evaluate in a given system.)

Here, I'll first load the library from the MOSAIC project's R package.  You'll need internet for this, of course.

︡89e36638-0ef2-4024-981f-b23a503f788d︡{"html": "

Like Danny said, which one is better?

\n

 

\n

As another example of what can be done, let's see how to use R from the notebook.  All I have to do is insert '%r' at the beginning of a cell, and then everything is done in R.  (It's also possible to have a whole worksheet evaluate in a given system.)

\n

Here, I'll first load the library from the MOSAIC project's R package.  You'll need internet for this, of course.

"}︡ ︠7a8feedd-9a6f-4868-917c-4f245608c792︠ %r install.packages('mosaic'); ︡8586e988-1aa9-4c3e-83a1-3225e7fc27a1︡{"stdout": "\u001b[1malso installing the dependency \u2018Hmisc\u2019\n\n\u001b[0m\u001b[1mtrying URL 'http://cran.r-project.org/src/contrib/Hmisc_3.9-0.tar.gz'\n\u001b[0m\u001b[1mContent type 'application/x-gzip'\u001b[0m\u001b[1m length 572432 bytes (559 Kb)\n\u001b[0m\u001b[1mopened URL\n\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m\n\u001b[0m\u001b[1mdownloaded 559 Kb\n\n\u001b[0m\u001b[1mtrying URL 'http://cran.r-project.org/src/contrib/mosaic_0.2-3.tar.gz'\n\u001b[0m\u001b[1mContent type 'application/x-gzip'\u001b[0m\u001b[1m length 839835 bytes (820 Kb)\n\u001b[0m\u001b[1mopened URL\n\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m=\u001b[0m\u001b[1m\n\u001b[0m\u001b[1mdownloaded 820 Kb\n\n\u001b[0m* installing *source* package \u2018Hmisc\u2019 ...\n** libs\ngcc -std=gnu99 -I/Users/karl-dietercrisman/Downloads/sage-4.7.2/local/lib/R/include -I/Users/karl-dietercrisman/Downloads/sage-4.7.2/local/include -fPIC -I/Users/karl-dietercrisman/Downloads/sage-4.7.2/local/include -L/Users/karl-dietercrisman/Downloads/sage-4.7.2/local/lib/ -c Hmisc.c -o Hmisc.o\nsage_fortran -fPIC -g -O2 -c cidxcn.f -o cidxcn.o\nsage_fortran -fPIC -g -O2 -c cidxcp.f -o cidxcp.o\nsage_fortran -fPIC -g -O2 -c hoeffd.f -o hoeffd.o\nsage_fortran -fPIC -g -O2 -c jacklins.f -o jacklins.o\nsage_fortran -fPIC -g -O2 -c largrec.f -o largrec.o\ngcc -std=gnu99 -I/Users/karl-dietercrisman/Downloads/sage-4.7.2/local/lib/R/include -I/Users/karl-dietercrisman/Downloads/sage-4.7.2/local/include -fPIC -I/Users/karl-dietercrisman/Downloads/sage-4.7.2/local/include -L/Users/karl-dietercrisman/Downloads/sage-4.7.2/local/lib/ -c mChoice.c -o mChoice.o\ngcc -std=gnu99 -I/Users/karl-dietercrisman/Downloads/sage-4.7.2/local/lib/R/include -I/Users/karl-dietercrisman/Downloads/sage-4.7.2/local/include -fPIC -I/Users/karl-dietercrisman/Downloads/sage-4.7.2/local/include -L/Users/karl-dietercrisman/Downloads/sage-4.7.2/local/lib/ -c nstr.c -o nstr.o\ngcc -std=gnu99 -I/Users/karl-dietercrisman/Downloads/sage-4.7.2/local/lib/R/include -I/Users/karl-dietercrisman/Downloads/sage-4.7.2/local/include -fPIC -I/Users/karl-dietercrisman/Downloads/sage-4.7.2/local/include -L/Users/karl-dietercrisman/Downloads/sage-4.7.2/local/lib/ -c ranksort.c -o ranksort.o\nsage_fortran -fPIC -g -O2 -c rcorr.f -o rcorr.o\ngcc -std=gnu99 -I/Users/karl-dietercrisman/Downloads/sage-4.7.2/local/lib/R/include -I/Users/karl-dietercrisman/Downloads/sage-4.7.2/local/include -fPIC -I/Users/karl-dietercrisman/Downloads/sage-4.7.2/local/include -L/Users/karl-dietercrisman/Downloads/sage-4.7.2/local/lib/ -c string_box.c -o string_box.o\nsage_fortran -fPIC -g -O2 -c wclosest.f -o wclosest.o\ngcc -std=gnu99 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Users/karl-dietercrisman/Downloads/sage-4.7.2/local/lib/ -o Hmisc.so Hmisc.o cidxcn.o cidxcp.o hoeffd.o jacklins.o largrec.o mChoice.o nstr.o ranksort.o rcorr.o string_box.o wclosest.o -L/Users/karl-dietercrisman/Downloads/sage-4.7.2/local/lib/gcc/i686-apple-darwin8/4.2.3/x86_64 -L/Users/karl-dietercrisman/Downloads/sage-4.7.2/local/lib/gcc/i686-apple-darwin8/4.2.3 -L/Users/karl-dietercrisman/Downloads/sage-4.7.2/local/lib/gcc -L/usr/local/lib -lgfortran -L/Users/karl-dietercrisman/Downloads/sage-4.7.2/local/lib/R//lib -lR -Wl,-framework -Wl,CoreFoundation\n** R\n** inst\n** preparing package for lazy loading\nLoading required package: splines\n** help\n*** installing help indices\n** building package indices ...\n* DONE (Hmisc)\n* installing *source* package \u2018mosaic\u2019 ...\n** R\n** data\n** moving datasets to lazyload DB\n** demo\n** inst\n** preparing package for lazy loading\nLoading required package: survival\nLoading required package: splines\nHmisc library by Frank E Harrell Jr\n\nType library(help='Hmisc'), ?Overview, or ?Hmisc.Overview')\nto see overall documentation.\n\nNOTE:Hmisc no longer redefines [.factor to drop unused levels when\nsubsetting. To get the old behavior of Hmisc type dropUnusedLevels().\n\n\nAttaching package: 'Hmisc'\n\n\n\tThe following object(s) are masked from package:survival :\n\n\t untangle.specials \n\n\n\tThe following object(s) are masked from package:base :\n\n\t format.pval,\n\t round.POSIXt,\n\t trunc.POSIXt,\n\t units \n\nCreating a generic for \"mean\" in package \"mosaic\"\n (the supplied definition differs from and overrides the implicit generic\n in package \"base\": Classes: \"nonstandardGenericFunction\", \"standardGeneric\")\nIn method for function \"var\": expanding the signature to include\nomitted arguments in definition: data = \"missing\"\nCreating a new generic function for \"print\" in \"mosaic\"\n** help\n*** installing help indices\n** building package indices ...\n* DONE (mosaic)\n\nThe downloaded packages are in\n\t\u2018/private/var/folders/Yy/YytEJm5VEB0+pBRD7JNLe++++TQ/-Tmp-/RtmpC1m0k6/downloaded_packages\u2019\n\u001b[1mUpdating HTML index of packages in '.Library'"}︡ ︠6c5722b5-5ab5-4a42-a3a8-230a12079f83︠ %r library(mosaic); ︡6379d80a-6faf-4fad-9300-316baba827a0︡{"stdout": "\u001b[1mLoading required package: lattice\n\u001b[0m\u001b[1mLoading required package: grid\n\u001b[0m\u001b[1mLoading required package: Hmisc\n\u001b[0m\u001b[1mLoading required package: survival\n\u001b[0m\u001b[1mLoading required package: splines\n\u001b[0m\u001b[1mHmisc library by Frank E Harrell Jr\n\nType library(help='Hmisc'), ?Overview, or ?Hmisc.Overview')\nto see overall documentation.\n\nNOTE:Hmisc no longer redefines [.factor to drop unused levels when\nsubsetting. To get the old behavior of Hmisc type dropUnusedLevels().\n\n\u001b[0m\u001b[1m\nAttaching package: 'Hmisc'\n\n\u001b[0m\u001b[1m\n\tThe following object(s) are masked from package:survival :\n\n\t untangle.specials \n\n\u001b[0m\u001b[1m\n\tThe following object(s) are masked from package:base :\n\n\t format.pval,\n\t round.POSIXt,\n\t trunc.POSIXt,\n\t units \n\n\u001b[0m\u001b[1m\nAttaching package: 'mosaic'\n\n\u001b[0m\u001b[1m\n\tThe following object(s) are masked from package:Hmisc :\n\n\t do \n\n\u001b[0m\u001b[1m\n\tThe following object(s) are masked from package:stats :\n\n\t binom.test,\n\t D,\n\t median,\n\t prop.test,\n\t sd,\n\t var \n\n\u001b[0m\u001b[1m\n\tThe following object(s) are masked from package:base :\n\n\t max,\n\t mean,\n\t min,\n\t print,\n\t print.function,\n\t sample"}︡ ︠4df4dbdd-2b44-4a88-83c6-732d7f7b21cci︠ %html

We can use the functions from the package immediately.

︡5f944bbd-81ee-4535-a1ea-a6ff0fd308c6︡{"html": "

We can use the functions from the package immediately.

"}︡ ︠3594c3ea-975e-44f0-b3f3-6ed96a6d0b99︠ %r do(5)*3 ︡551f79d3-5103-413c-93b4-003ad54f7e74︡{"stdout": "result\n1 3\n2 3\n3 3\n4 3\n5 3"}︡ ︠ff014bfb-f365-439b-9d48-0e15cc14e623i︠ %html

Graphics work, too, if you create a graphics device.  Here, I'm using the D and fplot functions from the MOSAIC project's R package.

︡91b1942a-9b1f-4009-865c-22200bf9061b︡{"html": "

Graphics work, too, if you create a graphics device.  Here, I'm using the D and fplot functions from the MOSAIC project's R package.

"}︡ ︠7aa70ca6-09aa-4422-904f-874176c98b0b︠ %r quartz() fplot(sin,xlim=c(-2*pi,2*pi)) fplot(D(sin),xlim=c(-2*pi,2*pi)) ︡1d65dd7c-c6fc-43ce-b0f6-eed34f8764df︡︡ ︠af69d3c2-d94c-4664-a8ca-cbfc2cbf67aci︠ %html

If you want to do a whole worksheet in R (or GAP, or Octave, or even Mathematica, if you own it) that is supported as well.

 

Finally, how might one use Sage in terms of pedagogy?  Here, the answer is just as broad as your own interests, and I'll focus on collaboration.  Here are several ideas.

For example, in a calculus class, just giving a worksheet to upload with prototypes of syntax could help a lot for routine problems.

︡b9c09320-6cc7-4f3c-bcd3-c0052a26b855︡{"html": "

If you want to do a whole worksheet in R (or GAP, or Octave, or even Mathematica, if you own it) that is supported as well.

\n

 

\n

Finally, how might one use Sage in terms of pedagogy?  Here, the answer is just as broad as your own interests, and I'll focus on collaboration.  Here are several ideas.

\n\n

For example, in a calculus class, just giving a worksheet to upload with prototypes of syntax could help a lot for routine problems.

"}︡ ︠979a0aa4-608f-4111-b2fe-4361c7e2d89f︠ h(x) = sin(e^(-x^2)) derivative( h, x); show(derivative( h, x ), x)) ︡c4bf8165-1f7d-4ecd-8002-0b145b05e273︡︡ ︠5b80cb9d-9c35-45a2-9881-172388d240d6i︠ %html

Just click the 'Share' button at the top and fill in the usernames of the people who should share the worksheet!  Some people use this for turning in labs, for instance.

With this option, anyone on the server can look at your worksheet, and edit a copy for themselves.  This is especially effective when you want to post something for students to try out or use for homework, or to make easily available to colleagues elsewhere.

In fact, I'm going to publish THIS VERY WORKSHEET right now on the server for this workshop!  And then you can download it and try it yourself.

 

Well, I think that's all we have time for.  Please see www.sagemath.org for more discussion of download options for all platforms, places to try out Sage, and discussion forums.  We value your feedback!

This talk is also available at http://www.sagenb.org/home/pub/3932 .

Questions?

︡02d2e358-1abd-4253-ae00-b3af5f28b8fe︡{"html": "\n

Just click the 'Share' button at the top and fill in the usernames of the people who should share the worksheet!  Some people use this for turning in labs, for instance.

\n\n

With this option, anyone on the server can look at your worksheet, and edit a copy for themselves.  This is especially effective when you want to post something for students to try out or use for homework, or to make easily available to colleagues elsewhere.

\n

In fact, I'm going to publish THIS VERY WORKSHEET right now on the server for this workshop!  And then you can download it and try it yourself.

\n

 

\n

Well, I think that's all we have time for.  Please see www.sagemath.org for more discussion of download options for all platforms, places to try out Sage, and discussion forums.  We value your feedback!

\n

This talk is also available at http://www.sagenb.org/home/pub/3932 .

\n

Questions?

"}︡ ︠b041a2c5-4a9c-4a26-906b-e913fd088018︠ var('x,y') plot3d(sin(x^2+y^2),(x,-3,3),(y,-3,3),plot_points=200) ︡5571cbde-e00a-4286-b814-1237c5ae9323︡︡