Exercises from Homework #2 solved using Mathematica

Exercise 3.4

Let's first define the vectors v and w as follows:

v  =  {v1,  v2,  v3}

w  =  {w1,  w2,  w3}

The left hand side of Lagrange's Identity is equal to (and call the result LHS):

LHS  =  Cross[v, w]  .  Cross[v, w]

On the other hand, the right hand side is equal to the following:

RHS  =  
      ( v  .  v ) (w  .  w)  -  (v  .  w)^2

Now take the difference of the left hand side and the right hand side as follows (Notice that %4 means the fourth line of output above and %5 denotes the fifty line of output):

LHS  -  RHS

We want this difference to vanish. Just expand out all of the parentheses in the last line via:

Expand[%]

And we're done!

Exercise 3.6

Lets compute:

v  .  Cross[v, w]

Expand[%]

Similarly, calculate:

w  .  Cross[v, w]

Expand[%]

...and we're done.

Exercise 3.8

Let's first define the curve beta[s] as follows:

beta[s_]  := 
       {(1 + s)^(3/2)/3, (1 - s)^(3/2)/3, s/Sqrt[2]}

We could go ahead and input the Frenet frames package and use that but to illustrate how to manipulate expressions in Mathematica, let's do this exercise by hand.

The velocity vector is:

beta'[s]

The speed is then:

Sqrt[ beta'[s]  .  beta'[s]]

Simplify[%]

beta is therefore a unit speed curve.  The curvature is then given by:

Sqrt[beta''[s]  .  beta''[s]]

Simplify[%]

Let's denote the curvature by FK:

FK  =  %

The normal vector N is precisely:

beta''[s]/FK

PowerExpand[%]

Simplify[%]

The expression failed to simplify completely. You can try the following:

FullSimplify[%]

which is N as stated in equation (3).

Let's denote the normal vector by FN since the symbol N is already assigned a meaning by Mathematica.

FN  =  %

The binormal vector B is given by T x N which is:

FB  =  Cross[beta'[s], FN]

Finally, let's compute the torsion using the definition:

-FN  .  D[FB, s]

Simplify[%]

This is the torsion and it equals the curvature since

%  -  FK

PowerExpand[%]

Exercise 3.15

Consider the helix defined by

beta[s_]  := 
       {a Cos[s]/Sqrt[a^2 + b^2],  a Sin[s]/Sqrt[a^2 + b^2],  
        b s/Sqrt[a^2 + b^2]}

Let's use the Frenet frames package here. First, input the package:

<< frenet.m

Then use the function Torsion which computes the torsion of a curve:

Torsion[beta, s]

Exercise 3.20:

alpha[t_]  := 
       {a Cos[t],  a Sin[t],  
        Sqrt[4  a^2  -  (a Cos[t] + a)^2  -  (a Sin[t])^2]}

Norm[alpha'[t]]

Simplify[%]

PowerExpand[%]

This is not a unit speed curve. However, it has curvature given by:

Curvature[alpha, t]

PowerExpand[%]

Let's call the result K:

It has torsion given by:

Torsion[alpha, t]

PowerExpand[%]

Let's now compute the following quantity:

1/Curvature[alpha, t]^2  +  
      (1/Torsion[alpha, t] D[1/Curvature[alpha, t], t] 
            1/Norm[alpha'[t]])^2

Simplify[%]