Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This question comes from a Partial Differential Equation Class. The textbook we use is Introduction to Partial Differential Equations A Computational Approach, 29 edition by
This question comes from a Partial Differential Equation Class. The textbook we use is "Introduction to Partial Differential Equations A Computational Approach," 29 edition by Aslak Tveito and Ragnar Winther. You can find a free copy online if you need it. This problem might deal with PDE, Numerical Methods, Boundary Value Problems, Fourier Series, Heat Equations, etc... USE MATLAB!
Task two: Complete the work of Exercise 2.14 for the value of n=10. You will implement your tridiagonal code for this problem but with slightly different coefficient matrices A1 and A2 and right hand side vectors b1 and b2. The matrices will be almost the same but may be slightly changed due to the equations used to address the right boundary condition variations in part a, leading to a change in one or two elements of A1 and A2 associated with the schemes S1 and S2. The vectors associated with the given right hand side function of part c, b1 and b2, may be slightly changed due to the discrete equations used to address the right boundary condition variations in part a (possibly leading to a change in one or two elements of b1 and b2 due to the schemes S1 and S2.) Provide copies of the coefficient matrices A1 and A2 and copies of the right hand side vectors b1 and b2 from Matlab. Compute and provide the errors for each of the schemes. The numerical output of Task 2 should be 2 coefficient matrices, 2 right hand side vectors, 2 solution vectors and 2 vectors of error values. Also plot the solution vectors along with the true solution and a separate plot of the errors, there should be 2 or 4 plots. You may plot the true solution along with both approximate solutions. EXERCISE 2.14 Consider the boundary value problem u(x)=f(x),u(0)=0,u(1)=1. (a) Define two finite difference schemes, S1 and S2, approximating the solution of this problem. The differential equation and the left boundary condition can be handled as usual, but the two schemes differ at the approximation of the second boundary condition. In the scheme S1, we use the approximation hun+1un=1, and in S2 we introduce an auxiliary unknown un+2, and approximate the boundary condition by 2hun+2un=1 For both these schemes, find the corresponding matrices A1 and A2, and the right-hand sides b1 and b2, such that the two approximations defined by the schemes S1 and S2 can be found by solving the linear systems A1v1=b1andA2v2=b2. (b) Are the matrices A1 and A2 1. symmetric and positive definite? 2. diagonal dominant? (c) Let f(x)=ex1 and show that u(x)=e1(ex1) is the exact solution of (2.51). Compare the numerical approximations generated by the schemes S1 and S2 for this example by computing the error given by (2.16) for both schemes. What can you say about the rate of convergence 12 of the two approximations? How good is the approximation actually? What is the rate of convergence? Since the exact solution is available for this problem, the rate of convergence can be estimated simply by running some experiments. We define the error to be Eh=maxj=0,,n+1u(xj)vj and compute this value for some grid sizes. The results are given in Table 2.1. We have also estimated the rate of convergence by comparing the results of subsequent grid sizes. Exactly how this computation is done is discussed in Project 1.1. From the table, we observe that the error seems to satisfy a bound of the form Eh=O(h2)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started