Sunday, March 28, 2010

Fourier with Maple

The inspiration for this came from someone who used Maxima to illustrate the concept of Fourier transform. I have ported that idea on maple and also cleaned up the code to make it more flexible. Here one can choose any function f(x) at the top and then executing the interpreted commands one can see the corresponding fourier transform. Also one can control the number of terms. At present it estimates between a period of -Pi to Pi

> f := proc (x)
> x^3-3*x^2+4; This is the function we are estimating
> end proc;

f := proc(x) x^3 - 3*x^2 + 4 end proc

> f(2)
> ;

0

> g := proc (x)
> f(x) * cos(k*x):
> end proc;

g := proc(x) f(x)*cos(k*x) end proc

> h := proc (x)
> f(x) * sin(k*x)
> end proc;

h := proc(x) f(x)*sin(k*x) end proc

> a := proc(k)
> 1/Pi*int(f(x) * cos(k*x),x=-Pi..Pi);
> end proc;

a := proc(k) 1/Pi*int(f(x)*cos(k*x), x = -Pi .. Pi) end proc

> b := proc(k)
> 1/Pi*int(f(x) * sin(k*x),x=-Pi..Pi);
> end proc;

b := proc(k) 1/Pi*int(f(x)*sin(k*x), x = -Pi .. Pi) end proc

> f2 := proc(x)
> a(0)/2+sum(a(k)*cos(k*x)+b(k)*sin(k*x),k=1..20);
> end proc;

f2 := proc(x)
1/2*a(0)
+ sum(a(k)*cos(k*x) + b(k)*sin(k*x), k = 1 .. 20)
end proc

> plot([f2(x),f(x)],x =-10..10, y = -100..100);

>



Sunday, March 21, 2010

My Math 113 Block Class

From Left Rebecca Reynolds, Brianna Morgan, Steve Carrie, Alecia Zinke, Kurtis, Jameela Logwood, Ashley Hironamus, Jessica Kelso, Malorie Glasco, Caleb Pennock, Joseph Childers, Sumant, Tyler Garretson, Georgio Sutton.

That was one awesome group of students. Who came pretty much to all classes and did very well.

Wednesday, March 17, 2010

Lunch with Tim

I caught up with Tim at Golden Corall.

Monday, March 08, 2010

if p then q

Site Meter