An introduction to SageMath
Downloads
- Worksheet: seminar.sws (also as html, pdf, text file).
- SageTeX: example.tex and its pdf output.
Links
- SageMath homepage (CoCalc, SageMathCell, tutorial, documentation).
- Python homepage (tutorial).
- Niles Johnson’s Hopf fibration video.
Example
xxxxxxxxxx
f = x*cos(x)^2
plotf = plot(f, (x,-1,3.5), color='purple', thickness=3)
origin = point((0,0), color='orange', alpha=.7, size=150)
label = 'MacLaurin polynomial of $%s$ of degree'%latex(f)
def _(j=slider(0, 20, 1, default=3, label=label)):
Tjf = f.taylor(x, 0, j)
plotTjf = plot(Tjf, (x,-1,3.5), color='green', thickness=1.5, fill=f)
pretty_print(latex(Tjf))
show(plotf + plotTjf + origin, ymin=-0.5, ymax=3.5, figsize=[7,3])