Harj. 4
18.3. -99
References and links
- [Coo] Blue book, Ch 9 (9.1 and 9.2)
- [T-W] Tweito-Winther: Yellow book (Chapter 7)
[Coo] Exercises 9.2 pp. 386 - 389
These exercises are for the most part "software oriented" and make use of
ready made ideas and code found in [Coo]. There should be no difficulties
in completing the solutions by Fri 26.3.
- Probl. 2, p. 386. Poisson kernel
- Probl. 3, p. 387. Plot harmonic fns given in polar coords
Take a look at the Cooper code
dirch , see also p. 387 for an explanation.
- Probl. 4, p. 387
- Probl. 5, p. 387-388
- Probl. 7, p. 388
- Probl. 8, p. 388
- Write a Matlab program that solves the Dirichlet problem on a disk
using Poisson's formula (and numerical integration) directly.
Try to make it as vectorized as possible in order to make it efficient.
Test and compare to some of the above problems.
Hints and instructions
Surface plot of a function "over a disk"
See Cooper p. 386
Case 1, function f(x,y) given in rectangular coordinates
r=linspace(0,1,20);
theta=linspace(0,2*pi); % default of linspace is n=100
X=r'*cos(theta);
Y=r'*sin(theta);
surf(X,Y,X.*Y) % The function f(x,y)=x*y
In general f.m is an array smart function file and the surf
command is
surf(X,Y,f(X,Y))
Case 2, function h(r,theta) given in polar coordinates
r=linspace(0,1,20);
theta=linspace(0,2*pi);
R=r'*ones(size(theta));
TH=ones(size(r'))*theta;
X=r'*cos(theta);
Y=r'*sin(theta);
surf(X,Y,R.*ones(size(TH))) % Plot the function h(r,theta)=r
In general h.m is an array smart function file and the surf
command is
surf(X,Y,h(R,TH))