\documentclass[a4paper, 12pt]{article}
\usepackage[slovene]{babel}
\textwidth17cm
\oddsidemargin-8mm\evensidemargin-8mm
\topmargin-24mm\textheight+740pt

\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{amsxtra}

\setlength{\parindent}{0pt}

\def\ee{\textrm{e}}
\def\dd{\textrm{d}}

\begin{document}

\Large \centerline{\textbf{IZPIT IZ NUMERI"CNIH METOD}}
\centerline{\textbf{14. februar 2013}}

\normalsize
\begin{enumerate}
  \item Dolo"cite ute"z in vozel kvadraturne formule
    $$
      \int_0^1 \frac{f(x)}{\sqrt[3]{x}} \, \dd x \approx \omega f(\xi),
    $$
    kjer je $0 < \xi < 1$, da bo formula to"cna za $f(x) = 1$ in $f(x) = x$. Z uporabo te formule nato
    izra"cuanjte vrednost integrala
    $$
      \int_0^1 \frac{\ee^x}{\sqrt[3]{x}} \, \dd x.
    $$
    \textbf{Re"sitev:}
    \begin{eqnarray*}
      f(x) = 1 & : & \int_0^1 \frac{1}{\sqrt[3]{x}} \, \dd x = \frac{3x^{2/3}}{2} \big|_0^1 = \frac{3}{2} = \omega \\
      f(x) = x & : & \int_0^1 \frac{x}{\sqrt[3]{x}} \, \dd x = \frac{3x^{5/3}}{5} \big|_0^1 = \frac{3}{5} = \omega \xi
    \end{eqnarray*}
    Sledi $\omega = \frac{3}{2}$ in $\xi = \frac{2}{5}$. Pribli"zna vrednost integrala je
    $$
      \int_0^1 \frac{\ee^x}{\sqrt[3]{x}} \, \dd x = \frac{3}{2} \ee^{2/5} = 2.23774,
    $$
    to"cna vrednost pa je $2.34359$.
  \item Dan je sistem $Ax = b$, kjer je
    $$
      A = \left[ \begin{array}{ccc} 4 & -2 & 1 \\ 1 & 3 & -1 \\ 1 & -1 & -3 \end{array} \right]
      \quad \textrm{in} \quad b = \left[ \begin{array}{c} 3 \\ 3 \\ -3 \end{array} \right].
    $$
    Ali Jacobijeva iteracija konvergira? Odgovor utemeljite! Naredite dva koraka Jacobijeve iteracije
    z za"cetnim pribli"zkom $x_0 = \left[ \begin{array}{c} 0 \\ 0 \\ 0 \end{array} \right]$. \\[2mm]
    \textbf{Re"sitev:} Jacobijeva iteracija konvergira, saj je matrika $A$ diagonalno dominantna. To"cna re"sitev
    je $x_{\infty} = \left[ \begin{array}{c} 1 \\ 1 \\ 1 \end{array} \right]$. Matriko $A$ razbijemo na $A = D-L-U$,
    Jacobijevo iteracijo pa izvajamo po formuli
    $$
      x_{n+1} = R_J x_n + c_J,
    $$
    kjer je
    $$
      R_J = D^{-1}(L+U) = \left[ \begin{array}{ccc} 1/4 & 0 & 0 \\ 0 & 1/3 & 0 \\ 0 & 0 & -1/3 \end{array} \right]
      \cdot \left[ \begin{array}{ccc} 0 & 2 & -1 \\ -1 & 0 & 1 \\ -1 & 1 & 0 \end{array} \right] =
      \left[ \begin{array}{ccc} 0 & 1/2 & -1/4 \\ -1/3 & 0 & 1/3 \\ 1/3 & -1/3 & 0 \end{array} \right]
    $$
    in
    $$
      c_J = D^{-1}b = \left[ \begin{array}{ccc} 1/4 & 0 & 0 \\ 0 & 1/3 & 0 \\ 0 & 0 & -1/3 \end{array} \right]
      \cdot \left[ \begin{array}{c} 3 \\ 3 \\ -3 \end{array} \right] =
      \left[ \begin{array}{c} 3/4 \\ 1 \\ 1 \end{array} \right].
    $$
    Sledi
    \begin{eqnarray*}
      x_1 & = & R_J \cdot x_0 + c_J = \left[ \begin{array}{c} 3/4 \\ 1 \\ 1 \end{array} \right], \\
      x_2 & = & R_J \cdot x_1 + c_J = \left[ \begin{array}{c} 1 \\ 13/12 \\ 11/12 \end{array} \right].
    \end{eqnarray*}
  \item Dani sta kro"znici
    $$
      x^2 + y^2 = 1 \quad \textrm{in} \quad (x-1)^2 + y^2 = 1.
    $$
    Z uporabo Newtonove iteracijske sheme za sisteme naredite dva koraka metode z za"cetnim
    pribli"zkom $[x_0, y_0] = [1, 1]$. \\[2mm]
    \textbf{Re"sitev:} Newtonova iteracijska shema za re"sevanje sistema $f(x,y) = 0$ in $g(x,y) = 0$
    $$
      \left[ \begin{array}{c} x_{n+1} \\ y_{n+1} \end{array} \right] =
      \left[ \begin{array}{c} x_n \\ y_n \end{array} \right] -
      \left[ \begin{array}{cc} f_x(x_n,y_n) & f_y(x_n,y_n) \\ g_x(x_n,y_n) & g_y(x_n,y_n) \end{array} \right]^{-1}
      \cdot \left[ \begin{array}{c} f(x_n,y_n) \\ g(x_n,y_n) \end{array} \right].
    $$
    Parcialni odvodi: $f_x = 2x$, $f_y = 2y$, $g_x = 2(x-1)$ in $g_y = 2y$. Sledi
    \begin{eqnarray*}
      \left[ \begin{array}{c} x_1 \\ y_1 \end{array} \right] & = & \left[ \begin{array}{c} 1 \\ 1 \end{array} \right] -
      \left[ \begin{array}{cc} 2 & 2 \\ 0 & 2 \end{array} \right]^{-1} \cdot
      \left[ \begin{array}{c} 1 \\ 0 \end{array} \right] = \left[ \begin{array}{c} 1/2 \\ 1 \end{array} \right], \\
      \left[ \begin{array}{c} x_2 \\ y_2 \end{array} \right] & = & \left[ \begin{array}{c} 1/2 \\ 1 \end{array} \right] -
      \left[ \begin{array}{cc} 1 & 2 \\ -1 & 2 \end{array} \right]^{-1} \cdot
      \left[ \begin{array}{c} 1/4 \\ 1/4 \end{array} \right] = \left[ \begin{array}{c} 1/2 \\ 7/8 \end{array} \right].
    \end{eqnarray*}
    To"cna re"sitev je $[x, y] = [1/2, \sqrt{3}/2]$.
\end{enumerate}

\end{document}
