Education

Teaching and learning about math, Maple and MapleSim

But note the mouse-over caption! See www.xkcd.com for todays (June 11, 2008) strip. This will be printed and posted at the door that seperates the Physics Dept. from the Math Dept. at most institutions.

Tim

I recently submitted my work to Maple Application Center and I received a bug report from a staff. Then, I resubmitted it after fixing bugs. However, I have a bug report again (^_^; Yes, this is because my work was poor, but in other words, all applications in Maple Application center that passed strict check by staff are all guaranteed to have good quality. I am sure that everyone can find good tools for education and research. We should utilize them. If we can not find applications that we want, let us develop works and submit them ! Yasuyuki Nakamura

For a bit of light relief, head on over to the online comic strip at phdcomics.com.  If you've ever been a PhD student, be careful, this strip might make the nightmares come back...

I run Maple on a Wintel machine, specifically a Dell Dimension 9100 Mini-Tower: Pentium D Processor 820 with Dual Core Technology (2.80GHz, 800FSB) Microsoft Windows XP Media Center 2005.  I also recently acquired an OLPC.  I don't think that the OLPC will be much of a Maple platform in the near future but it does run Linux.

No, the title does not come from hornybitches.com, nor does it mean something related to sex.

Special Relativity has been around for ~100 years, General Relativity for ~90 years.  I'm hoping that with the assistance of Maple and Mapleprimes I may be able to do some tensor calculus to better understand Einstein.  Perhaps the twin paradox is within my reach.  Perhaps even the orbit of Mercury.

Of all the ways to decompose a numerical (floating point) matrix, my favorite is the singular value decomposition (SVD).  There are a lot of applications of the SVD (see my dissertation for one related to polynomial algebra) but my favorite ones are probably two applications related to image processing.

The first one I want to talk about comes from the cover of James Demmel's book "Applied Numerical Linear Algebra": image compression.  This example gives a really cool intuitive understanding of the Rank of Matrix and is also nice excuse to play with Maple's ImageTools package.

So, the first thing you need a test image. I used the classic image compression benchmark of a Mandrill.



Read this in with:


mandrill:=ImageTools:-Read("4.2.03.tiff");


The result is a 512x512x3 array.  In order to do something with this, we need to make it into a matrix so, call


manmat:=convert(ArrayTools:-Reshape(mandrill, 512*3, 512), Matrix);


Now we can compute a singular value decomposition of the image:


(U, S, V) := LinearAlgebra:-SingularValues(manmat, output = ['U', 'S', 'Vt']);

Now we can zero-out small singular values and multiply things back together to create low-rank approximations of the matrix that are also compressed versions of the image.
Rank 32 will give us 1/8 of the data (64 dimension 512 vectors: 32 rows of U, 32 columns of V, and the 32 corresponding singular values) but still a pretty good image:


rank32approx:=MatrixMatrixMultiply(`.`(U, DiagonalMatrix(S[1..32], 3*512, 512)), V, outputoptions = [order = C_order]);


This reshape it back to an image and display:


Preview((Reshape(rank32approx, 512, 512, 3)));


Taking things down to rank 8, is leaving only 1/32 of the data, but it is amazing how what is left resembles the original image:


rank8approx:=MatrixMatrixMultiply(`.`(U, DiagonalMatrix(S[1..8], 3*512, 512)), V, outputoptions = [order = C_order]);
Preview((Reshape(rank8approx, 512, 512, 3)));


To look at more images in order of descending rank, take a look at my worksheet:
Download 5480_SVD-face-colour-improved.mw
View file details

Next time: eigenfaces

A colleague showed this to me earlier this afternoon. I can explain, and accept, most of Maple's responses. I do have one case where I believe Maple could do better.

This arose during the creation of some Maple materials to support the derivation of the Integral Test for series convergence. Consider:

restart;
I1 := Int( 1/x^p, x=1..infinity );
                                /infinity      
                               |          1    
                               |          -- dx
                               |           p   
                              /1          x    

I would like Maple to assist me with the following definite double integral:

int(int(x/(x^2+y^2+z^2)^(3/2), y = -b .. b), z = c .. a+c)

so far, I have failed.  Can anybody help?

Here is my worksheet:

View 4937_Page92.mw on MapleNet or Download 4937_Page92.mw
View file details

Why is the following function such a problem to differentiate?

A := 1/(8*cos(`θ`)*(sin(`θ`))(sin(`θ`)+cos(`θ`))^2)

Here is a worksheet:

View 4937_page84.mw on MapleNet or Download 4937_page84.mw
View file details

I've made up a worksheet of the Top Ten Maple Errors, containing some of the common mistakes I often see newcomers to Maple commit (especially in the setting of my Introduction to Mathematical Computing class). I hope you will find it useful in trying to avoid those mistakes. Of course this is only a personal list, and not exhaustive. Please feel free to argue the merits of other items that should be included in the list. Here is the link: Download 4541_topten.mw

For the past decade Doug Meade, at the University of South Carolina, has created and maintained a two-page document with essential Maple commands. The first version was created for Maple V, Release 4, in January 1998. n update has been created for each version of Maple (except Maple 10) as it was released. The document has become pretty stable - hence the omission for Maple 10. Here are links to the complete set of documents he has created

Comments, corrections, and suggestions for improvement are welcomed. Please contact the author by e-mail.

The recipe is quite simple to understand looking at an example (and it is understood best by having paper and pencil to follow it): f:= x -> x^2 the parabola with its inverse g:= y -> sqrt(y). Say you want the integral of g over 0 ... 2, which (here) is the area between the graph and its horizontal axis. That is the same as the area of the rectangle minus the area between the graph of g and the vertical axis, where the rectangle has corners 0, 2 and g(0)= f^(-1)(0) and g(2)= f^(-1)(2). Now recall the geometric interpretation of the compositional inverse of a function: it is reflection at the diagonal.
To those who are interested: New version of FourierTrigSeries package was released. This release fixes a bug in ExploreFourierSeriesCoefficients procedure. FourierTrigSeries package provides new data structure for the representation of trigonometric series and also several procedures to manipulate with trigonometric series and to compute Fourier series. Visit the homepage and see some examples. Try also the online Fourier series calculator.
First 48 49 50 51 52 53 54 Page 50 of 55