Está en la página 1de 33

Mtodos

Numricos Vistos - Aplicaciones Reales -

Ejemplo 1
La caida de temperatura de una planta de tratamiento de petroleo crudo esta dada por la funcion: Encontrar la solucion de esa funcion

Ejemplo 2
Encontrar las races de una seal ssmica medida Hene un comportamiento dada por la ecuacin: Graca de: f(x) = sen 10x + cos 3x

Ejemplo 2 (cont.)
Graca de: f(x) = sen 10x + cos 3x

Y Eso para que?

Para buscar petrleo

Ejemplo: Cuenta Bancaria


El valor acumulado de una cuenta de ahorros puede calcularse con la ecuacin de anualidad vencida A = P[(1 + i )n - 1 ] / i En esta ecuacin A es el monto de la cuenta, P es la canHdad que se deposita peridicamente e i es la tasa de inters por periodo para los n periodos de depsito. A un ingeniero le gustara tener una cuenta de ahorros con un monto de $ 750,000 dlares al momento de reHrarse dentro de 20 aos, y puede depositar $ 1,500 dlares mensuales para lograr dicho objeHvo. Cul es la mnima tasa de inters a que puede inverHrse ese dinero, suponiendo que es un inters compuesto mensual? Escriba un programa en C o en cualquier plataforma para este problema, el programa deber pedir todos los datos necesarios y uHlizar el mtodo de Newton para calcular el inters a que debe inverHrse el dinero.

Solucin
Para esHmar el valor inicial de i podemos desarrollar el binomio (1 + i)n para aproximarlo a la segunda potencia. El resultado es

Se sugiere validar los datos de entrada. El capital a obtener debe ser mayor que el depsito por el nmero de abonos, es decir A > nP

Ejemplos resuelto en Excel

Sistema de ec. lin.

Matriz asociada

T0

T1

T2

. . .

Tn

Tn+1

Funcion en Matlab.. function A = mcalor1(n) v = ones(1,n-1); A = 2*eye(n) - diag(v,1) - diag (v,-1);

Otros usos (De otros mtodos que vienen)

Tomado del Curso de MatemHca Computacional de S. Botello (Centro de InvesHgacin de matemHcas Aplicadas)

Otros usos (De otros mtodos que vienen)

Nota publicitaria: El InsHtuto de Medicina Legal de Bucaramanga, har un llamado a ingenieros para desarrollar un sistema de reconstruccin de rostros a parHr de restos craneales y de anlisis de contusiones.

Otros usos (De otros mtodos que vienen)

Nota Publicitaria 2: El grupo de invesHgacin GIEMA esta requiriendo estudiantes de pregrado para hacer proyecto de grado en dinmica de uidos computacional en conjunto con estudiantes de ingeniera mecnica:

Anlisis de Flujo compresible en oleoductos y sistemas de caeras Apoyo al estudio de calidad del aire en Bucaramanga Apoyo al desarrollo de una interfaz de acceso remoto a tneles de viento ubicados en Francia y EEUU Tunel de Viento Virtual

Procesamiento de Imgenes Mdicas

Nota Publicitaria 3: Programas mixtos de estudios GIIB-GOTS y CEMOS

(Un Parentesis)

ScienHc CompuHng

Parallel ScienHc CompuHng

Programming Language to ScienHc CompuHng*


In studying Computer Languages, we want to study a new way to interacHng with the computer Computers are machines that execute instrucHons. If someone is not telling the computer what to do, it does nothing. Computer Programming languages allow humans a simplied means of giving the computer instrucHons. ScienHc CompuHng implies in (almost) all cases, Parallel CompuHng.
* From Parallel ScienHc CompuHng in C++ and MPI, A Seamless Approach to Parallel Algorithms and Their ImplementaHon, By G. Em Karniadakis and R. M. Kirby II, Cambridge Press 2003

Top Ten Algorithms of the 20th Century*


1. 1946: Monte Carlo Method 2. 1947: Simplex Method for linear Problems 3. 1950: Krylov Subspace IteraHon Method for fast linear Solvers and Eigensolvers 4. 1951: Householder Matrix decomposiHon to express a matrix as a product of simple matrices 5. 1957: FORTRAN compiler 6. 1959-1961: QR Algorithm to compute many eigenvalues 7. 1962: Quicksort Algorithm 8. 1965: Fast fourier transform 9. 1977: Integer relaHon detecHon algorithm, which is useful for bifurcaHons and quantum eld theory 10. 1987: Fast MulHple Algorithm for N-Body Problems
* From Parallel ScienHc CompuHng in C++ and MPI, A Seamless Approach to Parallel Algorithms and Their ImplementaHon, By G. Em Karniadakis and R. M. Kirby II, Cambridge Press 2003

MathemaHcal Parallelism
MathemaHcal operaHons that have a high degree of parallelism (they can perform simultaneously and independently) Ci = xi,yi, I = 1,..,N. Perfect MathemaHcal Parallelism:
No dependencies among the dierent pairs of data Embarrassingly Parallel
one for which liwle or no eort is required to separate the problem into a number of parallel tasks

Some Cases
ApproximaHon
Fourier Series RepresentaHon

Roots and Integrals


Numerical IntegraHon Methods

PropagaHon
AdvecHon Diusion EquaHon

Fast Linear Solvers


Cholesky FactorizaHon

ApproximaHon
InterpolaHon of discrete Data are not always data nicely distributed on a uniform laxce or grid ApproximaHon by RepresentaHon by known funcHons of the polynomials numerical soluHon
Wavelets (sines and cosines)

Fourier Series RepresentaHon


InterpolaHons based on bases k = eikx, cos kx and sin kx Convergence (Dirichlet CondiHons)
f(x) is dened every point in the inverval x [-, ] f(x) is single valued, piecewise conHnous, and nite (f(x) = log x is excluded) f(x) is bounded variaHon, that is, f(x) cannot have an innite number of maxima and minima.

A funcHon that saHses the Dirichlet condiHons can be expanded into the following convergent innite series: f(x) = ao + a1 cos x + a2 cos 2x + + b1 sin x + b2 sin 2x + , The Fourier coecients are computed from:
ak 1/ - f(x) cos kx dx and bk 1/ - f(x) sin kx dx

Use Examples:
Filters Noisy Data (Using Trigonometric InterpolaHon) Fast Fourier Transform (FFT)

FFT is a recursive algorithm FFT has less round-o error than the direct summaHon approach. FFTs can be perform by splixng the funcHon in several parts. FFT can be computed in half the number of operaHons.

Roots and Integrals


Use to nd soluHons of linear and non linear equaHons Approximate IntegraHon of a funcHon is a very old subject.
Archimedes uses the method of inscribed and circumscribed polygons to obtain lower and upper bounds for the value of the area of a circle.

Simple IntegraHon Algorithm: I = ab f(x) dx I R(h) = h i=1n fi -1/2 (Midpoint-Rectangle Rule) I T(h) = h [1/2f0 +f1 + + fn-1 + 1/2 fn] (Trapezoid Rule)

Some IntegraHon Methods


Midpoint Rectangle and Trapezoid Methods Rombergs Method (ExtrapolaHon to the limit) Simpsons Method Advanced Quadrature Method (Gauss) Jacobi Polynomials Gauss-Chebyshev Quadrature MulHdimensional IntegraHon

PropagaHon
Numerical Diusion and Dispersion Mixed discreHzaHon for iniHal value problems and boundary value problems AdvecHon EquaHon:
Linearized wave or advecHon equaHon:
/ t = U / x = 0 (or D / Dt = 0) Which expresses the (passive) advecHon of heat or a species in one dimension by the ow with transport velocity U(x,t)

Periodic boundary condiHons: (0,t) = (1,t) IniHal condiHons: (x,0) = 0(x) = sin 2 x Exact soluHon: = 0(x-Ut) = sin 2(x-Ut) Dispersion or Diusion:

t = -x leads to no dissipaHve, non dispersive soluHons t = xx leads to dissipaHve soluHons t = xxx leads to no dissipaHve but dispersive soluHons t = -xxxx leads to dissipaHve soluHons (similar jusHcaHon as above)

AdvecHon Diusion EquaHon


Physical dissipaHon by including a second-order derivate (in space) to linearized advecHon equaHon. /t +U/x = 2/x2 , - < x < where is the diusion coecient and depends on the material. The raHo Ux/xx U(/a)/. (/a2) U.a/ = Pe where Pe is the physical Peclet numver of the process and expresses the relaHve importance of advecHon compared to diusion. The parameter a is the characterisHc length scale of the problem. Domain is truncate to nite limits: Li (inow) x Lo (oulow)

Fast Linear Solvers


Direct and IteraHve SoluHons of large linear systems.
Gaussian eliminaHon
LU DecomposiHon
Parallel LU DecomposiHon

Sparse Systems

Cholesky FactorizaHon QR FactorizaHon Householder TransformaHon

Cholesky FactorizaHon
Special Case of the LU decomposiHon for a symmetric posiHve-deniHve matrix A A = L LT Matrix U is equal to the transpose of L because of symmetry. Cholesky Algorithm (summary)
for j = 1,n jj = (ajj - k=1 j-1 (2 jk)) for I = j+1,n jj = (ajj - k=1 j-1 (jkjk))/jj end for end for

Cholesky factorizaHon algorithm is stable and thus it does not require pivoHng Cholesky Algorithm requires about half the memory and about half the operaHons of the LY decomposiHon PosiHve-deniHve property is important in obtaining the ij without parHal pivoHng. ParHal pivoHng can destroy the symmetry of the matrix A In some cases an incomplete or approximate Cholesky decomposiHon is required.

Recommended Lectures and Sites


Parallel ScienHc CompuHng in C++ and MPI, A Seamless Approach to Parallel Algorithms and Their ImplementaHon, By G. Em Karniadakis and R. M. Kirby II, Cambridge Press 2003 hwp://www.scienHc-compuHng.com/ hwp://www.scienHccompuHng.com hwp://www.hpcwire.com/

Algunas ofertas de empleo