I need help please! I hope the image is clearer now!
Exercise 2(a) Let S be the set of points {(1, 1), (4, -3), (7,9)}. Let T be the set of points {(-9, 10),(-4,2),(-2,2), (0, 2), (1, -3), (3,6), (8, 12)}. Let V be the 3 x 3 Vandermonde matrix corresponding to the polynomial interpolation of S. Similarly, let W be the 7 x 7 Vandermonde matrix corresponding to the polynomial interpolation of T. Determine the condition number of V and W. Record your answer by setting the variable CONDV the condition number of V and variable CONDW the condition number of W. Hint: You can input all the entries of V, W yourself. OR you can call np.vander. Read the documentation online if you'd like to use this method, it is available at numpy.org. In [13] : 1 # I'm not sure how to program the Vandermonde matrices V & W based on the sets S & T... 2 3 S = np.array([[1,1],[4,-3],[7,911) 4 T = np.array([(-9,10),(-4,2],[-2,2],[0,-2],[1,-3),(3,6],[8,12]]) 5 6 V = np.vander(s, increasing = True) 7 W = np.vander (T, increasing = True) ValueError Traceback (most recent call last)
in 4 T = np.array([[-9,10],[-4,2],[-2,2],[0,-2],[1,-3],[3,6],[8,12]]) 5 ----> 6 V = np.vander(s, increasing = True) 7W = np.vander (T, increasing = True) <_array_function internalg> in vander (*args, **kwargs) /opt/conda/lib/python3.8/site-packagesumpy/lib/twodim_base.py in vander(x, n, increasing) 546 x = asarray (X) 547 if x.ndim != 1: --> 548 raise ValueError("x must be a one-dimensional array or sequence.") 549 if Nis None: 550 N = lenx ValueError: x must be a one-dimensional array or sequence. In ]: 1 In ]: 1 Exercise 2(b) Let S and T be as above. Let M be the lower triangular matrix corresponding to the Newton interpolation method on the set S. Similarly, let N be the lower triangular matrix corresponding to the Newton interpolation method on the set T. Determine the condition number of M and N. Record your answer by setting the variable CONDM the condition number of M and variable CONDN the condition number of N. As a way of checking your answers, you should find that the condition numbers using the Newton interpolation method are smaller than the Vandermonde method. Exercise 2(a) Let S be the set of points {(1, 1), (4, -3), (7,9)}. Let T be the set of points {(-9, 10),(-4,2),(-2,2), (0, 2), (1, -3), (3,6), (8, 12)}. Let V be the 3 x 3 Vandermonde matrix corresponding to the polynomial interpolation of S. Similarly, let W be the 7 x 7 Vandermonde matrix corresponding to the polynomial interpolation of T. Determine the condition number of V and W. Record your answer by setting the variable CONDV the condition number of V and variable CONDW the condition number of W. Hint: You can input all the entries of V, W yourself. OR you can call np.vander. Read the documentation online if you'd like to use this method, it is available at numpy.org. In [13] : 1 # I'm not sure how to program the Vandermonde matrices V & W based on the sets S & T... 2 3 S = np.array([[1,1],[4,-3],[7,911) 4 T = np.array([(-9,10),(-4,2],[-2,2],[0,-2],[1,-3),(3,6],[8,12]]) 5 6 V = np.vander(s, increasing = True) 7 W = np.vander (T, increasing = True) ValueError Traceback (most recent call last) in 4 T = np.array([[-9,10],[-4,2],[-2,2],[0,-2],[1,-3],[3,6],[8,12]]) 5 ----> 6 V = np.vander(s, increasing = True) 7W = np.vander (T, increasing = True) <_array_function internalg> in vander (*args, **kwargs) /opt/conda/lib/python3.8/site-packagesumpy/lib/twodim_base.py in vander(x, n, increasing) 546 x = asarray (X) 547 if x.ndim != 1: --> 548 raise ValueError("x must be a one-dimensional array or sequence.") 549 if Nis None: 550 N = lenx ValueError: x must be a one-dimensional array or sequence. In ]: 1 In ]: 1 Exercise 2(b) Let S and T be as above. Let M be the lower triangular matrix corresponding to the Newton interpolation method on the set S. Similarly, let N be the lower triangular matrix corresponding to the Newton interpolation method on the set T. Determine the condition number of M and N. Record your answer by setting the variable CONDM the condition number of M and variable CONDN the condition number of N. As a way of checking your answers, you should find that the condition numbers using the Newton interpolation method are smaller than the Vandermonde method