Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

LS30 Cookbook

Views: 6814

The LS30 Sagemath Cookbook

By Daniel Sun

The LS30 Sagemath Cookbook is intended to provide a bunch of short, easy-to-digest 'recipes' for doing common tasks and operations in sagemath/python. Just like a collection of recipes, you should first start out by copying these verbatim and then over time, gradually gaining understanding by tweaking them here and there until eventually you can write your own code independently.

Objectives:

  1. Provide reference implementations of common tasks

  2. Serve as a guide to sagemath/python

  3. Emphasize student understanding/simplicity over efficiency

As this book is more of a 'cookbook' and not a novel, it is not necessarily meant to be read from start to finish. More complex topics might come up in earlier chapters, although they will tend to be shifted towards the end of the material. This helps to keep the cookbook organized.

Chapters

  1. Python

    • lists, srange and zip

    • for/while loops

    • if/else

    • functions

  2. Sagemath

    • symbolic variables

    • symbolic functions

    • interactive plots

    • animations

    • show vs. print

  3. LS30A-related items

    • iteration

    • solving differential equations (desolve_odeint)

    • plotting a timeseries

    • plotting a trajectory

    • plotting a vector field

  4. LS30B-related items

    • derivatives

    • linear algebra

    • solve command