Question: matlab The template script for this question 444 has been written to start you off on the process of solving the Dirichlet boundary value problem;

matlab
The template script for this question 444 has been written to start you off on the process of solving the Dirichlet boundary value problem; =f(x), u(0)=2, u(2)=2, 0 x 2, with f(x) =-re. You must complete the script however, as it is only half written! You will have to define the boundary conditions as a and B, define the RHS function f(z) and then properly create the matrix A as defined in the module notes. Once this is complete, plot your solution as a function of x, ens uring that it satis fies the boundary conditions that you have prescribed and call the figure Figl as normal On the same set of axes overlay the eract solution to the BVP (which you should easily be able to determine with a pen and paper!) Do the solutions mat ch? Hint - when plotting the exact solution, use a different x grid (we have started you off by calling it xx'), with say 1000 points in between 0 and 2 instead of the x grid with which you found the numerical solution. This ensures that the exact solution will look nice and smooth! y 11th August, 2018 f Mathematical Sciences Monash Ui Play around with the grid spacing (by modifying the number of node points M in the template) that the numerical solution better approximates the exact solution with a smaller value of Ar (more grid points in x). This scheme exhibits O(A2.2) accuracy s imil arly to Heun's method which you say in the previous module. Comment briefly on vour findins
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
