ws03.mw

 >

Assignment

Worksheet 3

Problem 1.

In each part, you are given a symmetric matrix

• Find the characteristic polynomial of and the eigenvalues.

• Find a basis of each eigenspace of (You can use the "NullSpace" command).

• If necessary, use Gram-Schmidt to find an orthonormal basis of each eigenspace (You can use the "GramSchimdt" command).

• Find an orthogonal matrix so that is diagonal.

Part A.

 > A := Matrix(4, 4, {(1, 1) = 1, (1, 2) = 2/3, (1, 3) = -1/3, (1, 4) = 4/3, (2, 1) = 2/3, (2, 2) = 1/3, (2, 3) = 0, (2, 4) = -2/3, (3, 1) = -1/3, (3, 2) = 0, (3, 3) = 8/3, (3, 4) = -1/3, (4, 1) = 4/3, (4, 2) = -2/3, (4, 3) = -1/3, (4, 4) = 1});

 >

Part B.

 > A := Matrix(4, 4, {(1, 1) = 4/3, (1, 2) = 1/3, (1, 3) = 1/3, (1, 4) = 0, (2, 1) = 1/3, (2, 2) = 16/9, (2, 3) = -1/9, (2, 4) = 2/9, (3, 1) = 1/3, (3, 2) = -1/9, (3, 3) = 16/9, (3, 4) = -2/9, (4, 1) = 0, (4, 2) = 2/9, (4, 3) = -2/9, (4, 4) = 10/9});

 >

Part C.

 > A := Matrix(4, 4, {(1, 1) = 11/6, (1, 2) = 0, (1, 3) = 1/3, (1, 4) = -1/6, (2, 1) = 0, (2, 2) = 2, (2, 3) = 0, (2, 4) = 0, (3, 1) = 1/3, (3, 2) = 0, (3, 3) = 4/3, (3, 4) = 1/3, (4, 1) = -1/6, (4, 2) = 0, (4, 3) = 1/3, (4, 4) = 11/6})

 Warning, inserted missing semicolon at end of statement

 >

Instructions:

For the rest of this assignment you can use the commands "Eigenvalues" and "Eigenvectors" when you need to find eigenvalues and eigenvectors.

Problem 2.

In each part you are given a quadratic form in two variables.   In each part, use the discriminant () test to determine the signs of the eigenvalues.  Determine if the form is degenerate or nondegenerate.  Is it postive definite, postive semi-definite, indefinite, negative semi-definite or negative definite?  Check your result by computing eigenvalues.

Part A.

 > q := (14/5)*x^2-(4/5)*x*y+(11/5)*y^2;

 >

Part B.

 > q := (8/5)*x^2-(8/5)*x*y+(2/5)*y^2;

 >

Part C.

 > q:= -(11/5)*x^2+(4/5)*x*y-(14/5)*y^2;

 >

Part D.

 > q := -(29/17)*x^2+(40/17)*x*y+(46/17)*y^2;

 >

Problem 3.

In each part, describe the shape of the graph of the given equation.  Check that you're right by using the "implicitplot" command.

(The command "completesquare" may be useful).

Part A.

 > x^2+3*x*y-5*y^2+y+x-3 =0;

 >

Part B.

 > x^2-2*x*y+3*y^2+x-2*y+5 = 0;

 >

Part C.

 > -(3/2)*x^2+3*x*y-(3/2)*y^2+y+x-1 =0;

 >

Part D.

 > -(3/2)*x^2+9*x-23/2+3*x*y-9*y-(3/2)*y^2 =0;

 >

Problem 4.

Consider the quadratic form in 4 variables given below.  Diagonalize this form, i.e., find a change of coordinates where is an orthongonal matrix, so that the expression for in the -coordinates is a linear combination of squares.

 > q := (1/6)*x[1]^2+(4/3)*x[1]*x[2]-2*x[1]*x[3]+(1/3)*x[1]*x[4]-(1/3)*x[2]^2+(4/3)*x[2]*x[4]+x[3]^2+2*x[3]*x[4]+(1/6)*x[4]^2;

 >

Instructions and Examples.

Here is an procedure to compute the hessian matrix of a function.  You can use it anywhere below.

 > Hessian := proc(f, varList)

 > Matrix(nops(varList), nops(varList), (i,j)-> diff(f, varList[i], varList[j]));

 > end;

 > f :='f';

 > Hessian(f(x,y), [x,y]);

 > Hessian(f(x,y,z), [x,y,z]);

 > Hessian(x^2*y*z+z^3+y*x*z^2, [x,y,z]);

 >

A nice maple command to find the solutions of a system of polynomial equations is the command "Isolate".   For example, let's find the critical points of the following function.

 > f := x^2*y+y^2+x^3+x^2-y^3-2*x+5*y;

 > fx := diff(f,x);

 > fy := diff(f,y);

 > solve({fx=0, fy=0}, {x,y});

 >

Not so nice.  Try "Isolate" to get numerical approximations.

 > with(RootFinding):

 > critpoints := Isolate({fx,fy}, [x,y]);

 >

Let's check the first one.

 > subs(critpoints[1], fx);

 > subs(critpoints[1], fy);

Pretty close.  We could tell maple to use more accuracy if we needed it.

Let's evaluate the hessian at the first critical point.

 > H := Hessian(f, [x,y]);

 > H1:=subs(critpoints[1], H);

 >

Problem 5.

In each part, find the critical points of the function.  Classify each critical point as a local max, local min, saddle point, or degenerate critical point.

Part A.

 > f := x^3/3 +x*y+y^2-5*x -1;

 >

Part B.

 > f := x^3+3*x*y+2*x^2+x*y^2-x+y+1;

 >

Part C.

 > f := z^4+x^2*y^2+4*y^2*z^2+x^4-10*y^2*x+y*x+x+y+z;

 >

Part D.

For one of the functions in Part A or Part B, try to plot graphs of the function near the critical points to illustrate the behaviour you found.

It may help to translate the coordinates so the critical point is at the origin.