Looking for Computational Mathematics | Meirbekova Bibinur test answers and solutions? Browse our comprehensive collection of verified answers for Computational Mathematics | Meirbekova Bibinur at moodle.astanait.edu.kz.
Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!
def fixed_point_iteration():
x = 1.0
for i in range(2): # (1)
x = (x + 3)**0.5 # (2)
return x # (3)
Using the Neumann series, how can the true inverse A−1 be expressed in terms of B and E?
For f(x)=x3−x−2, which initial interval is valid for the Bisection method?
What will the following code snippet output for the LU factorization of matrix A?
import numpy as np
A = np.array([[2, 1], [4, 3]])
n = A.shape[0]
X = np.eye(n)
Y = A.copy()
for i in range(n):
for j in range(i + 1, n):
X[j, i] = Y[j, i] / Y[i, i]
Y[j] = Y[j] - X[j, i] * Y[i]
print(X)
print(Y)
The following code implements Gaussian Elimination to solve Ax=b. What is the error?
import numpy as np
def gaussian_elimination(A, b):
n = len(b)
A = A.astype(float)
b = b.astype(float)
for k in range(n):
# Partial pivoting
max_row = np.argmax(np.abs(A[k:, k])) + k
A[[k, max_row]] = A[[max_row, k]]
b[[k, max_row]] = b[[max_row, k]]
# Elimination
for i in range(k+1, n):
factor = A[i, k] / A[k, k]
A[i, k:] -= factor * A[k, k:]
b[i] -= factor * b[k]
# Back substitution
x = np.zeros(n)
for k in range(n-1, -1, -1):
x[k] = (b[k] - np.dot(A[k, k+1:], x[k+1:])) / A[k, k]
return x
# Test case
A = np.array([[2, 1, -1], [4, 1, 0], [1, -1, 1]])
b = np.array([1, -2, 3])
print(gaussian_elimination(A, b))
What is the Newton-Raphson iterative formula for finding roots of f(x) = 0?
What is the main advantage of the Secant method over Newton-Raphson method?
What does this code output for x_data = [0, 1, 2], y_data = [1, 3, 7], x = 1.5?
def newton_backward(x_data, y_data, x):
h = x_data[1] - x_data[0]
s = (x - x_data[-1]) / h
result = y_data[-1] + s*(y_data[-1] - y_data[-2])
return result
What is the primary goal of Jacobi’s method for the eigenvalue problem?