当前位置:天才代写 > 数学代写代考,北美/加拿大/英国靠谱的数学作业代写机构 > 数学Midterm代考 期中代考 Math 574代写

数学Midterm代考 期中代考 Math 574代写

2021-12-30 12:15 星期四 所属: 数学代写代考,北美/加拿大/英国靠谱的数学作业代写机构 浏览:514

数学Midterm代考

Math 574

Midterm # 2: due April 19

 

数学Midterm代考 Let (xi, yj)0≤i,j≤N be uniform grids discretize the domain Ω and Let Uij de- note the approximation of u at point (xi, yj) and Fij = f (xi, yj).

Problem 1. Consider finite difference method to solve the Laplace prob- lem

uxx uyy = sin(πx) sin(πy) in Ω = (0, 1)2,

and

u = 0 on the boundary Ω.

Let (xi, yj)0i,jN be uniform grids discretize the domain Ω and Let Uij de- note the approximation of u at point (xi, yj) and Fij = f (xi, yj).

a)Writedown the finite difference method for solving the Laplace equation above.

b)In MATLAB implementation, we use the command

U = zeros(N+1, N+1);   数学Midterm代考

to generate an initial guess of (U 0 )0i,jN to approximate u(xi, yj). To solve for Uij satisfies part a), write down a Gauss-Seidel iteration to generate a

U(kijUij .

c)In MATLAB code, we use the command

f = @(x,y) sin(pi*x).*sin(pi*y);

to define the function f (x, y) = sin(πx) sin(πy) and use the command

[X,Y] =  meshgrid(0:h:1); F = f(X,Y);

to generate Fij f (xi, yj). Implement the Gauss Seidel iteration in part b). Set the tolerance tol = 1e-9, and

数学Midterm代考
数学Midterm代考

stop the iteration if err < tol. To plot the approximation U , use the com- mand

surf(X,Y,U)

数学Midterm代考
数学Midterm代考

d)For N = 8, 16, 32, record the number of the GS iteration in part c) and theerror   数学Midterm代考

Note that the exact solution u(x, y) = 1 sin(πx) sin(πy).

e)Now suppose that the error ehChα for some constants C and α. Then

How do the values of α computed in part (d) compare to the rates of con- vergence for these norms predicted by the theory? Make sure to hand in a copy of your program as m file and the values you computed of e1/8, e1/16, e1/32 and α.

Problem 2. a) Write a computer program to approximate the solution of the boundary value problem:   数学Midterm代考

u” + u = 1, 0 < x < 1, u(0) = 0 u(1) = 1.

by the finite element method using continuous piecewise linear elements on a uniform mesh of width h.  Use h = 1/100 and 1/200.

b)Let uI(x) denote the piecewise linear interpolant of u, e., the piecewise linear function satisfying

uI(xi) = u(xi), i = 0, · · · , N, and e(x) = uI(x)  uh(x).

Let

数学Midterm代考
数学Midterm代考

Have  the  computer  determine  E(1),  E(2),  E(3),  for  h  =  1/100  and  1/200.

Note: the true solution of the boundary value problem is given by

c)Now suppose that the error E(k)Ckhαk for some constants Ck andαk.The error Eh gives an approximation to u uhL2(0,1)  and the errorEh gives an approximation to “∇(u uh)L2(0,1).  How do the values of α2and α3 computed in part (c) compare to the rates of convergence for thesenorms predicted by the theory? Make sure to hand in a copy of your program as m file and the values you computed of E1/100, E1/200, and α.

数学Midterm代考
数学Midterm代考

 

更多代写:美国本科computer science论文代写  雅思代考  商科Online exam代考  美国essay写作  论文apa代写  代写的风险

合作平台:essay代写 论文代写 写手招聘 英国留学生代写

 

天才代写-代写联系方式