Calculatte: Starting Your CalcBlog

215 days ago by math.cohen

Friday Jan 29, 2010

Welcome to my CalcBlog.   Last week, I asked all of my students to start a daily Calculus journal.   Being a non-writer, I would have hated the idea of having to write a journal when I was first learning Calculus.  Over the years, I have seen the benefits of writing and communicating ideas.   Blogs might even be a better way sharing written ideas in while learning. 

This website sagenb.org is a particularly nice place to share math ideas.   I have set up this short notebook as an example for my students.  To really use it, you'll need to get an account on sagenb.org and get your own copy of the notebook to play with.

Another good place to begin to learn Sage (and more math along the way) is vps.arachnoid.com/sage/learning_sage.html

__________________________________

Here is a kwiki :

Let:

G(x)=\int e^{x} \sin\left(x\right)\,dx.   No, I mean \displaystyle G(x)=\int e^{x} \sin\left(x\right)\,dx.

This software has two types of input cells.  The cell below (the empty box) is executable.   That means you can type in equations, functions, and commands to help you do math.  Part of doing math is writing about what you have done.

Lets get started.

The box below is an open executable cell.  Try typing some math as you might on the home screen of your graphing calculator.

See what happens.

In bold, I have typed what you should try in the execuable cell.  Feel free to make changes on my suggestions to see what happens.

2+3

2+2 
       

How about the first 200 digits of \pi?

N(pi,digits=200)

N(pi,digits=200) 
       

How about the kwiki problem?  Find \displaystyle G(x)=\int e^{x} \sin\left(x\right)\,dx

Try:

var('x')
g=exp(x)*sin(x)
G=integral(g)
print G

var('x') g=exp(x)*sin(x) G=integral(g) print G 
       

What about partial fractions?

But before I go, here is something that should make it easier to check answers for partial fractions.

How about partial fractions? Say break \frac{{\left(x - 3\right)}}{{\left(x - 1\right)} {\left(x + 1\right)}} into partial fractions.

Try:

x=var('x')
f=(x - 3)/((x +1)*(x-1))
f.partial_fraction()

x=var('x') f=(x - 3)/((x +1)*(x-1)) f.partial_fraction() 
       

Some Graphics

Consider \displaystyle I=\int_0^{\pi} \cos^2(x) \, dx from the perspective of a graph.

var('x')
P=plot(cos(x)^2,x,0,pi, color="blue", fill=True)
P=P+line([(0,1),(pi,1)], color="red")
P.show()

P is a symbol representing a graphics object that will be the blue graph. The third line of code tells Sage that we also want a red line in our graphics object. The fourth line tells Sage to show the graphics object we have described in the previous two lines.

var('x') P=plot(cos(x)^2,x,0,pi, color="blue", fill=True) P=P+line([(0,1),(pi,1)], color="red") P.show() 
       

We know that \sin^2(x) + cos^2(x) = 1.  What can you say about the value of the white area under the red line and above the blue area?  Try your hand at graphing sin^2(x).