CAAM 6 DIFFERENTIAL EQUATIONS IN SCI AND ENG Examination Instructions: Time limit: uninterrupted hours There are four questions worth a total of 5 points Please do not look at the questions until you begin the exam Please answer the questions throughly (but succinctly!) and justify all your answers Show your work for partial credit 4 Print your name on the line below: 5 Indicate that this is your own individual effort in compliance with the instructions above and the honor system by writing out in full and signing the traditional pledge on the lines below 6 Staple this page to the front of your exam
CAAM 6 DIFFERENTIAL EQUATIONS [5 points Consider the steady-state heat equation κ xx u = f () on interval [, L We have approximated solutions to this problem with various boundary conditions using finite difference method In particular, we approximated the xx at a mesh point x i via the central difference formula given by where h = x j x j± is the uniform mesh size [ xx u (x i ) u(x i + ) u(x i ) + u(x i ) h () (a) [6 points Use Taylor Series arguments to show that the central difference approximation (above) is a second order approximation of the second derivative at each mesh point x i (, L) (b) [6 points Consider the steady state heat equation () with homogeneous Neumann boundary conditions x u() = x u(l) = What is the null space of xx in CN [, L? (Note: elements of C N [, L are functions in C [, L satisfying the homogeneous Neumann boundary conditions) (c) [ points Suppose {x, x, x N+ } is a uniform mesh of the interval [, L Using a first order forward and backward finite difference to account for the Neumann conditions x u() = and x u(l) =, and the second order central finite difference () at each internal mesh point leads to a matrix problem of the form of the form κ Ax = F where h A is the matrix Do you expect A to be invertible? Why or why not? Solution (a) Let h = x i+ x i = x i x i This means x i+ = x i + h and x i = x i h Using Taylor s series to expand u(x i ± h) about x i, we find u(x i ± h) = u(x i ) ± hu (x i ) + h! u (x i ) ± h! u() (x i ) + h4 4! u(4) (x i ) ± Adding these two series together gives the following expression u(x i + h) + u(x i h) = u(x i ) + h u (x i ) + h4 (4) (x i ) + u
CAAM 6 DIFFERENTIAL EQUATIONS Now solving for u (x i ) gives u (x i ) = u(x i + h) + u(x i h) u(x i ) h h (4) (x i ) + u The first fraction is the centered difference approximation The h (4) u (xi ) is the leading term of truncation error Since this involves an h -term, the approximation is second order (b) Our goal find the null space of the steady state heat problem with Neumann boundary conditions First we will find the the null space of the k xx In other words, we need to find u such that k xx u = Integrating this expression twice, we find u(x) = ax + b To find the null space with respect to the Neumann boundary conditions, we identify what values of a and b boundary conditions are satisfied Note x u(x) = a Thus x u() = x u(l) = = a Thus the null space is the set of functions u(x) = b where b is any constant (c) We expect the discretize problem to preserve any uniqueness (or lack there) of the continuous problem Since the Neumann boundary problem does not have a trivial null space, the solution is not unique This means we do not expect a unique solution to the linear system The solution to a linear system is not unique if the matrix is not invertible but the right hand side b is in the range of the operator
CAAM 6 DIFFERENTIAL EQUATIONS [ points For this problem suppose A is a symmetric matrix (a) [8 points Let λ = 4, λ =, and λ = 7 be the eigenvalues of A with corresponding eigenvectors v =, v =, v = (ie v j is the eigenvector for eigenvalue λ j ) i Show that {v, v, v } is an orthonormal basis of R ii Using the spectral method, solve Ax = b where b is the vector b = 5 (b) [ points Let A be an n n symmetric matrix Suppose it is known that that all of the eigenvalues of A are contained in the closed interval [, 8 Prove that A is an invertible matrix Solution (a) (i) We need to show things The vectors {v, v, v } () are orthogonal, () have unit length, and () form a basis for R We know the following definitions: Two vectors u and v are orthogonal if (v, u) = The length of a vector u is u = (u, u) A collection of n vectors is a basis for an n dimensional space if they are orthogonal First we will prove () (v, v ) = + + = = (v, v ) (v, v ) = ( ) + + ( ) = = (v, v ) (v, v ) = + + = = (v, v ) Now we will verify the vectors have unit length part () v = (v, v ) = ( ) + + ( ) = 4 + 4 = v = (v, v ) = + + = v = (v, v ) = ( ) + + ( ) = 4 + 4 = Finally, since the dimension of R is and we have orthogonal vectors in that space they form a basis for R
CAAM 6 DIFFERENTIAL EQUATIONS (ii) Since we know that the vectors {v, v, v } are basis for R, any vector in R can be written as a linear combination of these vectors Hence, we seek the coefficents x i for i =,, of x = x v + x v + x such that Ax = b In order to exploit the orthogonality of the basis, we first write b in the basis In other words we need to find b i for i =,, such that b = b v + b v + b v Taking the inner product of the last expression with respect to v j for j =,, and using the fact that the vectors have unit length we find b j = (b, v j ) for j =,, Specifically b = (b, v ) = ( ) + + 5 ( ) = + = 5 b = (b, v ) = () + + 5 () = b = (b, v ) = ( ) + + 5 ( ) = + = 5 + Applying the matrix A to the x in terms of the eigenbasis, results in Ax = x λ v + x λ v + x λ v Rewritting the equation Ax = b in terms of the eigenbasis reads Ax = x λ v + x λ v + x λ v = b v + b v + b v Taking the inner product with v j j =,,, we find x j = b j λ j In other words, x = b λ = 5 4, x = and x = 5+ 7 (b) We know that A is a symmetric matrix This means that the eigenvectors of A form an orthogonal basis for R n We want to show that A is invertible It is equivalent to show that the null space of A trival Let {v,, v n } denote the orthogonal basis of eigenvectors Then any x R n can be written as a linear combination of the v j vectors, ie x = α v + + α n v n Let x be in the null space of A Our goal is show that the coefficients α j are zero for all j Since x is in the null space of A, Ax = This means Ax = α λ v + + α n λ n v n = Take the inner product of this expression with respect to v j for j =,, n to find α j λ j (v j, v j ) = Since λ j [/, 8 and (v j, v j ), α j = Thus the null space of A is the zero vector and the matrix is invertible 4
CAAM 6 DIFFERENTIAL EQUATIONS [ points Recall that for a vector space V the projection of f V onto g V is defined as (f, g) (g, g) g (a) [6 points Let V = C[, and let v = 4, v = x + 8, v = x Consider the L -inner product on V given by fg dx Find an orthonormal set of vectors {w, w } such that W = span{w, w } = span{v, v, v } (b) [4 points Show that an orthogonal set of vectors {u, u,, u N } in an inner product space (V, (, ) V ) is a linearly independent set Solution (a) First note that the vectors are not linearly independent Specifically, v = (v + v ) Thus we need only find two orthogonal vectors to cover the span of the original We begin the Gram-Schmidt process by choosing our first vector w = v / v Note v = 4 Thus w = The next vector in the will be v projected away from w ie p = v (v, w ) (w, w ) w where (v, w ) = xdx = x = (9 4) = 5 and (w, w ) = by construction So p = x + 5 ( ) = x 5 Now we need to normalize p Thus w = (x 5 ) p = (p, p ) = (x 5 ) dx = (b) We want to show that the orthogonal vectors {v,, v n } are linearly independent We know two vectors u, and v are orthogonal in the vector space V if (v, u) V = A set of vectors {u,, u n } are linearly independent if no vector u j can be written a linear combination of the other vectors In other words, n j= α ju j = implies α j = for all j Consider the following equation n α j v j = j= Take the inner product of this expression with v l to get the following expression n n ( α j v j, v l ) = α j (v j, v l ) = (, v l ) j= Since (v j, v l ) = for j l, the expression can be simplified to j= α l (v l, v l ) = Since v l, the only way this can be true is if α l = This proof of α l = holds for l =,, n Thus the vectors are linearly independent 5
CAAM 6 DIFFERENTIAL EQUATIONS 4 [5 points Consider the vector space of polynomials of degree less than or equal to five on the interval [,, ie V = P 5 ([, ) with L -inner product (f, g) = fg dx Let w = x and w = x and define W = span{w, w } (a) [ points Prove that W is a vector subspace of V (b) [ points Compute the best approximation, m(x) W to the cubic polynomial h(x) = x with respect to the L inner product (defined above) In other words, find the coefficients α, and α of m(x) = α w + α w such that h m h u for all u W Recall the coefficients are solutions to Gα = b where G is the Gram matrix: [ (w, w G = ) (w, w ) (w, w ) (w, w ) and b = [ (h, w ) (h, w ) Your answer to this problem should be the function m(x) You may use the fact that: [ [ a b d b = c d ad bc c a (c) [ points What is the L error in the approximation? Solution (a) Check two properties of the subspace: (a) For any v, v W, v + v W Let v = α w + α w = α x + α x and v = β x + β x, then (b) For any α R and v W, αv W Let v = β w + β w, then v + v = (α + β )x + (α + β )x W αv = (αβ )w + (αβ )w W (b) First, compute the Gram matrix G as indicated in instructions: [ (w, w G = ) (w, w ) x 4 dx x dx [ = (w, w ) (w, w ) x = 5 dx x dx 4 Next, compute the right-hand side vector b: [ (h, w ) b = = (h, w ) 6 x 5 dx x 4 dx = [ 6 5 4
CAAM 6 DIFFERENTIAL EQUATIONS The vector of coefficients α is a solution to Gα = b Invert G to obtain G = [ 4 4 4 5 Then compute α (c) The L -error is α = G b = [ 8 4 6 x m(x) L = ( x m(x), x m(x) ) ( / = (x m(x)) dx) 7