Home Page > > Details

Final Project – Math 104B

 Final Project – Math 104B, Spring 20201

Instructor: Carlos J. García Cervera
1. (30 points) Consider the following partial differential equation for u on the square
1All course materials (class lectures and discussions, handouts, homework assignments, examinations, web
materials, etc) and the intellectual content of the course itself are protected by United States Federal Copyright
Law, and the California Civil Code. The UC Policy 102.23 expressly prohibits students (and all other persons)
from recording lectures or discussions and from distributing or selling lecture notes and all other course
materials without the prior written permission of the instructor.
(a). (5 points) Construct the function f(x, y) so that u(x, y) = sin(16πx(1 1
x)y(1 1 y)) solves the equation (see Figure 1).
Figure 1: Solution to equation (1).
(b). (25 points) Solve system (7) using the Conjugate Gradient Method. Set the
tolerance to 10䛈 8
, and use n = 10, 20, 40, 80, 160, 320. Plot the timings and
the number of iterations, and determine the scaling of each in terms of n. Verify
numerically that the approximation is second order accurate.
Implementaion Tips:
(a). for a simple implementation you can define the solution u (and all arrays in the
Conjugate Gradient Method) as two-dimensional arrays, just like it is defined
in (7).
Figure 2: Indexing of the nodes in the two-dimensional grid.
(b). Do not construct the full matrix associated to system (7). Instead, there are
other things you can do, for example you can define the matrix using sparse
linear algebra, or simply define a function to evaluate the matrix/vector product
directly:
2. (30 points) A physical quantity P is known to depend on the temperature T. The
file ❉❛t❛✳❝s✈ contains the experimental results. You can read the data using
(a). (20 points) Use the Least Squares method with the Householder QR to fit the
data by a polynomial model of the form
, Pi) and the results from each model for comparison.
(b). (10 points) Do a log-log plot of the same values. Explain why the log-log plot
indicates that P(T) = aTb
for some a and b. Use the Least Squares method
and solve the Normal Equations to estimate the values of a and b, and do a
regular plot and a log-log plot with the values (Ti
to show how good your approximation is. Compute the modeling error as well.
Contact Us - Email:99515681@qq.com    WeChat:codinghelp
Programming Assignment Help!