Exercises 4.10 Exercises
1.
Consider the linear function \(f(x,y,z) = 2x-6y+z\text{.}\)- Evaluate "by hand" \(f\) at the points \((0,1,2)\) and \((-1,2,3)\text{.}\)
- Verify your calculations with MATLAB modifying the code used in Section 4.1 to evaluate \(x+2y\) at \((-2,4)\text{.}\)
2.
Evaluate the determinant of the matrix
\begin{equation*}
\begin{pmatrix}2&1&0\cr -4&2&3\cr 6&-1&1\cr\end{pmatrix}
\end{equation*}
in the following two ways: - Using the standard definition (if you do not remember it, you can find it in the determinant's wikipedia page).
- Performing by hand the Gaussian Elimination algorithm and evaluating the determinant of the upper triangular matrix you will end up with.
3.
Modify any of the codes in Subsection 4.2.3 to find the LU decomposition of the \(5\times5\) matrix
\begin{equation*}
\begin{pmatrix}3&2&1&0&-1\cr 0&-4&2&3&0\cr 10&6&-1&1&8\cr 5&1&7&1&-3\cr 1&1&1&1&1\cr\end{pmatrix}
\end{equation*}
4.
Use the Gaussian elimination algorithm in the floating point system \(D_3\), namely keep three digits to represent numbers at every step of the algorithm, to solve the system
\begin{equation*}
\begin{pmatrix}0.780&0.563\cr 0.913&0.659\cr \end{pmatrix} \begin{pmatrix}x\cr y\end{pmatrix} = \begin{pmatrix}0.217\cr0.254\end{pmatrix}.
\end{equation*}
Then solve the equation exactly and compare the exact and numerical solutions.