Está en la página 1de 5

Genere ocho puntos igualmente espaciados de la función f (t)=sen2

De t=0 a 2 π . Ajustes estos datos con

a) un polinomio de interpolación de séptimo grado

[0, 0.8975, 1.7951, 2.692, 3.590, 4.4879, 5.385]


[0,0.9112,0.9504,0.18825, 0.18825, 0.9504,0.6112]

x f(xi) f1(xi) f2(xi) f3(xi) f4(xi) f5(xi) f6(xi) f7(xi)


0 0              
0.89759790 0.6112604
1 7 0.68099587            
-
1.79519580 0.9504844 0.1688237
2 3 0.3779242 4          
- -
2.69279370 0.6835533 0.1911507
3 0.1882551 -0.84918796 8 9        
3.59039160 0.4730336 0.4295119 0.1728676
4 0.1882551 -2.1645E-16 2 2 9      
-
4.48798950 0.9504844 0.4730336 0.1196281
5 3 0.84918796 2 1.2369E-16 5 -0.06517302    
- - -
5.38558740 0.6112604 0.6835533 0.4295119 0.1196281 0.0121013
6 7 -0.3779242 8 2 5 -1.5461E-17 8  
- 0
6.28318530 0.1688237 0.1911507 0.1728676 0.06517302 0.0121013
7 6.004E-32 -0.68099587 4 9 9 4 8

A partir de la tabla obtenemos el polinomio de interpolación de grado 7


Pn ( x ) =d 0 +d 1 ( x −x0 ) + d 2 ( x−x 0 ) ( x−x 1 ) +d 3 ( x−x 0 ) ( x−x 1) ( x−x 2 ) + d 4 ( x −x0 ) ( x−x 1 ) ( x−x 2 ) ( x−x 3 ) +d
tenemos los valores de d i
d 0=0
d 1=0.68099587
d 2=0.16882374
d 3=0.19115079
d 4 =0.17286769
d 5=−0.06517302
d 6 =0.01210138
d 7=0
Reemplazando tenemos
P7 ( x ) =0.6809 x+0.168 x ( x −0.897 ) +0.191 x ( x−0.897 ) ( x −x2 ) +0.172 x ( x−0.897 ) ( x −1.79 )( x−2.69

b) un trazador cúbico.

1- armar la tabla de tabulación calcular valores de h y m


donde:

i x f(xi) hi mi m(i+1)-m(i)
0 0 0      
1 0.8975979 0.61126047 0.8975979 0.68099587 -0.30307168
2 1.7951958 0.95048443 0.8975979 0.3779242 -1.22711216
3 2.6927937 0.1882551 0.8975979 -0.84918796 0.84918796
4 3.5903916 0.1882551 0.8975979 -2.1645E-16 0.84918796
5 4.48798951 0.95048443 0.8975979 0.84918796 -1.22711216
6 5.38558741 0.61126047 0.8975979 -0.3779242 -0.30307168
7 6.28318531 6.004E-32 0.8975979 -0.68099587 0.68099587

2- calcular los coeficientes c i mediante la fórmula


hi Ci +2 ( hi −hi+1 ) C i+1 +hi +1 C i+2=3 ( m i+1 −m i) i=1 , 2,3,4 … n−1
Utilizamos los datos de la tabla
i=1 h1 C 1 +2 ( h1−h 2) C 2+ h2 C 3=3 (m2−m1)
i=2 h2 C2 +2 ( h2−h3 ) C 3 +h3 C 4=3 ( m3−m2 )
i=3 h3 C3 +2 ( h 3−h4 ) C 4 + h4 C5 =3 ( m4−m3 )
i=4 h4 C 4 +2 ( h 4−h 5) C 5 +h5 C6 =3 ( m5 −m4 )
i=5 h5 C5 +2 ( h5 −h6 ) C 6+ h6 C7 =3 ( m6 −m5 )
i=6 h 6 C 6 +2 ( h6−h7 ) C7 +h7 C 8=3 ( m7−m6 )
Reemplazando
i=1 0.8975979∗C 1 +0.8975979∗C 3=−0.90921503
i=2 0.8975979 ¿C 2 +0.8975979 ¿ C4 =−3.68133649
i=3 0.8975979∗C3 +0.8975979 ¿ C5 =2.54756389
i=4 0.8975979∗C 4 + 0.8975979∗C 6=2.54756389
i=5 0.8975979 ¿ C5 +0.8975979 ¿ C7 =−3.68133649
i=6 0.8975979∗C6 + 0.8975979∗C 8=−0.90921503

Ordenando
i=1 0.8975979(C 1+C 3 )=−0.90921503
i=2 0.8975979(C 2+C 4 )=−3.68133649
i=3 0.8975979(C 3 +C5 )=2.54756389
i=4 0.8975979(C 4 +C 6)=2.54756389
i=5 0.8975979(C ¿ ¿ 5+C7 )=−3.68133649¿
i=6 0.8975979(C 6 +C 8)=−0.90921503
Nos queda un sistema de ecuaciones

i=1(C 1+ C3 )=−1.01294246
i=2(C 2 +C 4)=−4.1013203
i=3(C 3 +C 5)=2.83820171
i=4(C 4 +C 6 )=2.83820171
i=5(C ¿ ¿ 5+C 7)=−4.1013203 ¿
i=6 (C6 +C 8 )=1.01294246
Para este caso utilizaremos un trazador cubico libre entonces
Se cumple:
C 1=0
{Cn +1=0
Para nuestro caso n=7
C1=0
{C8 =0
Entonces
(0+C 3 )=−1.01294246
(C 2+C 4 )=−4.1013203
(C 3+ C5 )=2.83820171
(C 4 +C 6)=2.83820171
(C ¿ ¿ 5+C7 )=−4.1013203 ¿
(C 6 +0)=1.01294246
Tenemos entonces
C 3=−1.01294246
C 6=1.01294246
Reemplazando en las ecuaciones
(−1.01294246+C 5)=2.8382017 1
C 5=3.4011441 7

( 3.40114417 +C7 ) =−4.101320 3


C 7=−7.5024644 7

(C 4 +1.01294246)=2.83820171
C 4=1.82525925

(C 2+1.82525925)=−4.1013203
C 2=−5.92657955

Los valores finales de C i son

C1=0

{
C2 =−5.92657 955
C3=−1.0129424 6
C 4=1.825259 25
C 5=3.4011441 7
C6 =1.01294246
C7 =−7.5024644 7
C8 =0
Hallamos los demás coeficientes
1
b i=m i− hi (2 C i+C i+1 )
3
C i+1 +Ci
d i=
3 hi
a i= y i−1
desde i=1 ai=6
i bi di ai ci
0
1 2.45422433 -2.20090367 0 0
2 4.22745278 -2.57707154 0.61126047 -5.92657955
3 -0.7891609 0.30166321 0.95048443 -1.01294246
4 -2.10985252 1.94088517 0.1882551 1.82525925
5 -1.48912359 1.63922196 0.1882551 3.40114412
6 1.26066457 -2.40995885 0.95048443 1.01294246
7 3.80846837 -2.78612671 0.61126047 -7.50246447

Entonces tenemos
pi ( x ) =ai +bi ( x−m i−1 ) +C i ( x−mi−1 )2 +d i ( x−m i−1) 3

p 1 ( x )=2.4542 ( x ) −2.2009 ( x )3 ; x ∈¿

{
p2 ( x ) =0.6112+ 4.227 ( x−0.897 ) +C i ( x−0.897 )2+ di ( x−0.897 )3 ; x ∈ ¿
2 3
p3 ( x ) =0.9504−0.789 ( x −2.692 )−1.0129 ( x−2.692 ) + 0.3016 ( x −2.692 ) ; x ∈ ¿
s( x ) p ( x )=0.1882−2.1098 ( x−3.590 )−1.8252 ( x −3.590 )2+ 1.9408 ( x−3.590 )3 ; x ∈ ¿
4
2 3
p5 ( x )=0.188 2−1.4891 ( x−4.4879 )−3.4011 ( x−4.4879 ) +1.6392 ( x−4.4879 ) ; x ∈ ¿
2 3
p 6 ( x )=0.9504−1.2606 ( x−5.3855 )−1.0129 ( x −5.3855 ) −2.4099 ( x−5.3855 ) ; x ∈¿
p7 ( x )=0.6112−3.8084 ( x−6.2831 )−7.5024 ( x−6.2831 )2 −2.7861 ( x−6.2831 )3 ; x ∈ ¿

También podría gustarte