留学生代考 MATH 450: HOMEWORK 2

MATH 450: HOMEWORK 2
DUE MARCH 3RD, SUBMIT TO CANVAS. All implementations below are to be in a Jupyter Notebook.
P2.1 (12 pts) Use a polynomial interpolant on the Chebyshev points tpxi,yjquni,j“0 with n “ 40 to approximate the solution to the Laplace’s equation in 2D with the boundary conditions
’upx, ́1q “ cosp2πxq, ’

Copyright By PowCoder代写 加微信 powcoder

’∇2u “ 0 ’
in p ́1, 1q2, ’&uxp ́1, yq “ uxp1, yq “ 0,
’%upx,1q“sin 2x .
Numerically approximate the integral ş2π up0.5 cos θ, 0.5 sin θq dθ by the sum
1 ÿm ˆ 2 π ̇
(1.2) Sm :“ m
with m “ 256, then compare this integral with the polynomial approximation
at the point p0, 0q.
P2.2 (12 pts) Use a polynomial interpolant on the Chebyshev points tpxi,yjquni,j“0 with n “ 40 to approximate solution to the variable coefficient boundary value problem problem
up0.5cosθj,0.5sinθjq where θj “ m`1 j,
in p ́1, 1q2,
’&Kpx, yq “ expr ́px ́ 0.1q2 ́ 5py ́ 0.2q2s,
’up ́1,yq“y2 `1, upx, ́1q“x2 `1, ’
’%up1,yq“y2 `1, upx,1q“x2 `1.
’∇ ̈ K∇u “ 0 ’
P2.3 (6 pts) For the two polynomial approximations above, evaluate the solution u and its normal derivatives n ̈ ∇u on the Chebyshev points that lie on the boundary. Draw two scatter plots of these values, with values xk :“ upxik , yjk q on the x-axis and the value of yk :“ n ̈ ∇upxik , yjk q on the y-axis.

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com