Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
\textheight=22cm
\textwidth=18cm
\topmargin=-1cm
\oddsidemargin=-1cm
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{titlesec}
%%%%%%%%%%%%%%%%%%%% 4 subtitulos
\titleclass{\subsubsubsection}{straight}[\subsection]
\newcounter{subsubsubsection}[subsubsection]
\renewcommand\thesubsubsubsection{\thesubsubsection.\arabic{subsubsubsection}}
\renewcommand\theparagraph{\thesubsubsubsection.\arabic{paragraph}} % optional;
useful if paragraphs are to be numbered
\titleformat{\subsubsubsection}
{\normalfont\normalsize\bfseries}{\thesubsubsubsection}{1em}{}
\titlespacing*{\subsubsubsection}
{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
\makeatletter
\renewcommand\paragraph{\@startsection{paragraph}{5}{\z@}%
{3.25ex \@plus1ex \@minus.2ex}%
{-1em}%
{\normalfont\normalsize\bfseries}}
\renewcommand\subparagraph{\@startsection{subparagraph}{6}{\parindent}%
{3.25ex \@plus1ex \@minus .2ex}%
{-1em}%
{\normalfont\normalsize\bfseries}}
\def\toclevel@subsubsubsection{4}
\def\toclevel@paragraph{5}
\def\toclevel@paragraph{6}
\def\l@subsubsubsection{\@dottedtocline{4}{7em}{4em}}
\def\l@paragraph{\@dottedtocline{5}{10em}{5em}}
\def\l@subparagraph{\@dottedtocline{6}{14em}{6em}}
\makeatother
\setcounter{secnumdepth}{4}
\setcounter{tocdepth}{4}
%%%%%%%%%%%%%%%%%%%
\usepackage[utf8]{inputenc}
\renewcommand{\baselinestretch}{1.5}%interlineado
\title{ANALISIS NUMERICO}
\author{}
\date{}
\begin{document}
%\maketitle
\tableofcontents %indice
\newpage
%indice nueva pagina
\section{DIFERENCIACI\'ON}
\subsection{Diferenciaci\'on usando Aproximaciones}
\subsubsection{Diferenciaci\'on Num\'erica}
\textbf{EL TEOREMA DE TAYLOR}
Teorema de taylor y su f\'ormula la serie de taylor es de gran valor en el e
studio de los metodos numericos,en esencia ,la serie de Taylor proporciona un me
dio para predecir el valor de una funci\'on en un punto en terminos del valor de
y $x_{i}$.
un tama~no
(1) como:
\frac{f^{'
Donde:
\begin{equation}
R_{n}=\frac{f^{(x+i)}(\xi)}{n+1}(h)^{n+1}
\end{equation}\\\\\\
\textbf{DIFERENCIACI\'ON NUM\'ERICA}
Truncando la serie de Taylor, ecuacion (3) despu\'es del t\'ermino con l
a primera derivada, se obtiene:
\begin{equation}
f(x_{i+1})=f(x_{i}) + f^{'}(x_{i})h + R
\end{equation}
De la acuaci\'on anterior se despeja la primera derivada obteniendo:
\begin{equation*}
f^{'}(x_{i})= \frac{f(x_{i+1}) - f(x_{i})}{h} - \frac{R}{h}
\end{equation*}\\
Donde:
\begin{equation*}
\frac{R}{h}=\frac{f^{''}(\xi)h}{2!}
\end{equation*}\\
o:
\begin{equation*}
\frac{R}{h}=O(h)
\end{equation*}\\
donde la nomenclatura
\begin{equation*}
O(h)
\end{equation*}\\
significa que el error de truncamiento es de orden h,es decir, el error es propo
rcional al incremento h elevado a la 1,aunque esta aproximaci\'on no implica nad
a en relaci\'on con la magnitud de derivadas que multiplican h ,es extremadament
e \'util para evaluar el error comparativo de los m\'etodos num\'ericos que se b
asan en explicaciones de la serie de Taylor, ejemplo , si el error es o(h) y el
incremento se reduce a la mitad , entonces el error tambi\'en se reducir\'a la m
itad ,por otro lado , si el error es o($h^{2}$)y el incremento se reduce a mitad
,entonces el error se reducir\'a a una cuarte parte.\\
Por lo tanto, la estimaci\'on de la derivada, tiene un error de
orden h,en otras palabras el error en nuestra aproximaci\'on de
r\'ia ser proporcional al tama\~no del incremento, entonces, si
la mitad se esperar\'ia que el error de la derivada se reduzca
truncamiento de
la derivada debe
este se divide a
a la mitad.\\
\end{center}
Figura 1b: La gr\'afica de aproximaciones con diferencias finitas divididas
de la primera derivada hacia atras .
\begin{center}
\includegraphics[width=0.6\textwidth]{./imagenes/grafico3.JPG}
\end{center}
Figura 1c: La gr\'afica de aproximaciones con diferencias finitas divididas
de la primera derivada centrales
\begin{equation}
f(x_{i-1})=f(x_{i}) - f^{'}(x_{i})h + \frac{f^{''}(x_{i})}{2!}h^{2} - ..... + \f
rac{f^{n}(x_{i})}{n!}h^{n} + R_{n}
\end{equation}\\
truncando la ecuaci\'on despues de la primera derivada y reordenando los t\'ermi
nos se obtiene
\begin{equation}
f^{'}(x_{i})= \frac{f(x_{i}) - f(x_{i-1} }{h}= \frac{\Delta f_{1}}{h}
\end{equation}\\
Donde el error es o(h), y a $\Delta f_{i}$ se le conoce como primera dif
erencia dividida hacia atr\'as .V\'ease (figura 1b) para una representaci\'on gr
\'afica.\\\\\\
\textbf{Aproximaci\'on a la primera derivada con diferencias centradas}
Una tercera forma de aproximar la primera derivada consiste en restar la
ecuacion 8 de la expresi\'on de la serie de Taylor hacia adelante:
\begin{equation}
f(x_{i-1})= f(x_{i}) + f^{'}(x_{i})h + \frac{f(2)(x_{i})}{2!}h^{2} + ...
\end{equation}\
Para obtener :
\begin{equation}
f(x_{i+1})= f(x_{i}) + 2f^{'}(x_{i})h + \frac{f(3)(x_{i})}{3!}h^{3} + ...
\end{equation}\
en donde se despeja
\begin{equation}
f(x_{i+1})= \frac{f(x_{i+1}) - f(x_{i-1})}{2h} - \frac{f(3)(x_{i})}{3!}h^{2} - .
..
\end{equation}\
\'o
\begin{equation}
f^{'}(x)= \frac{f(x_{i+1}) - f(x_{i-1})}{2h} - O(h^{2})
\end{equation}\
La ecuaci\'on 13 es una representaci\'on de las diferencias centradas de
la primera derivada .Observe el error de truncamiento es del orden de $h^{2}$ e
n contraste con las aproximaciones hacia delante y hacia atr\'as que fueron del
orden de h.h por lo tanto ,el an\'alisis de la serie de Taylor ofrece la informa
ci\'on pr\'actica de que la diferencia centrada es una representaci\'on mas exac
ta de la derivada (figura 1c)por ejemplo si disminuimos el tama\~no del incremen
to a la mitad, usando diferencias hacia atras o hacia delante ,el error de trunc
amiento se reducira aproximadamente a la mitad
;mientras que con diferencias centradas el error se reducira a la cuarta parte.\
\\\
\end{equation*}
\begin{equation*}
x_{i+1}=0.75
=>
\end{equation*}\
f(x_{i+1})=0.63632813
Estos valores sirven para calcular las diferenciales divididas hacia adelante(ec
uacion 6).
\begin{equation*}
f^{'}(0.5)=\frac{0.63632813 -0.925}{0.25}= -1.155
\end{equation*}\
diferenciales divididas hacia atras(ecuacion 9).
\begin{equation*}
f^{'}(0.5)=\frac{0.925 -1.10351563}{0.25}= -0.714
\end{equation*}\
diferenciales divididas centrada(ecuacion 13).
\begin{equation*}
f^{'}(0.5)=\frac{0.63632813 -1.10351563}{0.5}= -0.934
\end{equation*}\
Para ambos tama\~nos de paso ,la aproximaci\'on en diferencias centrales es mas
exacta que las diferencias hacia adelante y hacia atr\'as.\\
\begin{center}
\begin{tabular}{|c|c|c|c|}
\hline
------- & Hacia adelante O(h) & Hacia atr\'as O(h) & Centradas O($h^{2}$)\\
\hline
Estimaci\'on & -1.155 & -0.714 & -0.934\\
\hline
\end{tabular}\\\
\end{center}
En las f\'ormulas anteriores ,las estimaciones tenian errores que fueron O(h);es
decir los errores son proporcionales al cuadrado del tama\~no de paso .Ese nive
l de exactitud se debe al n\'umero de terminos de la serie de Taylor que se util
izaron durante la deducci\'on de esas formulas.Ahora se muestran f\'ormulas de m
ayor exactitud utilizando mas terminos.\\\\
\subsection{Diferenciaci\'on usando Interpolaciones}
\subsubsection{Formulas para la Primera Derivada}
Las f\'ormulas mas utilizadas en la pr\'actica se buscan de forma que sean exact
as para polinomios de grado menor o igual que n (es decir f\'ormulas de orden de
exactitud n). Una manera natural de construir f\'ormulas exactas de orden n, co
nsiste en recordar que el polinomio pn(x) que interpola en el sentido de Lagrang
e y sobre un soporte de (n+1) puntos a una funcion f(x) que sea polin\'omica de
grado menor o igual que n coincide con dicha funci\'on. Por ello es equivalente
derivar la funci\'on polinomica f(x) que derivar su polinomio interpolador pn(x
). A todas las f\'ormulas de derivaci\'on que se obtienen derivando la expresi\'
on del polinomio interpolador de Lagrange se las denomina f\'ormulas de derivaci
\'on de tipo interpolatorio.\\
\textbf{F\'ormula con dos puntos de soporte:}\
Si se considera el soporte [x0 , x1] y una funcion f(x) de la que se conoce su v
%\end{center}
\begin{center}
$L_{0}x=\displaystyle\prod_{j=1}^{1}\frac{x - x_{j}}{x_{i} - x_{j}}= \frac{x - x
_{1}}{x_{0} - x_{1}}= \frac{x - 0}{-2 - 0}=\frac{x}{-2}$\\
$L_{1}x=\displaystyle\prod_{j=1}^{1}\frac{x - x_{j}}{x_{i} - x_{j}}= \frac{x - x
_{1}}{x_{1} - x_{0}}= \frac{x + 2}{0 + 2}=\frac{x+2}{2}$\\
\end{center}\
Reemplazando en formula interpoladora de Lagrange:
\begin{equation*}
f(x)=\frac{x}{-2}.(1) + \frac{x + 2}{2}.(-1)= -x -1
\end{equation*}\\\
\begin{equation*}
f^{'}(x)=-1
\end{equation*}\\
\textbf{CODIGO EN MATLAB}\
\begin{center}
\includegraphics{./imagenes/ejercicio1.png}
\end{center}\
\newpage
\textbf{RESULTADO EN MATLAB}\\
\begin{center}
\includegraphics{./imagenes/ejercicio1-resultado.png}
\end{center}\
\newpage
\subsubsubsection{ Utilizando Tres Puntos de Soporte }
Hallar la primera derivada:
\begin{center}
\begin{tabular}{|c|c|c|c|}
\hline
i & 0 & 1 & 2\\
\hline
x & -1 & 0 & 1\\
\hline
f($x_{i}$) & -2 & 2 & 1\\
\hline
\end{tabular}\\\
\end{center}\
\begin{center}
\textbf{Soluci\'on}
\end{center}\
Paso 1: De la f\'ormula interpoladora de Lagrange se tiene:
\begin{equation*}
P(x)=f[x_{0}] + f[x_{0},x_{1}].(x - x_{0}) + f[x_{0},x_{1},x_{2}].(x - x_{0})(x
- x_{1})
\end{equation*}\
Derivando:
\begin{equation*}
f^{'}(x)=f[x_{0},x_{1}] + f[x_{0},x_{1},x_{2}].((x - x_{0}) + (x - x_{1}))
\end{equation*}\
Donde:
$f[x_{0}]=-2$\\
$f[x_{0},x_{1}]=\Delta[x_{0}]=4$\\
$f[x_{0},x_{1},x_{2}]=\Delta^{2}[x_{0}]=\frac{-7}{4}$\\
Paso 2: Reemplazando los datos:
$f^{'}(x)= 4 - \frac{-7}{2}.(x+1) + (x - 0)= -7x + \frac{1}{2}$\\
Un numero para el que se desea derivar: 1\\
$f^{'}(x)=-7.1 + \frac{1}{2}= - 6.5$\\
Paso 3: Comprobando en f\'ormula interpoladora de Newton:\\
$f[x_{0}]=-2$\\
$f[x_{0},x_{1}]=\Delta[x_{0}]=\frac{f(x_{1}) - f(x_{0})}{x_{1} - x_{0}}= \frac{2
- (-2)}{0 - (-1)}= 4$\\
$f[x_{0},x_{1}]=\frac{f(x_{2}) - f(x_{1})}{x_{2} - x_{1}}= \frac{1 - 0}{1 - 0}=
-3$\\
$f[x_{0},x_{1},x_{2}=\Delta^{2}[x_{0}]=\frac{f[x_{1},x_{2}] - f[x_{0},x_{1}]}{x_
{2} - x_{1}}= \frac{-3 - 4}{1 - (-1)}= \frac{-7}{2}$\\
Reemplazando en f\'ormula interpoladora de Newton:\\
$f(x)= -2 + 4(x - (-1)) - \frac{-7}{2}(x + 1)(x - 0)= -7x + \frac{1}{2}$\\
$ f^{'}(x)= -6.5$\\\\
\newpage
\textbf{CODIGO EN MATLAB}\\
\begin{center}
\includegraphics{./imagenes/ejercicio2.png}
\end{center}\
\newpage
\textbf{RESULTADO EN MATLAB}\\
\begin{center}
\includegraphics{./imagenes/ejercicio2-resultado.png}
\end{center}\
\subsubsection{Formulas para la Segunda Derivada}
Se denomina f\'ormula de derivaci\'on num\'erica de tipo interpolatorio para apr
oximar derivadas de orden k a cualquier
formula obtenida derivando una vez la expresion del polinomio interpolador const
ruido sobre un soporte de (n+1) puntos distintos.
NOTA: Si el orden de derivaci\'on que fuese superior o igual al n\'umero de punt
os (n+1) las f\'ormulas de tipo interpolatorio
correspondientes se reduciran a f(k(x*) = 0, pues la derivada de orden k de un p
olinomio de grado menor o igual que n, si n es inferior a k, es nula. Por dicho
$f[x_{0},x_{1}]=\Delta[x_{0}]=1$\\
$f[x_{0},x_{1},x_{2}]=\Delta^{2}[x_{0}]= \frac{-3}{2}$\\
Paso 2:Reemplazando los datos para hallar la segunda derivada:\\
$p^{''}_{2}(x)=2x -\frac{-3}{2}$\\
Sea ahora el soporte de cuatro puntos $x_{0} < x_{1} < x_{2} < x_{3}$ y consider
emos un punto x perteneciente al intervalo
$[x_{0},x_{3}]$. Sea ademas f(x) una funci\'on de la que se conocen sus valores
en los puntos del soporte. El polinomio interpolador de Lagrange de f(x) sobre e
ste soporte puede expresarse, utilizando la f\'ormula de Newton en diferencias
divididas, mediante:\\
$p_{3}(x)=f[x_{0}] +f[x_{0},x_{1}](x - x_{0}) + f[x_{0},x_{1},x_{2}](x - x_{0})(
x - x_{1}) + f[x_{0},x_{1},x_{2},x_{3}](x - x_{0})(x - x_{1})(x - x_{2}) $\\
por lo que:
$p^{'}_{3}(x)=f[x_{0},x_{1}](x - x_{0}) + f[x_{0},x_{1},x_{2}](2x - x_{0} -x_{1}
) + f[x_{0},x_{1},x_{2},x_{3}](3x^{2} - 2xx_{0} - 2xx_{1} - 2xx_{2} +x_{0}.x_{1}
+ x_{0}.x_{2} + x_{1}.x_{2}) $\\
$p^{''}_{3}(x)=2f[x_{0},x_{1},x_{2}] + f[x_{0},x_{1},x_{2},x_{3}](6x - 2x_{0} 2x_{1} - 2x_{2}) $\\
lo que nos conduce a que la f\'ormula de derivaci\'on num\'erica de tipo interpo
latorio con este soporte esta dada por:\\
$f^{''}x^{*}= p^{''}_{3}(x^{*})= 2f[x_{0},x_{1},x_{2}] + f[x_{0},x_{1},x_{2},x_{
3}](6x - 2x_{0} - 2x_{1} - 2x_{2})$\\
\newpage
\subsubsubsection{Utilizando Cuatro Puntos de Soporte }
Hallar la segunda derivada
\begin{center}
\begin{tabular}{|c|c|c|c|c|}
\hline
i & 0 & 1 & 2 & 3\\
\hline
x & 2 & 1 & 3 & 4\\
\hline
f($x_{i}$) & 5 & -1 & -2 & 2\\
\hline
\end{tabular}\\\
\end{center}\
Paso 1: De la formula interpoladora de Newton se tiene:\\
$p_{3}(x)=f[x_{0}] +f[x_{0},x_{1}](x - x_{0}) + f[x_{0},x_{1},x_{2}](x - x_{0})(
x - x_{1}) + f[x_{0},x_{1},x_{2},x_{3}](x - x_{0})(x - x_{1})(x - x_{2}) $\\
Reemplazando para obtener el polinomio:
$p_{3}x= 4^{3} - \frac{61x^{2}}{2} + \frac{139x}{2} -44 $
Derivando:\\
\hline
f($x_{i}$) & -2 & 2 & -1 & 7\\
\hline
\end{tabular}\\\
\end{center}\
Paso 1: De la formula interpoladora de Newton se tiene:\\
$p_{3}(x)=f[x_{0}] +f[x_{0},x_{1}](x - x_{0}) + f[x_{0},x_{1},x_{2}](x - x_{0})(
x - x_{1}) + f[x_{0},x_{1},x_{2},x_{3}](x - x_{0})(x - x_{1})(x - x_{2}) $\\
Reemplazando para obtener el polinomio:
$p_{3}x= 3x^{3} - 3.5x^{2} -2.5x + 2$
Derivando:\\
$p^{'}_{3}(x)=f[x_{0},x_{1}] + f[x_{0},x_{1},x_{2}](2x - x_{0} - x_{1})$\\
$p^{''}_{3}(x)=2f[x_{0},x_{1},x_{2}] f[x_{0},x_{1},x_{2},x_{3}](6x - 2x_{0} - 2x
_{1} - 2x_{2})$\\
$p^{''}_{3}(x)=6f[x_{0},x_{1},x_{2},x_{3}]$
Donde:
$f[x_{0}]=-2$\\
$f[x_{0},x_{1}]=\Delta[x0]=4$\\
$f[x_{0},x_{1},x_{2}]=\Delta^{2}[x0]= -3.5$\\
$f[x_{0},x_{1},x_{2},x_{3}]=\Delta^{3}[x_{0}]= 3$\\
Paso 2:Reemplazando los datos para hallar la tercera derivada:\\
$p^{"}_{3}= 6 x 3$\\
$p^{"}_{3}= 18$\\\\\\\\
\newpage
\section{F\'ORMULAS INTERPOLATORIAS DE DERIVACI\'ON}
\subsection{Interpolaci\'on de Lagrange}
\subsubsection{M\'etodo del Polinomio de Lagrange en MATLAB}\
\begin{center}
\includegraphics{./imagenes/lagrange-simple.png}
\end{center}\
\subsubsection{Ejemplo Resuelto 1}
\begin{center}
$P(x)=\displaystyle\sum_{i=0}^{n}L_{i}(x)f(x_{i})$\\
\end{center}\
\begin{center}
$L_{i}(x)=\displaystyle\prod_{j=0}^{n}\frac{x - x_{j}}{x_{i} - x_{j}}, \hspace{1
cm} i \not= j \hspace{1cm} \forall i=0,1,....,n $
\end{center}
\textbf{Calcular el Polinomio de Lagrange usando los siguientes datos}
\begin{center}
\begin{tabular}{|c|c|c|c|c|}
\hline
i & 0 & 1 & 2 & 3\\
\hline
f($x_{i}$ & 1 & -1 & 3 & -2\\
\hline
x & -2 & 0 & 2 & 4\\
\hline
\end{tabular}\\\
\end{center}\
Vemos que n=4 entonces el grado (n-1) seria igual a 3. Entonces
\begin{center}
$P_{3}(x)=\displaystyle\sum_{i=0}^{3}L_{i}(x)f(x_{i})$\\
\end{center}\
Hallando los Coecientes de Lagrange:
\begin{center}
$L_{0}(x)=\displaystyle\prod_{j=0 \wedge j\not= 0}^{3}\frac{x - x_{j}}{x_{i} - x
_{j}}=(\frac{x - x_{1}}{x_{0} - x_{1}})(\frac{x - x_{2}}{x_{0} - x_{2}})(\frac{x
- x_{3}}{x_{0} - x_{3}})=(\frac{x}{-2})(\frac{x - 2}{-4})(\frac{x - 4}{-6})$
\end{center}
\begin{equation*}
L_{0}(x)=\frac{-x^{3} + 6x^{2} - 8x}{48}
\end{equation*}
\begin{center}
$L_{1}(x)=\displaystyle\prod_{j=0 \wedge j\not= 0}^{3}\frac{x - x_{j}}{x_{i} - x
_{j}}=(\frac{x - x_{0}}{x_{1} - x_{1}})(\frac{x - x_{2}}{x_{1} - x_{2}})(\frac{x
- x_{3}}{x_{1} - x_{3}})=(\frac{x + 2}{2})(\frac{x - 2}{-2})(\frac{x - 4}{-4})$
\end{center}
\begin{equation*}
L_{1}(x)=\frac{x^{3} - 4x^{2} - 4x + 16}{16}
\end{equation*}
\begin{center}
$L_{2}(x)=\displaystyle\prod_{j=0 \wedge j\not= 0}^{3}\frac{x - x_{j}}{x_{i} - x
_{j}}=(\frac{x - x_{0}}{x_{2} - x_{0}})(\frac{x - x_{1}}{x_{2} - x_{1}})(\frac{x
- x_{3}}{x_{2} - x_{3}})=(\frac{x + 2}{4})(\frac{x}{2})(\frac{x - 4}{-2})$
\end{center}
\begin{equation*}
L_{2}(x)=\frac{-x^{3} + 2x^{2} + 8x}{16}
\end{equation*}
\begin{center}
$L_{3}(x)=\displaystyle\prod_{j=0 \wedge j\not= 0}^{3}\frac{x - x_{j}}{x_{i} - x
_{j}}=(\frac{x - x_{0}}{x_{3} - x_{0}})(\frac{x - x_{1}}{x_{3} - x_{1}})(\frac{x
- x_{2}}{x_{3} - x_{2}})=(\frac{x + 2}{4})(\frac{x}{2})(\frac{x - 4}{-2})$
\end{center}
\begin{equation*}
L_{3}(x)=\frac{x^{3} - 4x}{48}
\end{equation*}\
Hallando el Polinomio Interpolador de Lagrange
\begin{equation*}
P_{3}(x)=L_{0}(x)f(x_{0}) + L_{1}(x)f(x_{1}) + L_{2}(x)f(x_{2}) + L_{3}(x)f(x_{3
})
\end{equation*}
\begin{equation*}
P_{3}(x)=(\frac{-x^{3} + 6x^{2} - 8x}{48})f(x_{0}) + (\frac{x^{3} - 4x^{2} - 4x
+ 16}{16})f(x_{1}) + (\frac{-x^{3} + 2x^{2} + 8x}{16})f(x_{2}) + (\frac{x^{3} 4x}{48})f(x_{3})
\end{equation*}
\begin{equation*}
P_{3}(x)=(\frac{-x^{3} + 6x^{2} - 8x}{48})(1) + (\frac{x^{3} - 4x^{2} - 4x + 16}
{16})(-1) + (\frac{-x^{3} + 2x^{2} + 8x}{16})(3) + (\frac{x^{3} - 4x}{48})(-2)
\end{equation*}
\begin{equation*}
P_{3}(x)=\frac{-15^{3} + 36x^{2} + 84x -48}{48}
\end{equation*}
\newpage
\subsubsubsection{Resultado usando MATLAB}
\begin{center}
\includegraphics{./imagenes/lagrange-simple-resultado.png}
\end{center}\
\newpage
\subsubsection{Ejemplo Resuelto 2}\
\textbf{Calcular el Polinomio de Lagrange usando los siguientes datos:}\
\begin{center}
\begin{tabular}{|c|c|c|c|}
\hline
x & -2 & 0 & 1\\
\hline
y & -3 & -1 & 2\\
\hline
\end{tabular}\\\
\end{center}\
Vemos que n=3 entonces el grado (n-1) seria igual a 2. Entonces:
\begin{center}
$P_{2}(x)=\displaystyle\sum_{i=0}^{2}L_{i}(x)f(x_{i})$\\
\end{center}\
\begin{center}
$L_{i}(x)=\displaystyle\prod_{j=0}^{2}(\frac{x - x_{j}}{x_{i} - x_{j}}), \hspace
{1cm} (i \not= j) \hspace{1cm} {\forall i=0,1,....,n} $
\end{center}\
Hallando los Coecientes de Lagrange:
\begin{center}
$L_{0}(x)=\displaystyle\prod_{j=0 \wedge j\not= 0}^{2}\frac{x - x_{j}}{x_{i} - x
_{j}}=(\frac{x - x_{1}}{x_{0} - x_{1}})(\frac{x - x_{2}}{x_{0} - x_{2}})=(\frac{
\]\
\[
f[x_i,x_{i+1},....,x_{i+j-1},x_{i+j}]=\frac{f[x_{i+1},....,x_{i+j-1},x_{i+j}]-f[
x_i,x_{i+1},....,x_{i+j-1}]}{x_{i+j}-x_i}, f[x_i]=f(x_i)
\]\\
\textbf{Calcular el Polinomio Interpolador de Newton usando los siguientes datos
:}
\begin{center}
\begin{tabular}{ |c |c |c |c |c |c}
\hline
i & 0 & 1 & 2 & 3\\
\hline
$x_i$ & 2 & 1 & 3 & -1\\
\hline
$f(x_{i})$ & 4 & -2 & 1 & 2\\
\hline
\end{tabular}
\end{center}\
Vemos que la tabla no esta ordenada asi que procedemos a ordenarla:\\
\begin{center}
\begin{tabular}{ |c |c |c |c |c |c}
\hline
i & 0 & 1 & 2 & 3\\
\hline
$x_i$ & -1 & 1 & 2 & 3\\
\hline
$f(x_{i})$ & 2 & -2 & 4 & 1\\
\hline
\end{tabular}
\end{center}
Vemos que n=4 entonces el grado (n-1) seria igual a 3.\
Entonces:
\begin{center}
\begin{tabular}{ |c |c |c |c |c |c |c}
\hline
i & $x_i$ & $f(x_{i})$ & $\Delta$ & $\Delta^{2}$ & $\Delta^{3}$\\
\hline
0 & -1 & 2 & $=\frac{-2-2}{1-(-1)}=-2$ & $=\frac{6-(-2)}{2-(-1)}=\frac{8}{3}$ &
$=\frac{-9/2-8/3}{3-(-1)}=-\frac{43}{24}$\\
\hline
1 & 1 & -2 & $=\frac{4-(-2)}{2-1}=6$ & $=\frac{-3-6}{3-1}=-\frac{9}{2}$ & -\\
\hline
2 & 2 & 4 & $=\frac{1-4}{3-2}=-3$ & - & -\\
\hline
3 & 3 & 1 & - & - & -\\
\hline
\end{tabular}
\end{center}
\[
f[x_0]=f(x_0)=2
\]\
\[
f[x_0,x_1]=\Delta(x_0)=-2
\]
\[
f[x_0,x_1,x_2]=\Delta^{2}(x_0)=\frac{8}{3}
\]
\[
f[x_0,x_1,x_2,x_3]=\Delta^{3}(x_0)=-\frac{43}{24}
\]\\
\[
P_{3}(x)=f[x_0]+f[x_0,x_1](x-x_0)+f[x_0,x_1,x_2](x-x_0)(x-x_1)+f[x_0,x_1,x_2,x_3
](x-x_0)(x-x_1)(x-x_2)
\]\
\[
P_{3}(x)=2+(-2)(x+1)+\frac{8}{3}(x+1)(x-1)+(-\frac{43}
{24})(x+1)(x-1)(x-2)
\]\
\[
P_{3}(x)=-\frac{43}{24}x^3+\frac{75}{12}x^2-\frac{5}{24}x-\frac{25}{4}
\]\
\newpage
\subsubsubsection{Resultado usando MATLAB}\
\begin{center}
\includegraphics{./imagenes/newton-resultado1.png}
\end{center}\
\newpage
\begin{center}
\textbf{GR\'AFICA}
\end{center}\
\begin{center}
\includegraphics{./imagenes/newton-resultado1g.png}
\end{center}\
\subsubsection{Ejemplo Resuelto 2}
Calcular el Polinomio de Newton usando los siguientes datos:\\
\begin{center}
\begin{tabular}{ |c |c |c |c |c}
\hline
i & 0 & 1 & 2\\
\hline
X & 0 & 0.3 & 2\\
\hline
Y & 1 & 0.4 & 0.7\\
\hline
\end{tabular}
\end{center}
Vemos que n=3 entonces el grado (n-1) seria igual a 2.
Entonces:\
\begin{center}
\begin{tabular}{ |c |c |c |c |c |c}
\hline
i & $x_i$ & $f(x_{i})$ & $\Delta$ & $\Delta^{2}$\\
\hline
0 & 0 & 1 & $=\frac{0.4-1}{0.3-0}=-2$ & $=\frac{3/17+2}{2-0}=\frac{37}{34}$\\
\hline
1 & 0.3 & 0.4 & $=\frac{0.7-0.4}{2-0.3}=-\frac{3}{17}$ & -\\
\hline
2 & 2 & 0.7 & - & -\\
\hline
\end{tabular}
\end{center}
\[
f[x_0]=f(x_0)=1
\]
\[
f[x_0,x_1]=\Delta(x_0)=-2
\]
\[
f[x_0,x_1,x_2]=\Delta^{2}(x_0)=\frac{37}{34}
\]\
\[
P_{2}(x)=f[x_0]+f[x_0,x_1](x-x_0)+f[x_0,x_1,x_2](x-x_0)(x-x_1)
\]\
\[
P_{2}(x)=1+(-2)(x-0)+\frac{37}{34}(x-0)(x-0.3)
\]\\
\[
P_{2}(x)=\frac{37}{34}x^2-\frac{791}{340}x+1
\]
\newpage
\section{DIVERSOS METODOS APLICADOS EN MATLAB.}
\subsection{M\'etodo de la Secante}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsubsection{Ejemplo Resuelto}
En los siguientes ejercicios use el m\'etodo de la secante considerando una tole
rancia de 1\%\\\\
Resolver\\
$x-sen(x)-5=0$ usando como valores inciales 4, 4.1\\
\begin{center}
soluci\'on
\end{center}
F\'ormula del M\'etodo de la Secante\\
definimos los valores\\
$r_{i}=4.1$\\
$r_{i-1}=4$
\begin{equation*}
\begin{split}
r_{i+1}=r_i-\frac{f(r_{i})(r_{i}-r_{i-1})}{f(r_{i})-f(r_{i-1})}\\
\\
f(4.1)=4.1-sen(4.1)-5=-0.081722888\\
f(4)=4-sen(4)-5=-0.243197504\\
\end{split}
\end{equation*}
\textrm {Luego tenemos }
\\
\begin{equation*}
\begin{split}
r_{i+1}=4.1-\frac{(-0.081722888)(0.1)}{-0.081722888-(-0.243197504)}\\
r_{i+1}=4.150610362 \\
\end{split}
\end{equation*}
\textrm {tenemos que aclarar que $r_i $ tomara el valor de 4 por por ser un cas
o excepcional }
\begin{equation*}
\begin{split}
\includegraphics[width=0.99\textwidth]{./imagenes/gauss-ejemplo.png}
\end{center}\
\subsection{Regla de Simpson de 1/3}
\begin{center}
\includegraphics[width=0.4\textwidth]{./imagenes/grafico-simpson.png}
\end{center}
\begin{equation*}
\textbf{F\'ormula:}\
\int_{a}^{b}f(x)dx = \frac{h}{3}(\frac{f(a) + 4f(\frac{a+b}{2}) + f(b)}{2})
\end{equation*}\
\subsubsection{M\'etodo en modo interfaz gr\'afica(GUI) en Matlab}
\begin{center}
\textbf{Bot\'on "Borrar"}
\includegraphics{./imagenes/simpson-borrar.png}
\end{center}\
\begin{center}
\textbf{Bot\'on "Calcular"}
\includegraphics[width=0.8\textwidth]{./imagenes/simpson-calcular.png}
\end{center}\
\begin{center}
\textbf{Entorno Gr\'afico}
\includegraphics[width=0.9\textwidth]{./imagenes/simpson-entorno.png}
\end{center}\
\subsubsection{Ejemplo en Matlab}
Calcular el \'area de la la Funci\'on :
$2x^{3} + 3$
en el intervalo [1;4] , n=12
\newpage
\begin{center}
\textbf{"Resultado"}
\includegraphics{./imagenes/simpson-ru.png}
\end{center}\
\newpage
\section{Men\'u de Inicio de los M\'etodos en MATLAB.}
\begin{center}
\textbf{"Men\'u de Inicio"}
\includegraphics[width=1\textwidth]{./imagenes/inicio.png}
\end{center}\
\end{document}