. .
Problema Lineal de Contorno: Si p(x), q(x), r(x) ∈ C[a, b] con
ES q(x) > 0 en [a, b], entonces el problema lineal de frontera
y 00 (x) = p(x)y 0 + q(x)y + r(x) con y(a) = α, y(b) = β tiene una única
.
P solución y(x) con x ∈ [a, b]. Además dicha solución viene dada por
y(x) = u(x) + Cv(x), siendo C = (β − u(b))/v(b), donde u(x) y v(x)
son la única solución de los problemas de Cauchy (1)
u00 (x) = p(x)u0 + q(x)u + r(x) con u(a) = α, u0 (a) = 0; (2)
Universitat de Lleida .Escola Politècnica Superior v 00 (x) = p(x)v 0 + q(x)v con v(a) = 0, v 0 (a) = 1.
El problema de Cauchy en Rn : Sea x(t) ∈ Rn la solución de
ẋ = f (t, x), x(t0 ) = x0 .
• Si existe U ⊂ Rn+1 entorno de (t0 , x0 ) con f ∈ C 1 (U ),
MÉTODOS NUMÉRICOS entonces existe una única solución.
Grado en Ingenierı́a Mecánica. Construimos la sucesión {xi }i∈N ⊂ Rn con x(ti ) ≈ xi , para los
Grado en Ingenierı́a Electrónica Industrial y Automática. tiempos ti = t0 + ih ∈ R con longitud de paso h como:
Grado en Ingenierı́a de la Energı́a y Sostenibilidad. • Euler: xi+1 = xi + hf (ti , xi ).
Profesor: Dr. Isaac A. Garcı́a. • Heun: x∗i+1 = xi + hf (ti , xi ),
xi+1 = xi + h2 f (ti , xi ) + f (ti+1 , x∗i+1 ) .
PROPAGACIÓN DE ERRORES:
• RK4: xi+1 = xi + h6 [k1 + 2k2 + 2k3 + k4 ], siendo
Sea f : D ⊂ Rn → R con f ∈ C 1 (D) tal que y = f (x1 , x2 , . . . , xn ). k1 = f (ti , xi ), k2 = f ti + h2 , xi + h2 k1 ,
∂f (x)
Error Absoluto: ∆y ≈ n
P
∆xj . k3 = f ti + h2 , xi + h2 k2 , k4 = f (ti + h, xi + hk3 ).
j=1 ∂xj
Pn xj ∂f (x)
Error Relativo: y ≈ j=1 f (x) ∂xj xj .
ECUACIONES NO LINEALES:
Sea x∗ una solución de la ecuación f (x) = 0.
INTERPOLACIÓN POLINOMIAL:
• Teorema de Bolzano: Si f : [a, b] ⊂ R → R es C([a, b]) y
Pn Qn x−xj
• Pn (x) = k=0 fk `k (x) , `k (x) = j=0 xk −xj
, k = 0, . . . , n. f (a)f (b) < 0 entonces existe x∗ ∈ (a, b) con f (x∗ ) = 0.
j6=k
• Pn (x) = f [x0 ] + f [x0 , x1 ](x − x0 ) + f [x0 , x1 , x2 ](x − x0 )(x − • Bisección: Si existe un único x∗ ∈ (a, b) cero de f y se verifica
x1 ) + · · · + f [x0 , x1 , . . . , xn ](x − x0 )(x − x1 ) · · · (x − xn−1 ). el Teorema de Bolzano para f en [a, b], entonces se construye
(n+1)
la sucesión de intervalos encajadas
• |f (x) − Pn (x)| = |f (n+1)! (ξx )| Qn
i=0 |x − xi |, con xi , ξx ∈ [a, b].
(a, b) = (a0 , b0 ) ⊃ (a1 , b1 ) ⊃ · · · ⊃ (an , bn ) ⊃ · · ·
• xk = a+b 2
+ b−a2
cos 2n+22k+1
π para k = 0, 1, . . . , n.
con anchura del siguiente la mitad que la del anterior y con
x∗ ∈ (an , bn ) para todo n ∈ N. La sucesión de puntos medios
{cn }n∈N con cn = (an + bn )/2 verifica limn→∞ cn = x∗ con
INTEGRACIÓN NUMÉRICA:
|x∗ − cn | ≤ (b − a)/2n+1 .
Sea h = (b − a)/n. • Newton-Raphson: Generar la sucesión {xn }n∈N ⊂ R con
Rb f0 fn
iteración xn+1 = xn − ff0(x n)
y punto inicial x0 . Si f ∈ C 2 [a, b]
• a f (x) dx ≈ Th (f ) = h 2
+ f1 + · · · + fn−1 + 2
con (xn )
2 0 00
∆ = h12 (b − a)|f 00 (ξ)|, ξ ∈ (a, b). con f (a)f (b) < 0, f (x) y f (x) de signo constante en [a, b],
Rb entonces tomando x0 ∈ {a, b} que verifique
• a f (x) dx ≈ Sh (f ) = h3 (f0 + 4f1 + 2f2 + 4f3 + · · · + 4fn−1 + fn ) signf (x0 ) = signf 00 (x0 ) se asegura limn→∞ xn = x∗ , siendo x∗
h4
con ∆ = 180
(b − a)|f (iv) (ξ)|, ξ ∈ (a, b). el único cero de f en [a, b].
4k−1 Th/2
(k−1) (k−1) x −x
(k) (f )−Th (f ) (0) • Secante: xn+1 = xn − f (xn ) f (xnn)−f n−1 .
• Th (f ) = 4k−1 −1
con Th (f ) = Th (f ). (xn−1 )
• Sistemas Newton: Dado un sistema de n ecuaciones con n
incógnitas representado por f (x) = 0 con f : Rn → Rn ,
ECUACIONES DIFERENCIALES ORDINARIAS: generar la sucesión {xn }n∈N ⊂ Rn con iteración
Problema de Cauchy dy/dx = f (x, y), y(x0 ) = y0 xn+1 = xn − (Df (xn ))−1 f (xn ) y punto inicial x0 . Df denota
∂f la matriz Jacobiana de f .
• Si existe U ⊂ R2 entorno de (x0 , y0 ) con f, ∂y
∈ C(U ),
entonces existe una única solución.
• Euler: yi+1 = yi + hf (xi , yi ). MÍNIMOS CUADRADOS:
∗
• f (x) ≈ f ∗ (x) = n ∂
kf − f ∗ k2 = 0
P
• Heun: yi+1 = yi + hf (xi , yi ), i=1 ci ϕi (x). Imponiendo ∂cj
yi+1 = yi + h ∗
f (xi , yi ) + f (xi+1 , yi+1 ) . se
Pn obtienen las ecuaciones normales
2
i=1 ci < ϕi , ϕj >=< f, ϕj >.
• Taylor de 2◦ orden: • Sistemas sobredeterminados: si AT (b − Ax) = 0, entonces
yi+1 = yi + hf (xi , yi ) + h 2 ∂f
(xi , y i ) + ∂f
(xi , y i )f (xi , y i ) . kb − Axk2 ≤ kb − Ayk2 para todo y ∈ Rn .
2 ∂x ∂y
• RK4: yi+1 = yi + h6 (k1 + 2k2 + 2k3 + k4 ), con k1 = f (xi , yi ),
k2 = f xi + h2 , yi + h2 k1 , k3 = f xi + h2 , yi + h2 k2 ,
k4 = f (xi + h, yi + hk3 ).