Homework 4 Individual

Problem I4-1
Kreyszig 7.5, Problem 20, Page 397

Clear["Global `*"]

TheFunction = 
        4 x1^2  +  12 x1 x2  + 13 x2^2 - 16;

To see what this looks like, load "ImplicitPlot".

<< Graphics`ImplicitPlot`

ImplicitPlot[TheFunction == 0,  {x1, -4, 4}];

Note that the shape is an ellipse, so the answer should be of the form:
				((x1^2)/(a^2))+ ((x2^2)/(b^2))= 1
where a, b are the lengths of the semi-major and semi-minor axes, which will lie along principle axes.
See Example 6, p. 396, Kreyszig for more description of the following method.

x = Transpose[{{x1, x2}}];
A = {{4, 6}, {6, 13}};
Q = Transpose[x] . A . x

Eisys  =  Eigensystem[A];
Eisys // MatrixForm

The eigenvalues represent the coefficients of a new equation in a new coordinate system (y1, y2): 16  (y1^2)+ (y2^2).  We have now successfully transformed the left side of the equation.  Remember the left hand side is 16.  So we can divide out the coefficients on the left hand side, and then we'll get:

NewFunction  =  (Eisys[[1, 1]]) (y1^2) + (Eisys[[1, 
                2]] ) (y2^2)

ImplicitPlot[
        NewFunction == 16,  {y1,  -2, 2}];

It's clear that we've rotated the ellipse to its principle axes.  Now let's find out how these principle axes differ (in angle) from our original coordinate system.  Using the dot product, we dot an eigenvector (divided by its norm) with a unit vector representing the original x1-axis.  The angle of separation between two vectors can be described as the ArcCos of their dot product.

Eivec  =  { Eisys[[2, 1]],  
        Eisys[[2, 2]]}
EivecNorm  =  
      Eivec[[1]]/Norm[Eivec[[1]]]
AngleofRotation  =  ArcCos[EivecNorm . {1, 0}]

We'll solve the ArcCos expression and convert from radians to degrees.

N[%] 180/Pi

So the principal axis of the ellipse is at an angle of 63 degrees from the x1-axis.  To find a vector that can be transformed from the principle axis coordinates (y1, y2) to the original axis coordinates (x1, x2), we can create a function.

NewxVec[Oldx1_, Oldx2_] := 
      Transpose[Eigenvectors[A]] . {Oldx1, Oldx2}

NewxVec[1, 0]

The y1 axis was transformed properly into the eigenvector of our matrix A.

Problem I4-2 
Computer Guide, Problem 7.7, Page 86

Clear[A];
A = {{4 + 12  I, -12 - 12  I, 
            12 - 12  I}, {-6 + 6  I, 
            10 - 6  I, 
            6 + 6  I}, {6 + 6  I, -6 + 
              6  I,  -2 - 
              6  I}};
A // MatrixForm

Temp  =  Conjugate[Transpose[A]];
Temp // MatrixForm

AHerm  =  (A + Temp)/2;
AHerm // MatrixForm

ASkew  =  (A - Temp)/2;
ASkew // MatrixForm

Check that AHerm and ASkew sum to A.

AHerm + ASkew == A

Check that AHerm is truly Hermitian and that ASkew is truly skew-Hermitian.

AHerm - Conjugate[Transpose[AHerm]]
ASkew + Conjugate[Transpose[ASkew]]

Eigensystem[A] // MatrixForm

Problem I4-3 
Computer Guide, Problem 7.12, Page 87

Clear[A];
A = {{5, 4}, {1, 2}};
A // MatrixForm

EvalA  =  Eigenvalues[A]

EvecA  =  Eigenvectors[A];
X  =  Transpose[EvecA];
X // MatrixForm

Now we find out whether the diagonal matrix will have the eigenvalues of A as its diagonal values.

Diagonal = Inverse[X] . A . X;
Diagonal // MatrixForm

Problem I-4 
Kreyszig 8.3, Problem 36, Page 422

a = {4, 2, 9};
b = {3, 2, 1};
c = {-4, 6, 9};
a . Cross[b, c]

Because their scalar triple product is not 0, the three vectors are  linearly independent.

Problem I4-5
Computer Guide Problem. 8.25, Page 97

<< Calculus`VectorAnalysis`

SetCoordinates[Cylindrical[r, θ, z]];

Make up a crazy-go-nuts vector-valued function.

A  =  (((r  Cos[θ]))^2) +  (((r Sin[θ]))^(1/18)) +   z (r^(-14)) {r Cos[θ], 
              r Sin[θ], z} ;

Use the Mathematica Div[ ], Curl [ ], and Grad [ ] functions appropriately.

Div[Curl[A]]

Curl[Grad[A[r, θ, z]]]

When a vector function can be calculated as the gradient of a scalar field, we call that scalar field a potential function.  This has physical significance in many engineering applications, most notably thermodynamics (internal energy, entropy, enthalpy) and in electricity/magnetism (electric/magnetic potentials).  The divergence of a function is often used to describe a flux.  The curl is often used to describe rotation.
The first statement seems physically acceptable because it states that the divergence (describes a flux) of a curl (describes a rotation) is 0. 
As for the second statement, since the curl describes the rotation of a vector field,  the gradient of a scalar field must be irrotational.