CAMBIO DE BASE - compi/ejercicios2-2.pdf · Resolución ejercicios propuestos en clase 1 CAMBIO DE…
ejercicios2
-
Upload
blackperil -
Category
Documents
-
view
4 -
download
0
description
Transcript of ejercicios2
![Page 1: ejercicios2](https://reader036.fdocumento.com/reader036/viewer/2022082901/55cf883d55034664618ec39c/html5/thumbnails/1.jpg)
7/18/2019 ejercicios2
http://slidepdf.com/reader/full/ejercicios2-56d4e3e67625d 1/6
Universidad de ChileFacultad de Ciencias Físicas y MatemáticasDepartamento de Ingeniería Matemática
Semestre Primavera 2006Cálculo Numérico
MA33A-01
Profesor: Gonzalo Hernández.Auxiliar: Gonzalo Ríos.Fecha: 23 de Septiembre
Problemas ResueltosProblemas
1. Interpole la función sen(x) dentro del intervalo [1; 1] utilizando Lagrange en los puntos 1;12 ; 0; 12 ; 1: Acote el error
de lagrange. Gra…que sen(x); L4(x) y T 5(x) (polinomio de Taylor)
2. Encuentre el polinomio de newton con los siguientes datos, y vea a que función se parece
i xi f (xi)0 1 1
21 0 12 1 23 2 44 4 16
3. Dada la función f (x) = 1x+1 ; encuentre el polinomio de newton que interpole a f y a su derivada f 0 en los puntos 0; 1; 3
4. Por las fuertes lluvias que se pronostican para el mes de Mayo, se desean hacer arreglos en la carretera AutopistaCentral para evitar inundaciones, pero el Ingeniera que diseño la carretera era de la Universidad de las Américas, yperdió los planos. El gerente, desesperado, llama a un Ingeniero amigo suyo de Beauchef, y le plantea el problema. ElBeauche…ano, que pasó Calculo Numérico, sabe muy bien que hacer. Le pide al gerente una tabla de datos tomados enlos Portales de Peaje que indiquen tiempo y posición de un vehículo. La tabla que el gerente le entrega es la siguiente:
t 0 3 5 8 11x 0 225 383 623 1001y 0 9 25 64 121y0 0 22
Haga lo que un Ingeniero de Beauchef haría.
Hint: Use Spline Cúbica y Polinomio de Newton
5. Determine el sistema para aproximar una función f (x) en un intervalo [; ] por un exponencial de la forma y(x) = beax
donde a y b son las constantes a determinar.
6. Use los ceros de ~T 3 y las transformaciones del intervalo dado y construya un polinomio interpolante de segundo gradopara f (x) = x ln x ,[1; 3]
7. Obtenga el polinomio trigonométrico general de mínimos cuadrados continuos para f (x) = 0 si < x 0
1 si 0 < x <
8. Detemine el polinomio trigonométrico S 2(x) en [; ] para f (x) = x( x)
Soluciones
1. Lagrange
i xi f (xi) L4;i(x)
0 1 0 (x+ 1
2 )x(x 12 )(x1)
(1+12 )(1)(1 1
2 )(11)
1 12 1
(x+1)x(x 12)(x1)
( 12+1)( 1
2 )( 12
12 )( 1
21)
2 0 0 (x+1)(x+ 1
2 )(x 12 )(x1)
(1)( 12 )( 1
2 )(1)
3 12 1
(x+1)(x+ 12 )x(x1)
( 12+1)( 1
2+12 ) 1
2 ( 121)
4 1 0 (x+1)(x+ 1
2)x(x 12 )
(1+1)(1+12)1(1 1
2 )
=
L4;i(x)16x 1
6x2 23x3 + 2
3x4
43x + 8
3x2 + 43x3 8
3x4
5x2 4x4 143x + 8
3x2 43x3 8
3x4
16x 1
6x2 + 23x3 + 2
3x4
P 4(x) = 0
(L4;0(x))+ (
1)
43x + 8
3x2 + 43x3
83x4+ 0
(L4;2(x))+ 1
43x + 8
3x2
43x3
83x4+ 0
(L4;4(x))
P 4(x) = 43x + 8
3x2 43x3 8
3x4 + 43x 8
3x2 43x3 + 8
3x4 = 83x 8
3x3
![Page 2: ejercicios2](https://reader036.fdocumento.com/reader036/viewer/2022082901/55cf883d55034664618ec39c/html5/thumbnails/2.jpg)
7/18/2019 ejercicios2
http://slidepdf.com/reader/full/ejercicios2-56d4e3e67625d 2/6
b. E 4(x) = 4i=0(x xi)
f (5)()(5)! = (x + 1)
x + 1
2
x
x 12
(x 1)
5 cos()120 5
12
5= 1
325 ' 9: 563
c. T 5(x) = x 163x3 + 1
1205x5
Rojo: Sen(x) Rojo: Sen(x)Negro: Lagrange 8
3x 83x3 Azul: Taylor x 1
63x3 + 11205x5
2. Newton
xi f (xi) f [xi; xi+1] f [xi; xi+1; xi+2] f [xi; xi+1; xi+2; xi+3] f [xi; xi+1; xi+2; xi+3; xi+4]
1 12
1 12
0+1 = 0:5 10:51+1 = 0:25 0:50:25
2+1 = 112
524
112
4+1 = 140
0 1 2110 = 1 21
20 = 0:54
30:540 = 5
24
1 2 4221 = 2 62
41 = 43
2 4 16442 = 6
4 16
P 4(x) = f [x0] + (x x0) f [x0; x1] + (x x0) (x x1) f [x0; x1; x2] + ::: + nj=0(x xj)f [x0:::xn]
P 4(x) = 12
+ (x + 1) 0:5 + (x + 1) x0:25 + (x + 1) x(x 1) 112
+ (x + 1) x(x 1)(x 2) 140
P 4(x) = 1 + 4360x + 9
40 x2 + 130x3 + 1
40x4
Rojo:Newton 1 + 4360x + 9
40 x2 + 130x3 + 1
40x4 Verde:2x
3. Newton con derivadas
f 0(x) = 1(x+1)2
xi f (xi) f [xi; xi+1] f [xi; xi+1; xi+2] f [xi; xi+1; xi+2; xi+3] f [xi; xi+1; xi+2; xi+3; xi+4] f [xi; xi+1; xi+2; xi+3;
0 1 f 0(0) = 1
12+1
10 = 12
14
12
10 = 14
116+
14
30 = 116
164
116
30 =
0 1121
10 = 12
14+
12
10 = 14
116
14
30 = 116
164+
116
30 = 164
1 12 f 0(1) = 1
4
18+
14
31 = 116
132
116
31 = 164
1 12
14
12
31 = 18
116+
18
31 = 132
3 1
4 f 0
(3) = 1
163 1
4
![Page 3: ejercicios2](https://reader036.fdocumento.com/reader036/viewer/2022082901/55cf883d55034664618ec39c/html5/thumbnails/3.jpg)
7/18/2019 ejercicios2
http://slidepdf.com/reader/full/ejercicios2-56d4e3e67625d 3/6
P 5(x) = 1 + x (1) + x2 12 + x2(x 1)
14
+ x2(x 1)2 116 + x2(x 1)2(x 3)
164
: 55
64x2 3164x3 + 9
64x4 164x5
P 5(x) = 1 x + 5564x2 31
64x3 + 964x4 1
64x5
@P 5(x)@x
= 5532x 93
64x2 + 916x3 5
64x4 1
Rojo: 1x+1 Rojo: 1
(x+1)2
Azul: 1 x + 5564x2 31
64x3 + 964x4 1
64x5 Azul: derivada 5532x 93
64x2 + 916x3 5
64x4 1
n
4. Primero se construiye un Spline cúbico S x(t) el cual depende de S i(t); i = 0; 1; 2; 3; donde
S x(t) =8>><>>:
S 0(t) = S 0;0 + S 0;1(t
0) + S 0;2(t
0)2 + S 0;3(t
0)3 t
2[0; 3]
S 1(t) = S 1;0 + S 1;1(t 3) + S 1;2(t 3)2 + S 1;3(t 3)3 t 2 [3; 5]S 2(t) = S 2;0 + S 2;1(t 5) + S 2;2(t 5)2 + S 2;3(t 5)3 t 2 [5; 8]S 3(t) = S 3;0 + S 3;1(t 8) + S 3;2(t 8)2 + S 3;3(t 8)3 t 2 [8; 10]
La matriz es266664
1 Condicion de bordeh0 2 (h0 + h1) h1 0 00 h1 2 (h1 + h2) h2 00 0 h2 2 (h2 + h3) h3
2 Condicion de borde
377775
266664
m0
m1
m2
m3
m4
377775 =
266664
0
1 = 3 (d1 d0)2 = 3 (d2 d1)3 = 3 (d3 d2)
4
377775
Los coe…cientes son
h0 = 3 0 = 3 d0 = 22503 = 75
h1 = 5
3 = 2 d1 = 383225
2
= 79h2 = 8 5 = 3 d2 = 623383
3 = 80h3 = 11 8 = 3 d3 = 1001623
3 = 126
Reemplazando en la matriz es266664
3 10 2 0 00 2 10 3 00 0 3 12 3
377775
266664
m0
m1
m2
m3
m4
377775 =
266664
0
123
1384
377775
C.B: Spline Natural266664
1 0 0 0 03 10 2 0 0
0 2 10 3 00 0 3 12 30 0 0 0 1
377775
266664
m0
m1
m2m3
m4
377775 =
266664
012
31380
377775 =)
266664
m0
m1
m2m3
m4
377775 =
266664
011659
226
59735590
377775
S k;0 = yk S k;1 = dk hk(2mk+mk+1)3 S k;2 = mk S k;3 = mk+1mk
3hk
S x(t) =
8>>>>>>><>>>>>>>:
S 0(t) = 0 +
75 3(20+11659 )
3
(t 0) + 0 (t 0)2 +
11659 033 (t 0)3 t 2 [0; 3]
S 1(t) = 225 +
79 2(2 11659
22659 )
3
(t 3) + 116
59 (t 3)2 +
22659
11659
32 (t 3)3 t 2 [3; 5]
S 2(t) = 383 +
80 3(2( 226
59 )+ 73559 )
3
(t 5) +
22659
(t 5)2 +
73559 +
22659
33 (t 5)3 t 2 [5; 8]
S 3(t) = 623 +
126 3(2 73559 +0)
3
(t 8) + 735
59 (t 8)2 +
0 73559
33 (t 8)3 t 2 [8; 11]
![Page 4: ejercicios2](https://reader036.fdocumento.com/reader036/viewer/2022082901/55cf883d55034664618ec39c/html5/thumbnails/4.jpg)
7/18/2019 ejercicios2
http://slidepdf.com/reader/full/ejercicios2-56d4e3e67625d 4/6
S x(t) =
8>><>>:
430959 t + 116
531t3 if 0 t ^ t 3242259 t + 629
59 t2 5759t3 + 1887
59 if 3 t ^ t 544116177 t 5483
177 t2 + 961531t3 167267
531 if 5 t ^ t 8269559 t2 364t 245
177t3 + 233695177 if 8 t ^ t 11
S (0) = 0S (3) = 225S (5) = 383S (8) = 623
S (11) = 1001
Dx(t) =
8>><
>>:
116177t2 + 4309
59 if 0 t ^ t 3125859 t 171
59 t2 + 242259 if 3 t ^ t 5
10966177 t + 961
177t2 + 44 116177 if 5 t ^ t 8
539059 t
24559 t2
364 if 8
t
^t
11
D(0) = 17807241 = 73: 887966804979253112
D(3) = 18611241 = 77: 224066390041493776
D(5) = 19359241 = 80: 327800829875518672
D(8) = 18804241 = 78: 024896265560165975
D(11) = 87 909
1205 = 72: 953526970954356846
F x(t) =
8>><>>:
232177t if 0 t ^ t 3
34259 t + 1258
59 if 3 t ^ t 51922177 t 10966
177 if 5 t ^ t 8490
59 t + 539059 if 8 t ^ t 11
F (0) = 0F (3) = 232
59 = 3: 9322033898305084746F (5) = 452
59 = 7: 6610169491525423729F (8) = 1470
59 = 24: 915254237288135593
F (11) = 0
S x(t) Dx(t) = dS x(t)dt
F x(t) = d2S x(t)dt2
Luego, para la coordenada y hacemos una interpolación de Newton
0 0 y0(0) = 0 3030
= 1 0 0 0 0
0 0 9030 = 3 83
50 = 1 0 0 0
3 9 25953 = 8 138
83 = 1 0 0
5 25 642585 = 13 1913
115 = 1 0
8 64 12164118 = 19 2219
118 = 111 121 y0(11) = 2211 121
y(t) = 0 + 0 t + 1t2 + 0 = t2
despejando t =) t =p
y
reemplazando en S x(t)
S x(t) = S x(p
y) =
8>><>>:
430959
p y + 116
531
p y3 if 0 p
y ^p y 3242259
p y + 629
59
p y2 57
59
p y3 + 1887
59 if 3 p
y ^p y 544116177
p y 5483
177
p y2 + 961
531
p y3 167267
531 if 5 p
y ^p y 82695
59 p y2
364p y
245
177p y3
+
233695
177 if 8 p y^p
y 11
transformando en una función que depende de y :
=) S x(y) =
8>><>>:
430959
p y + 116
531
p y3 if 0 y ^ y 9
242259
p y + 629
59 y 5759
p y3 + 1887
59 if 9 y ^ y 2544116177
p y 5483
177 y + 961531
p y3 167267
531 if 25 y ^ y 64269559 y 364
p y 245
177
p y3 + 233695
177 if 64 y ^ y 121
Gra…cando en un plano xy se obtiene el plano pedido.
![Page 5: ejercicios2](https://reader036.fdocumento.com/reader036/viewer/2022082901/55cf883d55034664618ec39c/html5/thumbnails/5.jpg)
7/18/2019 ejercicios2
http://slidepdf.com/reader/full/ejercicios2-56d4e3e67625d 5/6
5. Primero se hace una transformación para tener un sistema lineal. En este caso se usa el ln
(a) y = beax =) ln(y) = ln(b) + ax
Ahora buscamos el minimo del error cuadrático
(b) E =R
(ln(f (x)) (ln(b) + ax))2dx
(c) @E@a
=R
x (2ln b + 2ax 2 l n (f (x))) dx = 0 =) R
(x ln b + ax2 )dx =R
x ln(f (x)) dx
(d) @E@b
= 1b
R
(2ln b + 2ax 2 l n (f (x))) dx = 0 =) R
(ln b + ax )dx =R
ln(f (x)) dx
El sistema de forma matricial queda de la forma
(e)
"R
x dxR
x2dxR
dxR
xdx
#ln(b)
a
=
"R
x ln(f (x)) dxR
ln(f (x)) dx
#
6. Primero, los ceros de ~T 3 se encuentran en xk = cos( 2k12n
); k = 1; 2; 3:
(a) x1 = cos(16) = 0:86602540378443864676
(b) x2 = cos(36) = 0:0
(c) x3 = cos(56) = 0:86602540378443864676
Debemos usar una transformacion lineal para pasar de [1; 1] a [1; 3]:Esto es ~xk = 2 + xk:
(d) ~x1 = 2: 8660254037844386468' 2:866
(e) ~x2 = 2
(f) ~x3 = 1: 1339745962155613532' 1:134
Ahora debemos calcular los valores de f (x) en ~x1; ~x2; ~x3
(g) f (~x1) = f (2:866) = 3: 0176610660775389879' 3: 018
(h) f (~x2
) = f (2) = 1: 3862943611198906188'
1: 386
(i) f (~x3) = f (1:134) = 0:14260186681650541201' 0:143
Las diferencias divididas son:
(j)
x f (x) f [x; x] f [x;x;x]2:866 3: 018 1: 3863: 018
22:866 = 1: 885 1: 4351: 8851:1342:866 = 0:26
2 1: 386 0:1431: 3861:1342 = 1: 435
1:134 0:143
El polinomio interpolante de segunda grado es:
(k) ~P 3(x) = 3: 018 + 1: 885(x 2:866) + 0:26(x 2:866)(x 2) = 0:61984x + 0:26x2 0:89409
El error del polinomio está acotado de la forma
(l) maxx2[1;3] ~P 3(x) f (x)
123(3+1)! maxx2[1;3] f (4)(x) =
1192 maxx2[1;3]
12x3 =
1192
12 = 1
384 < 0:0026042
7. Calculemos ak y bk
![Page 6: ejercicios2](https://reader036.fdocumento.com/reader036/viewer/2022082901/55cf883d55034664618ec39c/html5/thumbnails/6.jpg)
7/18/2019 ejercicios2
http://slidepdf.com/reader/full/ejercicios2-56d4e3e67625d 6/6
(a) ak = 1
R
f (x) cos(kx)dx = 1
R 0
f (x)cos(kx)dx + 1
R 0 f (x)cos(kx)dx = 1
R 0 cos(kx)dx = 1
k sen(kx )j0 = 0
(b) bk = 1
R
f (x)sen(kx)dx = 1
R 0 sen(kx)dx = 1
k cos(kx)j0 = 1
k(1 (1)k)
Luego, el polinomio general S n(x) es
(c) S n(x) = a02
+ an cos(nx) +n1Pk=1
ak cos(kx) + bksen(kx) =n1Pk=1
1k
(1 (1)k)sen(kx)
8. El polinomio es S n(x) = a02 + a2 cos(2x) + a1 cos(x) + b1sen(x): Calculemos los coe…cientes
(a) a0 = 1 R x(
x)dx = R xdx
1 R x2dx = x2
13 x3 =
232
(b) a1 = 1
R
x( x) cos(x)dx =R
x cos(x)dx 1
R
x2 cos(x)dx = 1
hx2sen(x)
R
2xsen(x)dxi
=
2
R
xsen(x)dx = 2
h x cos(x)j
+R
cos(x)dx
i = 2
2 = 4
(c) a2 = 1
R
x( x) cos(2x)dx = 1
R 22
u2 ( u
2 ) cos(u)du2 = 18
R 22
u(2 u) cos(u)du
= 14
R 22 u cos(u)du 1
8
R 22 u2 cos(u)du = 1
8
R 22 u2 cos(u)du = 1
8
hu2sen(u)
22
R 22 2usen(u)du
i= 1
4
R 22 u sin(u)du = 1
4
h x cos(x)j2
2 +R 2
2 cos(x)dxi
= 144 = 1