Question: 1 Exercise Besse functions arise when finding separable solutions to Laplace's equation and the Helmholtz equation in cylindrical or spherical coordinates. Consider the Bessel differential

1 Exercise Besse functions arise when finding separable solutions to Laplace's equation and the Helmholtz equation in cylindrical or spherical coordinates. Consider the Bessel differential equation ddu - :Ca(z))-xn(x)-0 in (0,20) with the boundary conditions u(0)-1 and u(20)-Jo(20) where J is a Bessel function of the first kind. The exact solution is given by u(x) = Jo(z) The MATLAB command is besselj(0,x) Recall that -21 (z) du and So we have h u (x+ h) - u (x) h u (z) - u(x h) d The objective of this exercise is to implement a finite difference method for solving the Bessel differential equation using this second-order finite difference formula (i.e. using p(r)-x). Given a grid size h = 20/N and the grid points = jh, you will form the matrix A and the right hand side b such that 14 Au-b where u and u, u (x,) UN-1 1, Set h 1/4. Implement the finite difference method. (Note: A(1, 1) will be positive and A will be symmetric.) TASK: Save the first two rows A(1: 2,:) in the file All.dat TASK: Save the row A(40,:), as a row vector, in the file A12.dat TASK: Save the last two rows A(78: 79,) in the file A13.dat TASK: Save b, as a column vector, in the file A14.dat TASK: Save u, as a column vector with 79 rows, in the file A15.dait 2. Use the family of grid sizes h = 20, 2-1, , 2-8 and, for each time step, compute the maxi- mum absolute error TASK: Save the ratios eo/e,e/ea,.. ,er/es], as a column vector, in the file A16.dat
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
