Tutorial 1 - Examples in Julia


Assignment 1

Using the package Polynomials.jl, write the function which implements Graeffe's method (see also here) for computing roots of polynomials with only real roots with simple moduli.

In the function, use Julia's BigFloat numbers to overcome the main disadvantage of the method. What is the number of significant decimal digits, and the largest and the smallest number?

Test the function on the Wilkinson's polynomial $\omega(x)$, and the Chebyshev polynomial $T_{50}(x)$ (the latter needs to be transformed in order to apply the method).

Compare your solutions with the exact solutions.

Assignment 2

Write the function which computes simple LU factorization (without pivoting) where the matrix is overwritten by the factors.

Make sure that the function also works with block-matrices.

Compare the speed on standard matrices and block-matrices with the built-in LU factorization (which also uses block algorithm AND pivoting). Check the accuracy.

Assignment 3

Use the function eigvals() to compute the eigenvalues of $k$ random matrices (with uniform and normal distribution of elements) of order $n$.

Plot the results using the macro @manipulate from the package Interact.jl. Use Winston.jl for plotting.

Are the eigenvalues random? Can you describe their behaviour? Can random matrices be used to test numerical algorithms?


In [ ]: