Homework 2 Exercise 1

advertisement
Numerical Methods for PDEs
MATH 610 - 600
Alan Demlow
Homework 2
Spring 2015
Homework 2
Exercise 1
100%
Consider the following two-point b.v.p. :
− u00 + u = 1, for x ∈ (0, 1), u0 (0) = β0 , u0 (1) + u(1) = β1 ,
(1)
where β0 and β1 are given constants.
In the interval (0, 1) introduce the uniform grid xj = jh, h = 1/n, j = 0, . . . , n. Further, consider
the space Vh of piece-wise quadratic functions on the grid (xj , xj+1 ), j = 0, . . . , n − 1.
1. (20 pts) Give the variational formulation of this problem. Your solution should include a
description of the space V over which the variational problem is posed.
2. (20 pts) For degrees of freedom use the following functionals
Z
1 xj+1
vdx, j = 0, . . . , n − 1,
v(xj ), j = 0, . . . , n, and
h xj
i.e. the function values at the grid points xj and the mean values of v over (xj , xj+1 ). Give
the formulas for the corresponding basis function over all intervals (xj , xj+1 ), i.e. find φji ,
i = 1, 2, 3, j = 0, . . . , n − 1 such that φji are quadratics over (xj , xj+1 ) and satisfy
Rx
• φj1 (xj ) = 1, φj1 (xj+1 ) = 0, h1 xjj+1 φj1 dx = 0 for j = 0, . . . , n − 1 ;
Rx
• φj3 (xj ) = 0, φj3 (xj+1 ) = 1, h1 xjj+1 φj3 dx = 0 for j = 0, . . . , n − 1 ;
Rx
• φj2 (xj ) = 0, φj2 (xj+1 ) = 0, h1 xjj+1 φj2 dx = 1 for j = 0, . . . , n − 1.
3. (20 pts) Compute the element “stiffness” and “mass” matrices corresponding to the basis
defined in (3).
4. (20 pts) Assemble the global “stiffness” and “mass” matrices for the above problem.
5. (20 pts) Compute the right hand side of the Ritz system. Then compute the global ”stiffness”
and “mass” matrices for a problem where the above boundary condition at x = 0 is replaced
by the Dirichlet condition u(0) = 0 and write the Ritz system for this problem.
6. (BONUS 20 pts) Estimate the condition number of the global matrix of the Ritz system for
the above problem (1).
Download