Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Introduction
This is a work in progress and more activities will be added in the future. Check back later for a more tutorials
Please feel free to copy these documents and modify them according to your needs. I encourage you to make use of these in your classes.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Organization of This Document
This document contains a series of links to interactive SageMath worksheets and Jupyter notebooks. Each worksheet shows how to use various features of SageMath in a calculus-based physics course or how to run VPython in SageMathCloud.
Introduction to SageMath
You can find numerous tutorials online for getting started with SageMath but here are a few of the better ones I've found.
Try an interactive tutorial here
Sage for Undergraduates is a textbook written by Dr. Gregory Bard. Free pdf versions of the text can be found here.
A tutorial from San Diego State University
Official SageMath tutorials
Editing SageMath Worksheets
You are encouraged to edit these worksheets for your students. This material is released under the CC-BY 4.0 license. Please modify these documents to fit the needs of your class and share your changes with others. Many of the earlier sections could be used in a Modern Physics course with a little editing.
Editing Tips
Everything written in cells that start with %md on the first line are treated as Markdown cells ((Markdown Tutorial))
Starting a cell with %html treats everything in the cell as HTML code
Double-click on the text of a cell to show the code
The hashtag '#' is used in calculation cells to indicate comments that are not parsed by SageMath
See the ReadMe for directions on how to copy these documents into your SageMathCloud project
Topics
- Units and Signficant Figures
Units and Significant Figures Interactive Worksheet
This worksheet covers the following SageMath features:
Defining variables
Obtaining numerical approximate results
Using units in SageMath
Defining functions
Substituting values for variables
- Derivatives and Integrals
Derivatives and Integrals Interactive Worksheet
This worksheet covers the following SageMath features:
Defining functions
Taking derivatives
Plotting functions
Integrating functions
Using VPython in SageMathCloud
Intro to VPython Jupyter Notebook
A short guide on getting started using VPython. This Jupyter notebook will cover the following features:
How to import VPython
How to draw spheres on screen
How to create new canvases
Using
while
loops in PythonHow to animate a sphere
Modeling Constant Velocity in VPython
Modeling Constant Velocity Jupyter Notebook
This Jupyter notebook will cover the following features:
Animate different shapes with constant velocity
Create arrows to show direction of motion
Graph position vs. time
Constant Acceleration in VPython
Constant Acceleration Jupyter Notebook
This Jupyter notebook covers the following:
Create objects moving with constant acceleration
Creating Motion Diagrams
You can create animations and motion diagrams using VPython and Jupyter notebooks using Physutil, a Python script that makes these things easy.
This notebook covers the following features:
Including an on-screen timer
Drawing motion diagrams
Using Physutil for graphing
Documentation about Physutil can be found here
Bouncing Ball Demo
This notebook is based on the introduction to VPython tutorial on the VPython website. You can find it here.
Future Worksheets
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.