Ngô Quốc Anh

December 2, 2009

MuPAD

Filed under: Linh Tinh — Tags: — Ngô Quốc Anh @ 22:21

MuPAD was a Computer algebra system (CAS). Originally developed by the MuPAD research group at the University of Paderborn, Germany, it was developed by the company SciFace Software GmbH & Co. KG in cooperation with the MuPAD research group and partners from some other universities since 1997.

I found MuPAD a very cool tool for plotting graph of functions. I will show you in details some examples.

1. We start with the following function

f(x,y)=-(x^2+y^2)(\cos (3y) + \sin (7y)).

To plot its graph, I use the following

f := plot::Function3d(exp(-x^2-y^2)*(cos(3*y)+sin(7*x)), x=-2..2, y=-2..2, Submesh=[1,1], FillColorFunction=((x, y, z) -> [(z+2)/4, 0.5, (2-z)/4])): plot(f)

and this is what we get

exp(-x^2-y^2)*(cos(3*y)+sin(7*x))

(more…)

R-G: A useful formula

Filed under: Riemannian geometry — Ngô Quốc Anh @ 3:40

I intend to give an explicit formula for the Laplacian of a function f. So far what we have done is to provide the following

\displaystyle \Delta f = {\rm div}(\nabla f)

without any further information. Note that, we may think the Laplacian is an operator. In this case, our Laplacian is often called the Laplace-Beltrami operator. In general, our Laplacian is noting but the Connection Laplacian. We also note that there are lots of Laplacian in the literature, for examples, Hodge Laplacian, Bochner Laplacian, Lichnerowicz Laplacian, Conformal Laplacian. But sooner or later we need the following linear algebraic identity

Theorem. Assume M is a symmetric non-singular matrix whose elements depend on a parameter x. Then

\displaystyle\frac{d}{{dx}}\det M = \det M \cdot {\rm Trace}\left( {{M^{ - 1}}\frac{d}{{dx}}M} \right).

Proof. This formula follows by simply diagonalising the matrix by a similarity transformation

\displaystyle D=SMS^{-1}

where D is the diagonal matrix. The formula is obviously true for a diagonal non-singular matrix. If D is a matrix with non-zero diagonal elements

\displaystyle D = \left( {\begin{array}{*{20}{c}} {{\lambda _1}} & {} & 0 \\ {} & \ddots & {} \\ 0 & {} & {{\lambda _n}} \\ \end{array} } \right)

we then have

\displaystyle \begin{gathered} \frac{d}{{dx}}\det D = \sum\limits_i {{\lambda _1} \cdots \frac{{d{\lambda _i}}}{{dx}}} \cdots {\lambda _n} \hfill \\\qquad = \det D \cdot \sum\limits_i {\frac{1}{{{\lambda _i}}}\frac{{d{\lambda _i}}}{{dx}}} \hfill \\ \qquad = \det D \cdot {\rm Trace}\left( {{D^{ - 1}}\frac{d}{{dx}}D} \right). \hfill \\ \end{gathered}

Now we know that the determinant is unchanged, \det D = \det M. And in the trace

\displaystyle\begin{gathered} {\rm Trace}\left( {{D^{ - 1}}\frac{d}{{dx}}D} \right) = {\rm Trace}\left( {S{M^{ - 1}}{S^{ - 1}}\frac{d}{{dx}}\left( {SM{S^{ - 1}}} \right)} \right) \hfill \\ \qquad ={\rm Trace}\left( {S{M^{ - 1}}{S^{ - 1}}\frac{{dS}}{{dx}}\left( {M{S^{ - 1}}} \right)} \right) + {\rm Trace}\left( {S{M^{ - 1}}\frac{{dM}}{{dx}}{S^{ - 1}}} \right) + {\rm Trace}\left( {S\frac{{d{S^{ - 1}}}}{{dx}}} \right). \hfill \\\end{gathered}

In the first term on the right-hand side we can bring the matrix MS^{-1} as the first factor inside the trace using the property of the trace {\rm Trace}(AB) = {\rm Trace}(BA). Then the first term becomes

\displaystyle {\rm Trace}\left( {{S^{ - 1}}\frac{{dS}}{{dx}}} \right) ={\rm Trace}\left( {\frac{{dS}}{{dx}}{S^{ - 1}}} \right)

which can be combined with the third term to give the trace of

\displaystyle \frac{{dS}}{{dx}}{S^{ - 1}} + S\frac{{d{S^{ - 1}}}}{{dx}} = \frac{{d\left( {S{S^{ - 1}}} \right)}}{{dx}} = 0.

The middle term becomes the required expression in the formula when the last factor is brought to the left as first.

Reference: Pankaj Sharan, Spacetime, Geometry and Gravitation (Progress in Mathematical Physics, 56), Birkhäuser 2009.

Create a free website or blog at WordPress.com.