\documentclass{beamer}
\usepackage{multimedia}
\usepackage{amssymb}
\usepackage{enumerate}
\usepackage{color}
%\mode<presentation>
%{
  \usetheme{default}
%  \setbeamercovered{transparent}
%}

%\useoutertheme{shadow}
%\usecolortheme{crane}

\usepackage[slovene]{babel}
\usepackage[latin1]{inputenc}
%\usepackage{times}
%usepackage[T1]{fontenc}
\newtheorem{primer}[theorem]{Primer} 
\DeclareMathOperator{\sign}{sign}
\DeclareMathOperator{\tg}{tg}
\DeclareMathOperator{\arctg}{arctg}


\definecolor{darkblue}{rgb}{0.0,0.0,0.6}
%\definecolor{mybrown}{rgb}{0.3,0.5,0.0}
\definecolor{mybrown}{rgb}{0.0,0.5,0.3}
\definecolor{mygrey}{rgb}{0.4,0.3,0.3}
%\usefonttheme{structuresmallcapsserif}
\newcommand\formulas[1]{\textcolor{darkblue}{#1}}
\newcommand\ttxt[1]{\textcolor{mybrown}{#1}}
\setbeamercolor{normal text}{fg=mygrey} 


\title[Matematika 2]
{Matematika 2}

\subtitle{3. vaja, funkcijske vrste}

\author[Borut] % 
{B.~Jur\v{c}i\v{c}~Zlobec\inst{1}}

\institute[Univerza v Ljubljani Slovenia] % 
{
  \inst{1}%
    Univerza v Ljubljani,\\Fakulteta za Elektrotehniko\\ 
    1000 Ljubljana, Tr\v{z}a\v{s}ka 25, Slovenija
}


\date[\today] % 
{Matematika FE, Ljubljana, Slovenija \today}

\subject{Matematika, funkcijske vrste}

%\AtBeginSubsection[]
%{
%  \begin{frame}<beamer>{Vsebina}
%    \tableofcontents[currentsection]
%  \end{frame}
%}
\begin{document}

\begin{frame}
 \titlepage
\end{frame}

%\begin{frame}{}
%  \tableofcontents
%\end{frame}
\section{Poten\c{c}ne vrste}
\subsection{Konvergen\v{c}no obmo\v{c}je}
\begin{frame}{Dolo"ci konvergen"cno obmo"cje vrste.}
\textcolor{blue}{$$
	f(x)=\sum_{n=1}^\infty\frac{x^n}{n^2}
$$}
\begin{itemize}
	\item d'Alambertov kriterij: $\displaystyle D_n=\left|\frac{x^{n+1} n^2}{x^n (n+1)^2}\right|=
	\frac{n}{n+1}|x|\rightarrow$\\
	\item $\displaystyle D=\lim_{n\to\infty} D_n=\lim_{n\to\infty}\frac{n^2}{(n+1)^2}|x|=|x|<1$. 
	\item Vrsta konvergira v notranjosti intervala $(-1,1)$. 
	\item Kaj je s konvergenco na robu, to je v to"ckah $1$ in $-1$? 
	\item $\displaystyle\sum_{n=1}^\infty\frac{1}{n^2}$ in $\displaystyle\sum_{n=1}^\infty\frac{(-1)^n}{n^2}$.
	\item Obe vrsti konvergirata. \textcolor{blue}{$\mathcal{D}_f=[-1,1]$}.
\end{itemize}
\end{frame}

\begin{frame}{Dolo"ci konvergen"cno obmo"cje vrste}
\textcolor{blue}{$$
	f(x)=\sum_{n=1}^\infty\frac{(x-2)^n}{\sqrt{n}}
$$}
\begin{itemize}
	\item d'Alambertov kriterij: $\displaystyle D_n=\left|\frac{(x-2)^{n+1} \sqrt{n}}{(x-2)^n \sqrt{n+1}}\right|=
	\frac{\sqrt{n}}{\sqrt{n+1}}|x-2|\rightarrow$\\
	\item $\displaystyle D=\lim_{n\to\infty} D_n=\lim_{n\to\infty}\frac{\sqrt{n}}{\sqrt{n+1}}|x-2|=|x-2|<1$. 
	\item Vrsta konvergira v notranjosti intervala $(1,3)$. 
	\item Kaj je s konvergenco na robu, to je v to"ckah $3$ in $1$? 
	\item $\displaystyle\sum_{n=1}^\infty\frac{1}{\sqrt{n}}$ in 
	$\displaystyle\sum_{n=1}^\infty\frac{(-1)^n}{\sqrt{n}}$.
	\item Prva divergira, druga pogojno konvergira. 
	\textcolor{blue}{$\mathcal{D}_f=[1,3)$}.
\end{itemize}
\end{frame}

\subsection{Taylorjeva vrsta}
\begin{frame}{Nekaj osnovnih razvojev v okolici $x_0=0$}
\begin{enumerate}
\item \textcolor{blue}{Eksponentna funkcija:}\\
$e^x =1 + x + \frac{x^2}{2!} + \frac{x^3}{3!}+ \cdots + \frac{x^n}{n!} + \cdots, \qquad |x| < \infty$
\item \textcolor{blue}{Sinus:}\\ 
$\sin x = x - \frac{x^3}{3!} + \frac{x5}{5!} - \cdots + (- 1)^n \frac{x^{2n+1}}{(2n+1)!} + \cdots, \qquad |x| < \infty$
\item \textcolor{blue}{Kosinus:}\\ 
$\cos x =1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \cdots + (-1)^n \frac{x^{2n}}{(2n)!} + \cdots, \qquad |x| < \infty$
\item \textcolor{blue}{Logaritem:}\\ 
$\log(1+x) =x - \frac{x^2}{2} + \frac{x^3}{3} - \cdots + (-1)^{n-1}\frac{x^n}{n} + \cdots, -1 < x \leq 1$
\item \textcolor{blue}{Binomska vrsta:}\\ 
$(1+x)^{\alpha} =\displaystyle{\sum_{k=0}^{\infty} \binom \alpha k x^k}, \qquad |x| < 1,\quad \alpha\in\mathbb{R}$
\item \textcolor{blue}{Geometrijska vrsta:}\\ 
$(1-x)^{-1} =1 + x + x^2 + x^3 + \cdots + x^n + \cdots,\qquad |x| < 1$
\end{enumerate}
\end{frame}


\begin{frame}{Razvij funkcijo v Taylorjevo vrsto v okolici to"cke $x_0=0$ in dolo"ci konvergen"cno obmo"cje.}
	\textcolor{blue}{$$f(x)=\frac{1}{4+x^2}$$}
	\begin{itemize}
		\item Izpostavimo $1/4$, $\displaystyle f(x)=\frac{1/4}{1+x^2/4}$.
		\item Izraz predstavlja vsoto geometrijske vrste s kvocientom $q=-(x/2)^2$.
		\item  $\displaystyle\frac{1/4}{1+x^2/4}=
		\frac{1}{4}\left(1-(\frac{x}{2})^2+(\frac{x}{2})^4-\dots\right)=
		\textcolor{blue}{\frac{1}{4}\sum_{n=0}^\infty(-1)^n\left(\frac{x}{2}\right)^{2n}}$.
		\item Kvocient geometrijske vrste mora biti manj kot 1, $|x|<2$.
		\item Na robu v to"ckah $2$ in $-2$ vrsta divergira.  
		\item Konvergen"cno obmo"cje: \textcolor{blue}{$(-2,2)$}. 
	\end{itemize}
\end{frame}

\begin{frame}{Razvij funkcijo $f(x)$ v Taylorjevo vrsto v okolici to"cke $x_0=0$ do "clena z $x^8$ in nari"si graf.}
	\textcolor{blue}{$$f(x)=\frac{x^2}{\sqrt{1-x^2}}$$}
	\begin{itemize}
		\item Uporabimo razvoj v binomsko vrsto.
		\item $\displaystyle\frac{x^2}{\sqrt{1-x^2}}=x^2\left(1-x^2\right)^{-1/2}\rightarrow$.
		\item $\displaystyle x^2\sum_{k=0}^\infty\binom -1/2 k x^{2k}(-1)^k=x^2\left(1+\frac{1}{2}x^2+
		\frac{3}{8}x^4+\frac{5}{16}x^6+\dots\right)$
		\item \textcolor{blue}{$\displaystyle x^2+\frac{1}{2}x^4+ \frac{3}{8}x^6+\frac{5}{16}x^8+\dots$}
		\item Konvergen"cno obmo"cje je $|x|<1$.
	\end{itemize}
\end{frame}

\begin{frame}{Razvij funkcijo $f(x)$ v Taylorjevo vrsto v okolici to"cke $x_0=0$.}
        \textcolor{blue}{$$f(x)=\arctan(x)$$}
        \begin{itemize}
                \item Odvod $\displaystyle f'(x)=\frac{1}{1+x^2}$.
		\item Uporabimo razvoj v geometrijsko vrsto za $f'(x)$.
                \item $\displaystyle\frac{1}{\sqrt{1+x^2}}=1-x^2+x^4-\dots=\sum_{n=0}^\infty(-1)^n x^{2n}$.
		\item Vrsta konvergira za $|x|<1$. 
                \item Vrsto "clenoma integriramo 
		$f(x)=\displaystyle \sum_{k=0}^\infty\frac{(-1)^n x^{2n+1}}{2n+1}+C$
                \item na $|x|<1$. Integracijska konstanta $C=0$, ker je $f(x)=0$.
		\item Vrsta je konvergentna tudi za $x=\pm1$, $\mathcal{D}=[-1,1]$. 
        \end{itemize}

\end{frame}

\begin{frame}{Razvij funkcijo $f(x)$ v Taylorjevo vrsto v okolici to"cke $x_0=0$.}
        \textcolor{blue}{$$f(x)=\int_0^x(e^{-t^2}-1)\frac{dt}{t}$$}
        \begin{itemize}
                \item Odvod $\displaystyle f'(x)=\frac{e^{-x^2}-1}{x}$.
		\item Uporabimo razvoj eksponentne funkcije 
		$\displaystyle\left(1-x^2+\frac{x^4}{2!}-\frac{x^6}{3!}+\dots -1 \right)\frac{1}{x}=
                \sum_{n=1}^\infty(-1)^n\frac{x^{2n-1}}{n!}$.
		\item Vrsta konvergira za vse $x$. 
                \item Vrsto "clenoma integriramo 
		\textcolor{blue}{$f(x)=\displaystyle \sum_{k=1}^\infty\frac{(-1)^n x^{2n}}{n!2n}+C$}.
                \item Integracijska konstanta $C=0$, ker je $\lim_{x\to 0}f(x)=0$.
        \end{itemize}

\end{frame}
\subsection{Vsota vrst} 
\begin{frame}{Se"stej vrsto}
\textcolor{blue}{$$S=\sum_{n=1}^\infty\frac{n}{2^n}$$}
	\begin{itemize}
		\item Vzemimo poten"cno vrsto $f(x)=\displaystyle\sum_{n=1}^\infty n x^n$.
		\item Vrsta konvergira za $|x|<1$. Velja $\displaystyle S=f(\frac{1}{2})$. 
		\item Izpostavimo $x$  in dobimo $\displaystyle f(x)=x\sum_{n=1}^\infty n x^{n-1}$.
		\item Vrsto "clenoma integriramo in se"stejemo geometrijsko vrsto. 
		\item $\displaystyle \int\sum_{n=1}^\infty n x^{n-1}\,dx=\sum_{n=1}^\infty x^n+C=\frac{x}{1-x}+C$.
		\item $\displaystyle f(x)=x\left(\frac{x}{1-x}\right)'=\frac{x}{(1-x)^2}$. 
		\textcolor{blue}{$\displaystyle S=f(\frac{1}{2})=2$}.
	\end{itemize}
\end{frame}

\begin{frame}{Se"stej vrsto}
\textcolor{blue}{$$S=\sum_{n=0}^\infty\frac{(-1)^n}{2n+1}$$}
	\begin{itemize}
		\item Vzemimo poten"cno vrsto 
		$f(x)=\displaystyle\sum_{n=0}^\infty (-1)^n x^{2n}=\frac{1}{1+x^2}$.
		\item Vrsta konvergira za $|x|<1$. 
		Velja $\displaystyle \int\frac{dx}{1+x^2}=\sum_{n=0}^\infty (-1)^n \frac{x^{2n+1}}{2n+1}=\arctan(x)$. 
		\item Vrsta je pogojno konvergentna na robu, v to"ckah $x=\pm1$. 
		\item Vstavimo $x=1$ in dobimo: 
		\item $\displaystyle \sum_{n=0}^\infty \frac{(-1)^n}{2n+1}=\arctan(1)=\frac{\pi}{4}$. 
		\textcolor{blue}{$\displaystyle S=\frac{\pi}{4}$}.
	\end{itemize}
\end{frame}

\begin{frame}{Se"stej vrsto}
\textcolor{blue}{$$S=\sum_{n=1}^\infty\frac{(-1)^{n+1}}{n(n+1)}$$}
	\begin{itemize}
		\item Vzemimo poten"cno vrsto 
		$f(x)=\displaystyle\sum_{n=1}^\infty \frac{x^{n+1}}{n(n+1)}$. $S=f(-1)$. 
		\item Vrsta konvergira za $|x|\le1$. 
		\item Velja $\displaystyle \left(\sum_{n=1}^\infty \frac{x^{n+1}}{n(n+1)}\right)''=
		\sum_{n=1}^\infty x^{n-1}=\frac{1}{1-x}$. 
		\item $f(x)=x+\log|1-x|-x\log|x-1|$.		
		\item Vstavimo $x=-1$ in dobimo: \textcolor{blue}{$\displaystyle S= f(-1)=2\log(2)-1=\log\frac{4}{e}$}. 
	\end{itemize}
\end{frame}
\section{Trigonometrijske vrste}
\begin{frame}{Razvoj funkcije $f(x)$ na $\lbrack -\ell,\ell \rbrack$:}
$\displaystyle f(x) = a_o + \sum_{n=1}^{\infty} \left(a_n \cos \frac{n\pi x}{\ell} + b_n
                \sin\frac{n\pi x}{\ell} \right)$.
\begin{itemize}
\item Splo"sna funkcija:
	\begin{enumerate}
		\item $\displaystyle a_o = \frac{1}{2\ell} \displaystyle{ \int_{-\ell}^{\ell}} f(x) dx$,
		\item $a_n = \frac{1}{\ell} \displaystyle{ \int_{-\ell}^{\ell}} f(x) \cos\frac{n\pi x}{\ell} dx$,
		\item $b_n = \frac{1}{\ell} \displaystyle{ \int_{-\ell}^{\ell}} f(x) \sin\frac{n\pi x}{\ell} dx$.
	\end{enumerate}
\item Soda funkcija: 
	\begin{enumerate}
		\item $a_o = \frac{1}{\ell} \int_{0}^{\ell} f(x) dx$,
		\item $a_n = \frac{2}{\ell} \int_{0}^{\ell} f(x) \cos\frac{n\pi x}{\ell} dx$,
		\item $b_n=0$.
	\end{enumerate}
\item Liha funkcija:	
	\begin{enumerate}
		\item $a_n=0$
		\item $b_n = \frac{2}{\ell}\int_0^{\ell} f(x) \sin\frac{n\pi x}{\ell} dx$	
	\end{enumerate}	
\end{itemize}
\end{frame}
\subsection{Razvoj funkcij v trigonometrijsko vrsto}
\begin{frame}{Razvij funkcijo $f(x)$ na intervalu $[-\pi,\pi]$.}
\textcolor{blue}{$\displaystyle f(x)=1+\frac{x}{|x|}$}\\[2mm]
\begin{itemize}
	\item $\displaystyle a_0=\frac{1}{2\pi}\int_0^\pi 2 \,dx=1,\quad a_n=0, n>0$.
	\item $\displaystyle b_n=\frac{1}{\pi}\int_0^\pi 2  \sin(n x)\,dx= 2\frac{1-(-1)^n}{\pi n}$.
	\item $\displaystyle b_{2n}=0,\quad b_{2n-1}=\frac{4}{\pi(2n-1)}$.
	\item \textcolor{blue}{$\displaystyle f(x)=1+\frac{4}{\pi}\sum_{n=1}^\infty\frac{\sin((2n-1)x)}{2n-1}$}.
\end{itemize}
\end{frame}

\begin{frame}{Preveri na gornjem primeru,}
da je vsota vrste v to"cki nezveznosti $x_0$ funkcije $f(x)$ enaka 
$\displaystyle\frac{1}{2}\left(\lim_{x\searrow x_0}f(x)+\lim_{x\nearrow x0}f(x)\right)$.\\[2mm]
\begin{itemize}
	\item To"cka nezveznosti je $\displaystyle x_0=0$.
	\item $\displaystyle \lim_{x\searrow 0}\left(1+\frac{x}{|x|}\right)=1+1=2$.
	\item $\displaystyle \lim_{x\nearrow 0}\left(1+\frac{x}{|x|}\right)=1-1=0$.
	\item $\displaystyle\frac{1}{2}\left(\lim_{x\searrow 0}f(x)+\lim_{x\nearrow 0}f(x)\right)=1$.
	\item \textcolor{blue}{
	$\displaystyle \left.1+\frac{4}{\pi}\sum_{n=1}^\infty\frac{\sin((2n-1)x)}{2n-1}\right|_{x=0}=1$}.
\end{itemize}
\end{frame}

\begin{frame}{S pomo"cjo gornjega razvoja izra"cunaj vsoto vrste.}
\textcolor{blue}{$\displaystyle \sum_1^\infty\frac{(-1)^{n+1}}{2n-1}$}.\\[2mm]
\begin{itemize}
	\item $\displaystyle f(x)=1+\frac{4}{\pi}\sum_{n=1}^\infty\frac{\sin((2n-1)x)}{2n-1}$.
	\item $\displaystyle f(\frac{\pi}{4})=1+\frac{4}{\pi}\sum_{n=1}^\infty\frac{(-1)^{n+1}}{2n-1}$.
	\item $\displaystyle 2=1+\frac{4}{\pi}\sum_{n=1}^\infty\frac{(-1)^{n+1}}{2n-1}$.
	\item \textcolor{blue}{
	$\displaystyle\frac{\pi}{4}=\sum_{n=1}^\infty\frac{(-1)^{n+1}}{2n-1}=
	1-\frac{1}{3}+\frac{1}{5}-\frac{1}{7}+\dots$}.
\end{itemize}
\end{frame}

\begin{frame}{Razvij funkcijo $f(x)$ na intervalu $[-1,1]$.}
\textcolor{blue}{$\displaystyle f(x)=1-|x|$}.\\[2mm]
\begin{itemize}
	\item Funkcija je soda, $\displaystyle b_n=0,\quad n\in \mathbb{N}$.
	\item $\displaystyle a_0=\int_0^1(1-x)\,dx=\frac{1}{2}$.
	\item $\displaystyle a_n=2\int_0^1 (1-x)\cos(n \pi x)\,dx=\frac{1-(-1)^n}{\pi^2n^2}$.
	\item \textcolor{blue}{$\displaystyle f(x)=\frac{1}{2}+\frac{2}{\pi^2}
	\sum_{n=1}^\infty\frac{\cos((2n-1)\pi x)}{(2n-1)^2}$}.
\end{itemize}
\end{frame}

\begin{frame}{S pomo"cjo gornjega razvoja izra"cunaj vsoto vrste.}
\textcolor{blue}{$\displaystyle \sum_{n=1}^\infty\frac{1}{(2n-1)^2}$}.\\[2mm]
\begin{itemize}
        \item $\displaystyle f(x)=\frac{1}{2}+\frac{2}{\pi^2}
        \sum_{n=1}^\infty\frac{\cos((2n-1)\pi x)}{(2n-1)^2}$.
        \item $\displaystyle f(0)=1=\frac{1}{2}+\frac{2}{\pi^2}\sum_{n=1}^\infty\frac{1}{(2n-1)^2}$.
        \item \textcolor{blue}{
        $\displaystyle\frac{\pi^2}{4}=\sum_{n=1}^\infty\frac{1}{(2n-1)^2}$}.
\end{itemize}
\end{frame}

\begin{frame}{Razvij funkcijo $f(x)$ na intervalu $[-1,1]$.}
\textcolor{blue}{$\displaystyle f(x)=x$}.\\[2mm]
\begin{itemize}
	\item Funkcija je liha, $\displaystyle a_n=0,\quad n\in \mathbb{N}\cup\{0\}$.
	\item $\displaystyle b_n=2\int_0^1 x\sin(n \pi x)\,dx=2\frac{(-1)^{n+1}}{\pi n}$.
	\item \textcolor{blue}{$\displaystyle f(x)=\frac{2}{\pi}+
	\sum_{n=1}^\infty\frac{(-1)^{n+1}\sin(n\pi x)}{n}$}.
\end{itemize}
\end{frame}
\begin{frame}{Preveri na gornjem primeru,}
da je vsota vrste v kraji"s"cih intervala $[-\ell, \ell]$ enaka 
$\displaystyle\frac{1}{2}\left(\lim_{x\to -\ell}f(x)+\lim_{x\to \ell}f(x)\right)$.\\[2mm]
\begin{itemize}
	\item Vrednost $\ell=1$.
	\item $\displaystyle \lim_{x\to -1} x =-1$.
	\item $\displaystyle \lim_{x\to 1} x = 1$.
	\item $\displaystyle\frac{1}{2}\left(\lim_{x\to -1}f(x)+\lim_{x\to 1} x \right)=0$.
	\item \textcolor{blue}{$\displaystyle \left.\frac{2}{\pi}\sum_{n=1}^\infty
	\frac{(-1)^{n+1}\sin(n\pi x)}{n}\right|_{x=\pm1}=0$}.
\end{itemize}
\end{frame}

\begin{frame}{Razvij funkcijo $f(x)$ na intervalu $[-1,1]$.}
\textcolor{blue}{$\displaystyle f(x)=x^2$}.\\[2mm]
\begin{itemize}
        \item Funkcija je soda, $\displaystyle b_n=0,\quad n\in \mathbb{N}$.
	\item $\displaystyle a_0=\frac{1}{\pi}\int_0^\pi x^2\,dx=\frac{\pi^2}{3}$.
        \item $\displaystyle a_n=\frac{2}{\pi}\int_0^\pi x^2\cos(n x)\,dx=\frac{4(-1)^n}{n^2}$.
        \item \textcolor{blue}{$\displaystyle f(x)=\frac{\pi^2}{3}+4
        \sum_{n=1}^\infty\frac{(-1)^{n}\cos(n x)}{n^2}$}.
\end{itemize}
\end{frame}

\begin{frame}{S pomo"cjo gornjega razvoja izra"cunaj vsoto vrste.}
\textcolor{blue}{$\displaystyle \sum_1^\infty\frac{1}{n^2}$}.\\[2mm]
\begin{itemize}
	\item $\displaystyle f(x)=\frac{\pi^2}{3}+4\sum_{n=1}^\infty\frac{(-1)^{n}\cos(n x)}{n^2}$.
	\item $\displaystyle f(\pi)=\pi^2=\frac{\pi^2}{3}+4\sum_{n=1}^\infty\frac{(-1)^{n}(-1)^n}{n^2}$.
	\item $\displaystyle \frac{2\pi^2}{3}=4\sum_{n=1}^\infty\frac{1}{n^2}$.
	\item \textcolor{blue}{
	$\displaystyle\frac{\pi^2}{6}=\sum_{n=1}^\infty\frac{1}{n^2}$}.
\end{itemize}
\end{frame}

\end{document}

