+ All Categories
Home > Documents > HW1F11Solution

HW1F11Solution

Date post: 06-Apr-2018
Category:
Upload: vipin-nair
View: 222 times
Download: 0 times
Share this document with a friend

of 15

Transcript
  • 8/3/2019 HW1F11Solution

    1/15

  • 8/3/2019 HW1F11Solution

    2/15

    Problem 2

    Problem 2a

    Definition of the arrays

    This command creates a 3x3 matrix full of zeros. This is equivalent to the command DIMENSION in fortran, for

    example.

    delta = MatrixForm@Array@ - &, 83, 3

  • 8/3/2019 HW1F11Solution

    3/15

    epsilon@@1, 2, 3DD = 1;epsilon@@3, 1, 2DD = 1;epsilon@@2, 3, 1DD = 1;epsilon@@1, 3, 2DD = - 1;epsilon@@2, 1, 3DD = - 1;epsilon@@3, 2, 1DD = - 1;

    MatrixForm@epsilonD

    0

    0

    0

    0

    0

    1

    0

    -1

    0

    0

    0

    -1

    0

    0

    0

    1

    0

    0

    0

    1

    0

    -1

    0

    0

    0

    0

    0

    The following do loops will do the requested sum and put the result in the variable b

    b = 0.;

    Do@Do@

    Do@b = b + epsilon@@i, j, kDD * epsilon@@k, j, iDD,8k, 3

  • 8/3/2019 HW1F11Solution

    4/15

    MatrixForm@epsilonD

    0

    0

    0

    0

    0

    1

    0

    -1

    0

    0

    0

    -1

    0

    0

    0

    1

    0

    0

    0

    1

    0

    -1

    0

    0

    0

    0

    0

    The generic vector a will be defined directly in the next step

    a = 8a1, a2, a3

  • 8/3/2019 HW1F11Solution

    5/15

    MatrixForm@epsilonD

    0

    0

    0

    0

    0

    1

    0

    -1

    0

    0

    0

    -1

    0

    0

    0

    1

    0

    0

    0

    1

    0

    -1

    0

    0

    0

    0

    0

    This command creates a 3x3 matrix full of zeros

    delta = MatrixForm@Table@0, 8i, 3

  • 8/3/2019 HW1F11Solution

    6/15

    epsilon = MatrixForm@Table@0, 8i, 3

  • 8/3/2019 HW1F11Solution

    7/15

    e = 0;

    Do@Do@

    Do@Do@

    e = e + epsilon@@i, k, sDD * epsilon@@m, k, sDD * delta@@i, mDD,8s, 3

  • 8/3/2019 HW1F11Solution

    8/15

    Tr@SmD

    300.

    - 555.5550903965119` + - 19.67149390163511` + 875.2265842981469`

    300.

    The second invariant is the sum of the principal minors, and the equality proposed in the problem statement also holds.The code shown below will calculate the sum of all subdeterminants obtained by removing the row and column of the

    each of the diagonal components of the matrix

    Det@Table@Sm@@i, jDD, 8i, 2, 3

  • 8/3/2019 HW1F11Solution

    9/15

  • 8/3/2019 HW1F11Solution

    10/15

  • 8/3/2019 HW1F11Solution

    11/15

  • 8/3/2019 HW1F11Solution

    12/15

  • 8/3/2019 HW1F11Solution

    13/15

  • 8/3/2019 HW1F11Solution

    14/15

  • 8/3/2019 HW1F11Solution

    15/15