Write a function x = poisson1dj(f, n, numiter) that uses the Jacobi iterations to numerically approximate the solution to the one-dimensional Poisson equation 20.26, whereis the right-hand side,is the number of subintervals ofand numiter is the number of iterations.
Do partusing the Gauss-Seidel iteration by writing a function poisson1dgs. If you have done Problemuse red-black ordering.
The exact solution to the Poisson equation
Usingand numiter(Jacobi), numitercompute the solution using poisson1dj and poisson1dgs. Compare the results to the true solution.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here