Sei sulla pagina 1di 3

CIVE 7397: COMPUTATIONAL MECHANICS

FALL 2014, UNIVERSITY OF HOUSTON


INSTRUCTOR: DR. K. B. NAKSHATRALA
Homework #1, Due date: 09/18/2014 (Thursday)
Mathematical preliminaries
Problem #1 (20 points) Testing your prerequisites
(i) Can a real (square) matrix have complex eigenvalues. If so, provide an example.
(ii) If the determinant of a matrix is positive, can we conclude that the matrix is positive
denite. If not provide a simple counterexample.
(iii) Find hessian for the function f(x, y) = x
2
+ 2xy + y
2
. For this case, is the hessian
positive denite, positive semidenite or indenite?
(iv) Provide a simple example of a matrix that is not diagonalizable.
(v) Is every invertible matrix diagonalizable?
(vi) Is every diagonalizable matrix invertible?
(vii) If A is an invertible matrix, show that A
T
A is a positive denite matrix.
(viii) Let A be a given matrix of size m n and b be a given vector of size m 1. Under
what (necessary and sucient) condition one can nd a vector x of size n1 such that
Ax = b. Under what (necessary and sucient) condition the solution will be unique.
(ix) Show the determinant of an orthogonal matrix is 1.
(x) Show that product of two orthogonal matrices is also orthogonal.
Problem #2 (10 points) Consider the scalar eld g(x) = (x x)
2
. Compute div [(div[g(x)])].
Problem #3 (10 points) Using the divergence theorem prove Greens rst and second
identities:

(u
2
v +u v) d =

n (uv) d

(u
2
v v
2
u) d =

n (uv vu) d
where u(x) and v(x) are scalar functions, and n is unit outward normal to boundary .
Problem #4 (10 points) Classify the following PDEs into linear or nonlinear. Also
indicate the order of the PDE.
1
(a) u
tt
u
xxxx
= 0 (Beam equation from structural dynamics)
(b) u
t
+ cuu
x
+ u
xxx
= 0 (KdV equation from uid mechanics)
(c) u
2
x
+ u
2
y
= c
2
(eikonal equation from optics)
(d)
2
u = 0 (Bi-harmonic equation from elasticity)
(e) iu
t
+ u = 0 (Schrodinger equation from Physics)
Problem #5 (10 points) For any sets A, B, and C, prove (not through Venn diagrams)
(i) A (B C) = (A B) (A C)
(ii) C (A B) = (C A) (C B)
Problem #6 (20 points) Given an array of n real numbers, implement an algorithm to
sort these numbers in ascending order. (You can use your favorite computer language.)
Denote the array of numbers by A. You need to check your implementation by sorting the
following array of numbers:
A = [99, 83, 22, 83, 22, 1, 3, 99, 1, 0]
Remark: You need to provide the complete algorithm. Answers like use Excel or built-in
commands like sort() are not acceptable. The format of the function should be as follows:
1 function [A] = mysort(A)
2 %
**********************************************************
;
3 % NAME ;
4 % mysort.m ;
5 % INPUT ;
6 % A: an array of (unsorted) real numbers ;
7 % OUTPUT ;
8 % A: sorted array ;
9 % COMMENT ;
10 % You should not use another temporary array. ;
11 % You may use temporary variable. ;
12 % WRITTEN BY ;
13 % YOUR NAME/S ;
14 % LAST MODIFICATION ;
15 % Date (mm/dd/yyyy) ;
16 %
**********************************************************
;
2
Problem #7 (20 points) Write a program for matrix multiplication. The input is two
matrices and the output need to be the product of the matrices. You need to have a check
on compatibility for matrix multiplication. The format of the function should be as follows:
1 function [C] = my matrix mult(A,B)
2 %
**********************************************************
;
3 % NAME ;
4 % my matrix mult.m ;
5 % INPUT ;
6 % A,B: Two matrices (provided by the user) ;
7 % OUTPUT ;
8 % C = A
*
B ;
9 % COMMENT ;
10 % You need to check for compability of matrices ;
11 % for multiplication ;
12 % WRITTEN BY ;
13 % YOUR NAME/S ;
14 % LAST MODIFICATION ;
15 % Date (mm/dd/yyyy) ;
16 %
**********************************************************
;
3

Potrebbero piacerti anche