Answered step by step
Verified Expert Solution
Question
1 Approved Answer
SFWRTECH 4MA3 An X n Hilbert matrix has entries Hij Challenge Project 1 1 i+j-1' n 2 3 : so it has the form
SFWRTECH 4MA3 An X n Hilbert matrix has entries Hij Challenge Project 1 1 i+j-1' n 2 3 : so it has the form 1 1/2 1/3 1/2 1/3 1/4 1/3 1/4 1/5 : : : For n = 2, 3, generate a Hilbert matrix H and a n-vector b=Hx_using x, a n-vector with all entries equal to 1. You can generate these via a function generatorHb. Using the GaussElimination, forwardSubstitution, and backwardSubstitution functions developed in Assignment 2, solve the system the system H = b to obtain the approximate solution . Find the -norm of the residual r = b H and of the error Ax: = - x, where x is the true solution, i.e., the n-vector with all entries equal to 1. How large can you take n before the error is 100% ? Also monitor the cond(H) and see how this varies as a function of n. Note: 1. Your PDf submission should include the complete algorithm package including the following functions: GaussElimination, forwardSubstitution, backwardSubstitution, generatorHb that work for a general n n matrix and n-vector. 2. You cannot use a built-in Gauss elimination or LU decomposition functions of the program. 3. For each n, your program should print the following vectors: , Ax, r 4. As part of your solution, you should present the following table in your PDF file ||1|| 00 Cond(H) 5. Finally, you should also identify the n at which the error goes to 100%
Step by Step Solution
★★★★★
3.47 Rating (163 Votes )
There are 3 Steps involved in it
Step: 1
Python code import numpy as np n inputHow many constants in b pri...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