sol7 - CAAM 336 · DIFFERENTIAL EQUATIONS Problem Set 7 ·...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CAAM 336 · DIFFERENTIAL EQUATIONS Problem Set 7 · Solutions Posted Wednesday 6 October 2010. Due Wednesday 13 October 2010, 5pm. General advice: You may compute any integrals you encounter using symbolic mathematics tools such as WolframAlpha, Mathematica, or the Symbolic Math Toolbox in MATLAB. This problem set counts for 50 points, i.e., half the value of the earlier problem sets. The late policy will function as usual on this problem set. 1. [50 points: 20 points for (a); 10 points each for (b), (c), (d)] Use the finite element method to solve the differential equation- ( u ( x ) κ ( x )) = 2 x, < x < 1 for κ ( x ) = 1 + x 2 , subject to homogeneous Dirichlet boundary conditions, u (0) = u (1) = 0 , with the approximation space V N given by the piecewise linear hat functions that featured on the last problem set: For n ≥ 1, h = 1 / ( N + 1), and x k = kh for k = 0 ,...,N + 1, we have φ k ( x ) = ( x- x k- 1 ) /h, x ∈ [ x k- 1 ,x k ); ( x k +1- x ) /h, x ∈ [ x k ,x k +1 ); , otherwise . (a) Write MATLAB code that constructs the stiffness matrix K for a given value of N , with κ ( x ) = 1 + x 2 . [You may edit the fem_demo1.m code from the class website. You should compute all necessary integrals (by hand or using a symbolic package) so as to obtain clean formulas that depend on h and the index of the hat functions involved (e.g., a ( φ j ,φ j ) can depend on j ).] (b) Write MATLAB code that constructs the load vector...
View Full Document

This note was uploaded on 01/21/2012 for the course CAAM 330 taught by Professor Tompson during the Fall '09 term at UVA.

Page1 / 4

sol7 - CAAM 336 · DIFFERENTIAL EQUATIONS Problem Set 7 ·...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online