Your program: def td(l, m, u, b): '''Solve a linear system Ax = b where A is tridiagonal Inputs: l, lower diagonal of A, n-1 vector m, main diagonal of A, n vector u, upper diagonal of A, n-1 vector b, right-hand constant in each equation, n vector Output: x, vector of unknowns, n vector Example: if A = 2 -2 0 0 -1 4 -2 0 0 -1 6 -2 0 0 -1 8 and b = [24; 12; -98; 55], then l = [-1; -1; -1], m = [2; 4; 6; 8], u = [-2; -2; -2], and x = [10; -2; -15; 5]'''