You are on page 1of 10

Solucion al primer Parcial - Analisis Numerico

∑n
1. Hallar la condicion del problema P : Rn × Rn → R/P (x, y) = i=1 | xyii |

Solucion:

Sean x = (x1 , ..., xn ), y = (y1 , ..., yn ), x = (x1 , ..., xn ), y = (y 1 , ..., y n ) vectores en Rn donde
xk = xk (1 + εk ) y y k = yk (1 + αk ) con |εk | ≤ eps y |αk | ≤ eps para k = 1, ..., n.

Planteamos
∑n x ∑n x
|P (x,y)−P (x,y)| | i=1 | y i |− i=1 | yi ||
= ∑ni xi
i
|P (x,y)| | i=1 yi ||
|

∑n x (1+ε ) ∑ xi
| i=1 | y i(1+αi ) |− n i=1 | yi ||
i∑
= | n
i
xi
i=1 | y ||i
∑n xi ∑n x
| i=1 | yi (1+εi )(1−αi )|− i=1 | yi ||
≈ ∑n x
| i=1 | yi ||
i

i
∑n x ∑n x
| i=1 | yi (1+εi −αi −αi εi )|− i=1 | yi ||
= i ∑ xi
i
| n i=1 | y || i

Despreciando αi εi ≈ 0 para i = 1, ..., n


∑n x ∑n x
| | yi (1+εi −αi )|− | yi ||

i=1 i ∑ i=1 i
xi
| n
i=1 | y || i
∑n x ∑n x ∑n x
| | yi |+ | yi |(|εi |+|αi |)− | yi ||

i=1 i=1 i=1
i ∑ni x
i
| i=1 | yi ||
i
∑n xi
| i=1 | yi |(|εi |+|αi |)|
= ∑n x
| i=1 | yi ||
i
∑n x ∑ xi
| | yi ||εi |+ ni=1 | yi ||αi ||

i=1 i∑
n xi
| i=1 | y ||
i
∑n xi ∑n x
i=1 | yi ||εi |+ i=1 | yi ||αi |
= ∑n xi
i
i=1 | yi |

∑ xi
2 ni=1 | yi |
≤ ∑n xi eps
i=1 | y | i

= 2eps

De donde κ = 2 y el problema esta bien condicionado.

1
2. Hallar una raiz real positiva mediante el Metodo del Punto Fijo para xx − e−x = 0 con
ε < 0,001

Solucion:

Sea f (x) = xx − e−x = 0, expresemos lo anterior en la forma x = g(x).

Planteamos x = −x ln x = g(x) y escogemos [a, b] = [0,1; 0,5] pues ahi existe un cambio de
signo para f y va a existir un raiz en ese intervalo.

Ahora bien veamos si se cumplen las condiciones de unicidad y existencia.

- Condicion de Existencia:
Observamos que g(0,1) = 0,2302 ∈ [0,1; 0,5] y g(0,5) = 0,3465 ∈ [0,1; 0,5], luego se cumplen
la Condicion de Existencia.

- Condicion de unicidad:
Tenemos g ′ (x) = − ln x − 1 y asi |g ′ (0,3)| = 0,31 < 1, luego se cumple la Condicion de
Unicidad.

Para aplicar el metodo del punto fijo planteamos con x0 = 0,3

xn+1 = g(xn ) para n = 0, 1, ...

Creamos la siguiente sucesion:

Para n = 0, x1 = g(x0 ) = g(0,3) = 0,3612


Para n = 1, x2 = g(x1 ) = g(0,3612) = 0,3678
Para n = 2, x3 = g(x2 ) = g(0,3678) = 0,3679

Veamos el error E = |x3 − x2 | = 0,0001 < 0,001, luego planteamos como raiz de la ecuacion
x = 0,3679.

2
3. Mediante el metodo de Splines Cubicos ajustar los puntos de la siguiente tabla

x 2.0 3.4 6.8 7.9


f (x) 815 924 716 1007

Solucion:

Un Trazador Cubico es una funcion que interpola a f en los 4 puntos dados definida de la
siguiente forma:


 S0 (x) si x ∈ [x0 , x1 ]
S(x) = S1 (x) si x ∈ [x1 , x2 ]

S2 (x) si x ∈ [x2 , x3 ]

Donde Si (x) = ai + bi (x − xi ) + ci (x − xi )2 + di (x − xi )3 para i = 0, 1, 2.


Para el calculo de ai plateamos ai = f (xi ) para i = 0, 1, 2, 3
a0 = f (x0 ) = 815
a1 = f (x1 ) = 924
a2 = f (x2 ) = 716
a3 = f (x3 ) = 1007
Para el calculo de hi planteamos hi = xi+1 − xi para i = 0, 1, 2.
h0 = x1 − x0 = 1, 4
h1 = x2 − x1 = 3,4
h2 = x3 − x2 = 1, 1
Para el calculo de ci planteamos
    
1 0 0 0 c0 0
 h0 2(h0 + h1 ) h1  
0   c1   3 (a2 − a1 ) − 3
(a1 − a0 ) 
  =  h31 h0 
 0 h1 2(h1 + h2 ) h2   c2   (a3 − a2 ) − 3
(a2 − a1 ) 
h2 h1
0 0 0 1 c3 0

Luego obtenemos
    
1 0 0 0 c0 0
 1,4 9,6 3,4 0   c1   −417,1008 
  = 
 0 3,4 9 1,1   c2   977,1658 
0 0 0 1 c3 0

3
yn+1 = yn − 1
4xn yn −1
((xn + yn2 − 6)(2xn ) − (yn + x2n − 4)(1))

Para n = 0

x1 = x0 − 1
4x0 y0 −1
((y0 + x20 − 4)(2y0 ) − (x0 + y02 − 6)(1)) = 1,3585

y1 = y0 − 1
4x0 y0 −1
((x0 + y02 − 6)(2x0 ) − (y0 + x20 − 4)(1)) = 2,1544

Para n = 1

x2 = x1 − 1
4x1 y1 −1
((y1 + x21 − 4)(2y1 ) − (x1 + y12 − 6)(1)) = 1,3585

y2 = y1 − 1
4x1 y1 −1
((x1 + y12 − 6)(2x1 ) − (y1 + x21 − 4)(1)) = 2,1544

Veamos el error E1 = |x2 − x1 | = 0 < 0,001 y E2 = |y2 − y1 | = 0 < 0,001.

Luego planteamos como solucion del sistema A(1,3585; 2,1544).

6
Resolviendo obtenemos c0 = 0, c1 = −81,9013, c2 = 108,5739 y c3 = 0
Para el calculo de bi planteamos bi = 1
hi
(ai+1 − ai ) − hi
3
(2ci + ci+1 ) para i = 0, 1, 2.
b0 = 1
h0
(a1 − a0 ) − h0
3
(2c0 + c1 ) = 107,8876
b1 = 1
h1
(a2 − a1 ) − h1
3
(2c1 + c2 ) = 1,4160
b2 = 1
h2
(a3 − a2 ) − h2
3
(2c2 + c3 ) = 184,9246
Para el calculo de di planteamos di = 1
(c
3hi i+1
− ci ) para i = 0, 1, 2.
d0 = 1
(c
3h0 1
− c0 ) = −19,5003
d1 = 1
(c
3h1 2
− c1 ) = 18,6740
d2 = 1
(c
3h2 3
− c2 ) = −32,9011
Finalmente planteamos:


 S0 (x) = 815 + 107,8876(x − xi ) + 0(x − xi )2 − 19,5003(x − xi )3 si x ∈ [2,0; 3,4]
S(x) = S1 (x) = 924 + 1,4160(x − xi ) − 81,9013(x − xi )2 + 18,6740(x − xi )3 si x ∈ [3,4; 6,8]

S2 (x) = 716 + 184,9246(x − xi ) + 108,5739(x − xi )2 − 32,9011(x − xi )3 si x ∈ [6,8; 7,9]

4
4. mediante el metodo de Newton-Raphson determine las intersecciones de las curvas y +x2 = 4
y x + y 2 = 6 en el intervalo que usted establezca.

Solucion:

Consideremos el siguiente grafico

GRAFICO

15

10

−5

−10

−15

−20
−6 −4 −2 0 2 4

Graficamente observamos que existen 4 puntos en comun entre ambas parabolas, sean A,B,C
y D dichos puntos.

Sea A el punto del primer cuadrante, hallar dicho punto A tomemos la aproximacion (x0 , y0 ) =
(1, 35; 2,15).

Planteamos f (x, y) = y + x2 − 4 y g(x, y) = x + y 2 − 6


( ) ( )
∂f ∂f
∂x ∂y 2x 1
Tambien consideramos la matriz Jacobiana J(x, y) = ∂g ∂g =
∂x ∂y
1 2y

El determinante de la matriz Jacobiana esta dada por det(J(x, y)) = 4xy − 1

Para aplicar el metodo de Newton Raphson planteamos para n = 0, 1, ...

xn+1 = xn − 1
det(J(xn ,yn ))
(f (xn , yn ) ∂g(x∂yn ,yn ) − g(xn , yn ) ∂f (x∂yn ,yn ) )

yn+1 = yn − 1
det(J(xn ,yn ))
(g(xn , yn ) ∂f (x∂xn ,yn ) − f (xn , yn ) ∂g(x∂x
n ,yn )
)

Para nuestro caso tenemos para n = 0, 1, ...

xn+1 = xn − 1
4xn yn −1
((yn + x2n − 4)(2yn ) − (xn + yn2 − 6)(1))

5
Solución del Primer Parcial
1. Hallar la condicion del siguiente problema P : R −→ R/P (x) = arctan(x)
Solución.-
Sea x = x(1 + ǫ) con |ǫ| ≤ eps
Tenemos:

P (x) − P (x) = arctan(x) − arctan(x) Por el Teorema del Valor Medio


1
= (x − x), ξ ∈ (x, x)
1 + ξ2
1
= (x(1 + ǫ) − x)
1 + ξ2

=
1 + ξ2
Suponiendo x ≥ 0, tenemos que 0 ≤ x < ξ, entonces
1 1
<
1+ξ 2 1 + x2
Entonces
|P (x) − P (x)| |x||ǫ|
<
|P (x)| (1 + x2 ) arctan x
|x|
= · eps
(1 + x ) arctan x
2

|x|
De donde tenemos que: k =
(1 + x2 ) arctan x
Queremos saber que pasa cuando x ≈ 0 y cuando |x| ≫ 0 para ver esto calculamos los
siguientes limites. En efecto:
x 1 x
lı́m = lı́m · lı́m
x7→0 (1 + x2 ) arctan x x7→0 1+x2 x7 → 0 arctan x
= 1
x x 1
lı́m = lı́m · lı́m
x7→∞ (1 + x ) arctan x
2 x7→∞ 1 + x2 x7→∞ arctan x
= 0

Por tanto k ≈ 1 y k ≈ 0 cuando x ≈ 0 y |x| ≫ 0 respectivamente, en cualquier caso el


problema esta bien condicionado ya que k ≤ 30.

1
√ 2
2. Como A es una solucion√ de la ecuacion x − A = 0 para A > 0, podemos usar el metodo
de Newton para estimar A.

a) Verifique que
 la formula
 de iteracion para obtener la estimacion de la raiz cuadrada en
A
xn+1 = 0,5 xn + .
xn

b) Estime el valor de 3 empleando lo anterior.

c) De una formula iterativa para calcular N a con a > 0.

Solución.-
a) Sea f (x) = x2 − A, entonces f ′ (x) = 2x

f (xn )
xn+1 = xn −
f ′ (xn )
x2 − A
= xn − n
2xn
 
A
= 0,5 xn +
xn

b) Tomemos:

x0 = 1,7
 
3
x1 = 0,5 1,7 + = 1,7323
1,7
 
3
x2 = 0,5 1,7323 + = 1,7320
1,7323
 
3
x3 = 0,5 1,7320 + = 1,7320
1,7320

Veamos el error
√ E = |x2 − x1 | = |1,7320 − 1,7320| = 0
Finalmente 3 ≈ 1,7320
c) Consideremos f (x) = xN − A, entonces f ′ (x) = NxN −1

f (xn )
xn+1 = xn −
f ′ (xn )
xN − A
= xn − n N −1
Nxn
 
1 A
= 1− xn +
N NxnN −1
  
1 A
= 1− xn +
N (N − 1)xnN −1

2
3. La ecuacion de momentos flectores de una viga de longitud “4 unidades” simplemente apo-
yada con una carga “q” distribuida esta dada de la siguiente manera

4qx qx2
y = Mx = −
2 2
En que punto de la viga el momento flector es maximo y a que es igual?.
Solución.-
4qx qx2
Tenemos: M(x) = −
2 2

Derivando: M ′ (x) = 2q − qx

Entonces la funcion a iterar es: f (x) = 2q − qx

Por Newton Raphson

f (xi )
xi+1 = xi − i = 0, 1, 2, ..., N
f ′ (xi )
1era iteracion Con x0 = 0

f (x0 ) 2q − q(0)
x1 = x0 − =0− =2
f (x0 )
′ −q

1da iteracion Con x1 = 2

f (x1 ) 2q − q(2)
x2 = x1 − =2− =2
f (x1 )
′ −q

Por lo tanto: ε = |x2 − x1 | = |2 − 2| = 0

Entonces: x = 2[m] es la posición

Entonces el momento maximo sera:


4q(2) q(2)2
Mmax − M(2) = −
2 2
Mmax = 4q − 2q
= 2q[Nm]

3
4. Hallar un polinomio de Newton de grado 3 si f (3) = 6, f ′ (3) = 15, f [2, 3, 5] = 10 y
f [2, 3, 5, 7] = 4
Solución.-
Consideremos el tablero

xi f (xi )
2 f (2)
6 − f (2)
f [2, 3] =
1
3 6 f [2, 3, 5] = 10
f (5) − 6
f [3, 5] = f [2, 3, 5, 7] = 4
2
2f (5) − f (7)
5 f (5) f [3, 5, 7] =
8
f (7) − f (5)
f [5, 7] =
2
7 f (7)

Luego el polinomio de interpolación


f (x) = f (x0 )+f [x0 , x1 ](x−x0 )+f [x0 , x1 , x2 ](x−x0 )(x−x1 )+f [x0 , x1 , x2 , x3 ](x−x0 )(x−x1 )(x−x2 )
Luego
f (x) = f (2) + (6 − f (2))(x − 2) + 10(x − 2)(x − 3) + 4(x − 2)(x − 3)(x − 5)
Derivamos: f ′ (x) = (6 − f (2)) + 10(2x − 5) + 4(3x2 − 20x + 31)
Para f ′ (3) = 15 ⇐⇒ 15 = 6 − f (2) + 10 − 8 ⇐⇒ f (2) = −7
Finalmente obtenemos:

f (x) = P3 (x) = −7 + 13(x − 2) + 10(x − 2)(x − 3) + 4(x − 2)(x − 3)(x − 5)

You might also like