LATM Sage Intro
Brad Burkman, Louisiana School for Math, Science, and the Arts
Louisiana Association of Teachers of Mathematics
2011 Annual Conference
If you're using this page online from the sagemath.shodor.org:8000 server, start by clicking the "Edit a Copy" link in the upper left corner.
Helpful web resources: www.sagemath.org, Basic Math Quick Reference Card, Calculus Quick Reference Card
To get a Sage account, go to either www.sagemath.org or to sagemath.shodor.org:8000.
First, a gallery of cool stuff you can do in Sage.
We have three equations in three variables:
$$5x - 2y+3z=-9 \qquad 4x+3y+5z=4 \qquad x+2y-z=7$$
or
$$f(x,y)= \frac{5x-2y+9}{-3} \qquad g(x,y) = \frac{4x+3y-4}{-5} \qquad h(x,y) = x+2y-7$$
A. Graph the system.
Click on the cell below, hit "evaluate" underneath, and click and drag the graph to fly the perspective.
|
|
|
|
|
|
|
What would the picture look like if we had a dependent system?
Here, $h(x,y) = f(x,y)+g(x,y)$.
$$5x - 2y+3z=-9 \qquad 4x+3y+5z=4 \qquad 9x+y+8z=-5$$
or
$$f(x,y)= \frac{5x-2y+9}{-3} \qquad g(x,y) = \frac{4x+3y-4}{-5} \qquad h(x,y) = \frac{9x+y+5}{-8}$$
|
Here, $h(x,y)=f(x,y)+g(x,y)+2$$
|
See how changes in $a$, $b$, $c$, and $d$ affect the graph of $y=a[b(x-c)]^2+d$.
To see transformations of $y=a\sin[b(x-c)]+d$, change the f(x)=x^2 in the second line to f(x)=sin(x).
Click to the left again to hide and once more to show the dynamic interactive window |
For sliding values of $a$ and $h$, and any function $f$,
find the slope of the secant line through $(a,f(a))$ and $(a+h,f(a+h))$.
Click to the left again to hide and once more to show the dynamic interactive window |
Slide the "order" bar to see the graph of the Taylor polynomial at $x=0$ of that order for $y=\sin x$.
Click to the left again to hide and once more to show the dynamic interactive window |
|
Approximate the root of $f(x)=x^2-2$ in $x \in [1,2]$.
|
|
|
|
|
|
|
Solving $x^2 - 5x - 6=0$ for $x$. Note the double equals signs and that you have to tell it what to solve for.
|
Given the formula for the surface area of a right cylinder, solve for its height.
$$S = 2\pi rh + 2\pi r^2$$
$$\left[h = -\frac{2 \, \pi r^{2} - S}{2 \, \pi r}\right]$$
|
|
Solving the system $\qquad a+b=1 \qquad 2a+3b=4$.
|
Sage doesn't have an absolute value solver to solve $ |2x+3|=1$, but if you use $|x|=\sqrt(x^2)$ you can get the same results.
|
![]() |
![]() |
![]() |
![]() |
![]() |
|
|
Complex numbers. Here we use $e^{i\theta} = \cos\theta + i\sin\theta$. Letting $\theta = \frac{\pi}{6}$, we get $e^{i \pi/6} = \cos \frac{\pi}{6} + i \sin \frac{\pi}{6} = \frac{\sqrt3}{2} + \frac{1}{2}i$
|
Discrete math: Implement the RSA encryption algorithm using distinct primes $p$ and $q$ of about four digits each. For a secure RSA algorithm you'd use primes of about a hundred digits, but four digits will give the idea.
|
|
|
|
|
|