MATH3271

FW03

 

Assignment 3 Due date: Monday, Nov. 3

 

 

1. (a) Solve the two-dimensional Laplaces equation on the rectangular region 0 < x < a,

0 < y < b for each of the following sets of conditions.

(i) f1(x) = 0, f2(x) = sin(2πx), g1(y) = y(1 y), g2(y) = 0, a = 2, b = 1;

(ii) f1(x) = f2(x) = 1 x , g1(y) = cos(2πy), g2(y) = sin(πy), a = b =1.

You may use your results from previous assignments where applicable.

(b) Plot the tenth partial sum of the solution to part (a) (i). Use the option axes=BOXED. Note that you can rotate the plot in 3D by placing the cursor on the plot, holding down the left mouse button and dragging the display. This enables you to get a better idea of the shap of the plot.

 

 

2. (a) Find the eigenfunctions and eigenvalues of the two-dimensional Helmholz equation

on the rectangular domain 0 < x < 2, 0 < y < 3 where the eigenfunctions are zero on the boundaries.

(b) Using the results from part (a), solve the Poisson equation

on the same rectangular domain and boundary conditions as in part (a).

(c) Plot the tenth partial sum of the solution to part (b).

 

 

3. (a) Evaluate the following expresions using the vector operators in cylindrical polar coordinates:

(i) the gradient of ρ2sinφcosφ , ρ2 z2;

(ii) the divergence of zuρ, cosφuz,

(iii) the curl of ρ, ρuφ

(iv) the Laplacian of ln(ρ), 1/ρ, ρz sinφ

 

(b) Evaluate the following expresions using the vector operators in spherical polar coordinates:

(i) the gradient of r sinθ cosφ, r2 cos2θ;

(ii) the divergence of r, uφ,

(iii) the curl of cosφur, r sinθuθ

(iv) the Laplacian of 1/r, r2 sin2θ sinφ, rn

 

4.(a) In MAPLE the Bessel function Jn(x) is denoted by BesselJ(n,x). Plot J0(x) and J1(x) on the same graph over the range from 0 to 20. What can you say about the location of the zeros of J1 relative to those of J0?

(b) The function BesselJZeros(n,m) calculates the mth zero of Jn(x). Find the first 10 zeros of J0(x) and store them in an array. Then evaluate J1 at the 10 roots of J0 and store them. See below for sample MAPLE code.

(c) Find the solution of the two-dimensional wave equation for a circular membrane of radiius

a = 1 and speed c = 1 with initial conditions f(ρ) = sin(2πρ) and g(ρ) = cos(3πρ/2). Use MAPLE to carry out the required integrations and use the results from parts (a) and (b) to evaluate the Bessel-Fourier coefficients Am and Bm for m from 1 to 10. Notice how the magnitude of these coefficients varies with m.

(d) Plot the tenth partial sum of the Fourier-Bessel series from part (c) for several different values of the time in the interval from 0 to 1/2.


 

MORE MAPLE

Here is some MAPLE code that will calculate the first 10 zeros of J0 and store them in an array a:

>for m from 1 to 10 do a[m]:=evalf(BesselJZeros(0,m)); od;

Note the use of square brackets to denote an array element.

Here is the code to evaluate J1 at the zeros of J0:

>for m from 1 to 10 do b[m]:=evalf(BesselJ(1,a[m])); od;

Note that the function evalf forces a numerical evaluation of the Bessel function.

To evaluate

numerically use:

>f:=whatever_function_of_x;

>evalf(int(f,x=a..b));

Note that if you just write

>int(f,x=a..b);

MAPLE will attempt to find an analytic solution to the integral.

To plot a two-dimensional function in polar coordinates use the following commands (only works in MAPLE 6 or later versions):

>addcoords(z_cylindrical,[z,rho,phi],[rho*cos(phi),rho*sin(phi),z]);

>plot3d(f,rho=a..b,phi=c..d,coords=z_cylindrical,axes=BOXED);

where f has been defined as a function of rho and phi, a and b are the limits on rho and c and d are the limits on phi (normally 0 and 2*Pi). In this assignment f is a function of rho only. Note that you must have given t a definite value in the Fourier-Bessel series before plotting.