\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{12. september 2013}}

\normalsize
\begin{enumerate}
  \item Dane so tri to"cke v ravnini
    $$
      A(-2,1), B(1,-1) \ \textrm{in} \ C(3,2).
    $$
    Skozi te tri to"cke interpolirajte polinom druge stopnje. Z Newtonovo metodo dolo"cite teme tako dobljene parabole. \\[2mm]
    \textbf{Re"sitev:}
    Vse tri to"cke vstavimo v ena"cbo parabole $y = ax^2 + bx + c$ in dobimo sistem
    \begin{eqnarray*}
      1 & = & 4a - 2b + c, \\
      -1 & = & a + b + c, \\
      2 & = & 9a + 3b + c,
    \end{eqnarray*}
    ki ima re"sitev $a = \frac{13}{30}$, $b = -\frac{7}{30}$ in $c = -\frac{6}{5}$. Torej je ena"cba parabole
    $y = \frac{13}{30} x^2 - \frac{7}{30} x - \frac{6}{5}$. Teme dobimo tam, kjer je
    $y' = \frac{13}{15} x - \frac{7}{30} = 0$. Za Newtonovo metodo potrebujemo "se drugi odvod $y'' = \frac{13}{15}$
    in primerno izbran za"cetni pribli"zek, npr. $x_0 = 0$. Re"sitev dobimo "ze po prvem koraku
    $$
      x_1 = x_0 - \frac{y'(x_0)}{y''(x_0)} = \frac{7}{26}.
    $$
    Teme je v to"cki $T(\textstyle{\frac{7}{26}},-\textstyle{\frac{1921}{1560}})$.
  \item Dan je sistem $Ax = b$, kjer je
    $$
      A = \left[ \begin{array}{cc} -3 & 1 \\ 2 & -4 \end{array} \right]
      \quad \textrm{in} \quad b = \left[ \begin{array}{c} -5 \\ 0 \end{array} \right].
    $$
    Ali Gauss-Seidlova iteracija konvergira? Odgovor utemeljite! Naredite tri korake Gauss-Seidlove iteracije
    z za"cetnim pribli"zkom $x_0 = \left[ \begin{array}{c} 0 \\ 0 \end{array} \right]$. \\[2mm]
    \textbf{Re"sitev:} Gauss-Seidlova iteracija konvergira, saj je matrika $A$ diagonalno dominantna. To"cna re"sitev
    je $x_{\infty} = \left[ \begin{array}{c} 2 \\ 1 \end{array} \right]$. Matriko $A$ razbijemo na $A = D-L-U$,
    Gauss-Seidlovo iteracijo pa izvajamo po formuli
    $$
      x_{n+1} = R_{gs} x_n + c_{gs},
    $$
    kjer je
    $$
      R_{gs} = (D-L)^{-1}U = \frac{1}{12} \left[ \begin{array}{cc} -4 & 0 \\ -2 & -3 \end{array} \right]
      \cdot \left[ \begin{array}{cc} 0 & -1 \\ 0 & 0 \end{array} \right] =
      \left[ \begin{array}{cc} 0 & 1/3 \\ 0 & 1/6 \end{array} \right]
    $$
    in
    $$
      c_{gs} = (D-L)^{-1}b = \frac{1}{12} \left[ \begin{array}{cc} -4 & 0 \\ -2 & -3 \end{array} \right]
      \cdot \left[ \begin{array}{c} -5 \\ 0 \end{array} \right] =
      \left[ \begin{array}{c} 5/3 \\ 5/6 \end{array} \right].
    $$
    Sledi
    \begin{eqnarray*}
      x_1 & = & R_{gs} \cdot x_0 + c_{gs} = \left[ \begin{array}{c} 5/3 \\ 5/6 \end{array} \right], \\
      x_2 & = & R_{gs} \cdot x_1 + c_{gs} = \left[ \begin{array}{c} 35/18 \\ 35/36 \end{array} \right], \\
      x_3 & = & R_{gs} \cdot x_2 + c_{gs} = \left[ \begin{array}{c} 2 \\ 215/216 \end{array} \right].
    \end{eqnarray*}
  \item Dolo"cite ute"zi kvadraturne formule
    $$
      \int_0^2 \frac{f(x)}{\sqrt{x}} \, \dd x \approx \omega_1 f(\textstyle{\frac{1}{4}}) + \omega_2 f(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^2 \frac{\ee^x}{\sqrt{x}} \, \dd x.
    $$
    \textbf{Re"sitev:} \begin{eqnarray*}
      f(x) = 1 & : & \int_0^1 \frac{1}{\sqrt{x}} \, \dd x = 2x^{1/2} \big|_0^2 = 2\sqrt{2} = \omega_1 + \omega_2 \\
      f(x) = x & : & \int_0^1 \frac{x}{\sqrt{x}} \, \dd x = \frac{2x^{3/2}}{3} \big|_0^2 = \frac{4\sqrt{2}}{3} =
        \frac{1}{4} \omega_1 + \omega_2
    \end{eqnarray*}
    Sledi $\omega_1 = \frac{8\sqrt{2}}{9}$ in $\omega_2 = \frac{10\sqrt{2}}{9}$. Pribli"zna vrednost integrala je
    $$
      \int_0^2 \frac{\ee^x}{\sqrt{x}} \, \dd x = \frac{8\sqrt{2}}{9} \ee^{\frac{1}{4}} + \frac{10\sqrt{2}}{9} \ee =
        5.8855,
    $$
    to"cna vrednost pa je $6.6877$.
\end{enumerate}

\end{document}
