{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

HW1_Solutions

# HW1_Solutions - MAE 107 Computational Methods Summer...

This preview shows pages 1–3. Sign up to view the full content.

MAE 107 – Computational Methods Summer Session II 2009 Homework # 1 due on Wednesday, August 12 in class 4 problems – 20 points Guidelines : Please turn in a neat homework that gives all the formulae that you have used and all the necessary information for the grader to understand your solution. Also, if the problem requires you to write a MATLAB code, please turn in, along with the written explanation of your solution, (i) a copy of the code you used, carefully documented with comments and using proper indentation, and (ii) the requested ouputs and graphs. Problem 1 – 4 points 1. Compute manually the eigenvalues of the matrix A = 0 1 1 2 1 2 1 1 2 . (Remember that λ is an eigen- value of A if | A λ I | = 0 with I the identity matrix – Hint: one of the eigenvalue is equal to 1). For each of the eigenvalues compute an associated eigenvector. Solution: We first find the eigenvalues 0 = | A λ I | = vextendsingle vextendsingle vextendsingle vextendsingle vextendsingle vextendsingle λ 1 1 2 1 λ 2 1 1 2 λ vextendsingle vextendsingle vextendsingle vextendsingle vextendsingle vextendsingle = ( λ ) bracketleftbig 3 λ + λ 2 bracketrightbig + 2 [ λ 3 ]+[ 3 λ ] = λ 3 + 3 λ 2 + λ 3 Which is the same as 0 = λ 3 3 λ 2 λ + 3 = ( λ + 1 )( λ 1 )( λ 3 ) λ = 1 , 1 , 3 We can now find associated eigenvectors λ = 1 : A x = x λ y z = x 2 x + y 2 z = y x y + 2 z = z x y z = 0 2 x + 2 y 2 z = 0 x y + 3 z = 0 x = 1 y = 1 z = 0 x = 1 1 0 λ = 1 : A x = x λ y z = x 2 x + y 2 z = y x y + 2 z = z x y z = 0 2 x 2 z = 0 x y + z = 0 x = 1 y = 0 z = 1 x = 1 0 1 λ = 3 : A x = x λ y z = 3 x 2 x + y 2 z = 3 y x y + 2 z = 3 z 3 x y z = 0 2 x 2 y 2 z = 0 x y z = 0 x = 0 y = 1 z = 1 x = 0 1 1 1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2. In MATLAB, write a short script file that defines the matrix A as a 3 × 3 array and computes the eigenvalues and eigenvectors of A using the eig function of MATLAB. Compare with your response to the previous question (remember that if x is an eigenvector, then α x is also an eigenvector for any α negationslash = 0). Solution: Note that MATLAB code will be identified with the font: MATLAB code will have this font! % Eigenvalue/vector script for MAE 107 HW problem 1.2 A = [0 -1 -1 ; -2 1 -2 ; 1 -1 2] [V,D]=eig(A) Witht the output A = 0 -1 -1 -2 1 -2 1 -1 2 V = -0.0000 -0.7071 -0.7071 -0.7071 -0.7071 0 0.7071 0.0000 0.7071 D = 3.0000 0 0 0 -1.0000 0 0 0 1.0000 We note here that eigenvectors are not unique, hence the difference between the columns of the MATLAB solution and the analytic solutions found above. It is, however, important to note that the eigenvector x satisfies the equation A x = λ x where x negationslash = 0 which holds true for the analytic and numerical soltuions.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}