Tarea2-MetNum

Embed Size (px)

Citation preview

  • 8/18/2019 Tarea2-MetNum

    1/10

    ANÁLISIS Y MÉTODOS NUMÉRICOS

    Nestor Abel Sánchez Goycochea

    13 de julio de 2015

  • 8/18/2019 Tarea2-MetNum

    2/10

    UNIVERSIDAD DEL BÍO-BÍO

    FACULTAD DE CIENCIAS

    DEPARTAMENTO DE MATEMÁTICA

    Profesora: Verónica Anaya Domı́nguez.

        D   e   p   a   r   t   a   m   e   n   t   o    d   e    M   a   t   e   m    ´   a   t    i   c   a  -

        U   n    i   v   e   r   s    i    d   a    d    d   e    l    B    ´   ı   o  -    B    ´   ı   o  -    2    0    1    5

    Análisis y Métoddos Númericos(390026-392056)

    TAREA 2:

    1. Sea  f   función continua en [a, b]  y  f (a)f (b)   <   0. El método de bisección genera unasucesión {ck}

    k=1 que aproxima a x, raı́z de  f , con

    |ck − x∗| ≤  b − a

    2k

    cuando k  ≥  1.

     Demostraci´ on.  Recordemos que en el método de bisección se considera

    ck  = bk + ak

    2  ,   ∀ k ≥  1

    donde a1  =  a, b1 = b  y x∗ ∈ (ak, ck)  ó x∗  ∈  (ck, bk), de aquı́ se sigue que:

    |ak − x∗| ≤  bk − ak

    2  ,   |bk − x∗| ≤

      bk − ak2

      ∀ k ≥  1   (1.1)

    Luego,

    |ck − x∗| = bk + ak2 − x∗=

     1

    2 |(bk − x∗) + (ak − x∗)|

    ≤ 1

    2 (|bk − x∗| + |ak − x∗|)

    Aplicando (1.1) se tiene que

    |ck − x∗| ≤ 1

    2

    bk − ak

    2  +

     bk − ak2

     =

     1

    2(bk − ak)

    Entonces:

    |ck − x∗| ≤ 1

    2(bk − ak),   ∀ k ≥  1   (1.2)

    Por otra parte, la longitud del intervalo se reduce a la mitad en cada fase del método, es

    decir:

    bk − ak  = bk−1 − ak−1

    2  ,   ∀ k ≥  2   (1.3)

    Luego, probaremos por inducción que

    bk − ak =  b − a

    2k−1 ,   ∀ k ≥  1   (1.4)

    1   Nestor Abel S ́  anchez Goycochea

  • 8/18/2019 Tarea2-MetNum

    3/10

    UNIVERSIDAD DEL BÍO-BÍO

    FACULTAD DE CIENCIAS

    DEPARTAMENTO DE MATEMÁTICA

    Profesora: Verónica Anaya Domı́nguez.

    Entonces, si k  = 1  se tiene que  b1 − a1  =  b−a21−1

     y asumamos que (1.4) se cumple para

    k  =  n − 1  (hipótesis inductiva), probaremos que también se cumple para  k  =  n  ≥  2.En efecto,

    bn − an =  bn−1 − an−1

    2  =

     1

    2

      b − a

    2(n−1)−1

     =

      b − a

    2n−1

    Por lo tanto, de (1.2) y (1.4) se concluye que:

    |ck − x∗| ≤ 1

    2

    b − a

    2k−1

     =

      b − a

    2k

    2. Determine el número de iteraciones necesarias en el método de bisección, para aproxi-

    mar la raı́z de f (x) = x3 + 4x2 − 10 en el intervalo [1, 2] con una precisión de 10−3.

     Demostraci´ on.   Como   f   es continua en   [1, 2]   y   f (1)f (2)   <   0, (pues   f (1) =   −5   yf (2) = 14) entonces por el ejercicio 1 se sigue que:

    |ck − x∗| ≤ 2 − 1

    2k  =

      1

    2k

    Para aproximar la raı́z de f (x) = x3 + 4x2 − 10 en el intervalo [1, 2] con una precisiónde 10−3 se debe tener que:

    1

    2k  ≤ 10−3 ⇐⇒ 2k ≥ 103

    ⇐⇒ k ln(2) ≥  ln (1000)

    ⇐⇒ k  ≥  ln(1000)

    ln(2)

    ⇐⇒ k  ≥  9.965784 ≈  10

    Por lo tanto el número de iteraciones necesarias es 10.  

    3. Sea g  función continua en [a, b] y  g(x)  ∈   [a, b], ∀ x  ∈   [a, b], entonces g   tiene al menosun punto fijo en [a, b].

    Si, además g ′(x) está definida en (a, b) y existe K

  • 8/18/2019 Tarea2-MetNum

    4/10

  • 8/18/2019 Tarea2-MetNum

    5/10

    UNIVERSIDAD DEL BÍO-BÍO

    FACULTAD DE CIENCIAS

    DEPARTAMENTO DE MATEMÁTICA

    Profesora: Verónica Anaya Domı́nguez.

     Demostraci´ on.   Considerando xk = g(xk−1) y  g(x∗) = x∗ se sigue que:

    |xk − x∗| =  |g(xk−1) − g(x∗)|

    Por el Teorema del valor medio, ∃ c ∈  [a, b] tal que

    |xk − x∗| ≤ |g′(c)| |xk−1 − x∗|

    |xk − x∗| ≤ K  |xk−1 − x∗| ,   ∀ k ≥  1   (4.1)

    Aplicando recursivamente (4.1) se sigue que:

    |xk − x∗| ≤ K  |xk−1 − x∗|

    ≤ K (K (|xk−2 − x∗|))= K 2 |xk−2 − x∗|

    ≤ K 2(K (|xk−3 − x∗|))

    = K 3 |xk−3 − x∗|

    ≤  ...

    |xk − x∗| ≤ K k |x0 − x∗| ,   ∀ k ≥  1   (4.2)

    En particular, tomando k  = 1 en (4.2) se tiene:

    |x1 − x∗| ≤ K  |x0 − x∗|

    |x1 − x∗| ≤ K  (|x0 − x1| + |x1 − x∗|)

    |x1 − x∗| ≤ K  |x0 − x1| + K |x1 − x∗|

    (1 − K ) |x1 − x∗| ≤ K  |x0 − x1|

    y como 1 − K  ̸= 0 (pues K

  • 8/18/2019 Tarea2-MetNum

    6/10

    UNIVERSIDAD DEL BÍO-BÍO

    FACULTAD DE CIENCIAS

    DEPARTAMENTO DE MATEMÁTICA

    Profesora: Verónica Anaya Domı́nguez.

    Por lo tanto,

    |xk − x∗| ≤

      K k

    1 − K   |x0 − x1|   (4.4)Finalmente, para cualquier ϵ > 0  y aplicando lı́mite en (4.4) se tiene:

    ĺımK →∞

    |xk − x∗| ≤   ĺımK →∞

    K k

    1 − K  |x0 − x1|

    |xk − x∗| ≤ 0  < ϵ

    Esto muestra que {xk}∞

    k=0 converge a x∗.  

    5. Si Q0(f ) =n

    ∑ j=0A jf (t j) es una f ́ormula de cuadratura para aproximar la integral

    1

    ∫ −1f dx,

    entonces para x j  =  b − a

    2  t j+

    a + b

    2  ,  ∀ j  = 0, · · ·  , n; se tiene una f ́ormula de cuadratura

    para el intervalo [a, b]:

    b∫ a

    f dx ∼  Q(f ) =n∑

     j=0

    b − a

    2  A jf (x j)

     Demostraci´ on.   Considere

    x j  =  b − a

    2  t j +

     a + b

    2  ,   ∀  j = 0, · · ·   , n

    y observe que

    Si t0 = −1 ⇒  x0 = b − a

    2  (−1) +

     a + b

    2  = a

    Si tn  = 1 ⇒  xn = b − a

    2  (1) +

     a + b

    2  = b

    Entonces, podemos pasar de una integral en el intervalo  [a, b] al intervalo [−1, 1]., estoes

    b∫ a

    f (x j)dx j  =

    b − a

    2

      1∫ −1

    f (x j(t j))dt j

    b − a

    2

    Q0(f )

    =

    b − a

    2

      n∑ j=0

    A jf (x(t j))

    =n

    ∑ j=0

    b − a

    2

    A jf (x j)

    5   Nestor Abel S ́  anchez Goycochea

  • 8/18/2019 Tarea2-MetNum

    7/10

    UNIVERSIDAD DEL BÍO-BÍO

    FACULTAD DE CIENCIAS

    DEPARTAMENTO DE MATEMÁTICA

    Profesora: Verónica Anaya Domı́nguez.

    6. Determine la regla de cuadratura de Newton-Cotes para aproximar

    b

    ∫ a

    f dx. Consideran-

    do n  = 1, x0 = a + h, x1 = a + 2h, donde h  =  b−a

    3  .

     Demostraci´ on.   Considerando n  = 1 y siguiendo la regla de Newton-Cotes se tiene

    b

    ∫ a

    f (x)dx ≈

    b

    ∫ a

     p1(x)dx =

    b

    ∫ a

    [L0(x)f (x

    0) + L

    1(x)f (x

    1)] dx

    = f (x0)

    b∫ a

    x − x1x0 − x1

    dx + f (x1)

    b∫ a

    x − x0x1 − x0

    dx

    =  f (a + h)

    −h

    b∫ a

    (x − x1)dx + f (a + 2h)

    b∫ a

    (x − x0)dx

    = −f (a + h)

    h

    (x − x1)

    2

    2

    ba

    + f (a + 2h)

    h

    (x − x0)

    2

    2

    ba

    = −3f 

    2a+b3

    b − a

    (b − a)2

    6

     +

     3f a+2b3

    b − a

    (b − a)2

    6

    =

    b − a

    2

    2a + b

    3

     + f 

    a + 2b

    3

    Por lo tanto la regla de cuadratura es:

    b

    ∫ a

    f (x)dx ≈ b − a2 f 2a + b3  + f a + 2b3

    7. Determine la regla de cuadratura de Newton-Cotes para aproximar

    b

    ∫ a

    f dx. Consideran-

    do n  = 2, x0 = a + h, x1 = a + 2h, x2  =  a + 3h, donde h  =  b−a

    4  .

     Nestor Abel S ́  anchez Goycochea   6

  • 8/18/2019 Tarea2-MetNum

    8/10

    UNIVERSIDAD DEL BÍO-BÍO

    FACULTAD DE CIENCIAS

    DEPARTAMENTO DE MATEMÁTICA

    Profesora: Verónica Anaya Domı́nguez.

     Demostraci´ on.   Considerando n  = 2 y siguiendo la regla de Newton-Cotes se tiene

    b∫ a

    f (x)dx ≈

    b∫ a

     p2(x)dx =

    b∫ a

    [L0(x)f (x0) + L1(x)f (x1) + L2(x)f (x2)] dx

    = f (x0)

    b∫ a

     x − x1x0 − x1

     x − x2x0 − x2

    dx

       A

    +f (x1)

    b∫ a

     x − x0x1 − x0

     x − x2x1 − x2

    dx

       B

    + f (x2)

    b

    ∫ a

     x − x0x2 − x0 x − x1

    x2 − x1 dx   C 

    (7.1)

    Luego,

    A =  1

    (x0 − x1

       −h)(x0 − x2

       −2h)

    b∫ a

    [x2 − (x1 + x2)x + x1x2]dx

    =  1

    2h2

    x3

    3  −

     (x1 + x2)x2

    2  + (x1x2)x

    ba

    =  1

    2h2

    b3 − a3

    3  −

     (x1 + x2)

    2  (b2 − a2) + (x1x2)(b − a)

    = (b − a)

    2h2

    b2 + ab + a2

    3  −

     (x1 + x2)

    2  (b + a) + (x1x2)

    =  4h

    2h2

    b2 + ab + a2

    3  −

     3a + 5b

    8  (b + a) +

     a2 + 3b2 + 4ab

    8

    =  2ha2 + b2 − 2ab

    12

    =  8

    b − a

    (b − a)2

    12

    A = 2

    3(b − a)

    De forma análoga

    B = − 13

    (b − a), C  = 23

    (b − a)

    7   Nestor Abel S ́  anchez Goycochea

  • 8/18/2019 Tarea2-MetNum

    9/10

    UNIVERSIDAD DEL BÍO-BÍO

    FACULTAD DE CIENCIAS

    DEPARTAMENTO DE MATEMÁTICA

    Profesora: Verónica Anaya Domı́nguez.

    Luego, reemplazando A, B  y  C  en (7.1) obtenemos:

    b∫ a

    f (x)dx ≈  f (x0)2

    3(b − a) − f (x1)

    1

    3(b − a) + f (x2)

    2

    3(b − a)

    = 2

    3(b − a)

    f (x0) −

     1

    2f (x1) + f (x2)

    = 2

    3(b − a)

    3a + b

    4

     1

    2f 

    a + b

    2

     + f 

    a + 3b

    4

    Por lo tanto la regla de cuadratura es:

    b∫ a

    f (x)dx ≈ 2

    3(b − a)

    f 3a + b

    4

     1

    2f a + b

    2

     + f 

    a + 3b4

    8. Determine el número de sub-intervalos necesarios para que el error que se comete al

    aproximar

    1∫ 0

    e−x2

    dx por la regla de Trapecios Compuesta sea menor que 10−4.

     Demostraci´ on.  El error que se comete al aproximar una función por la regla de Trape-

    cios Compuesta, para nuestro caso, es:

    |E 1(f )| ≤ (1 − 0)3

    12m2  máxx∈[0,1]

    |f ′′(x)|

    Para que dicho error sea menor a 10−4 se debe tener:

    1

    12m2  máxx∈[0,1]

    |f ′′(x)| ≤ 10−4 (8.1)

    Por otra parte

    f (x) = e−x2

    =⇒ f ′(x) = −2xe−x2

    =⇒ f ′′(x) = e−x2

    (4x2 − 2)

    =⇒ |f ′′(x)| =e−x2 4x2 − 2

    =⇒ |f ′′(x)| ≤4x2 − 2   (8.2)

    Además como x  ∈  [0, 1] se tiene:

    0 ≤  x2 ≤ 1 =⇒ 0  ≤  4x2 ≤ 4 =⇒ −2 ≤  4x2 − 2 ≤  2

    entonces 4x2 − 2 ≤  2   (8.3) Nestor Abel S ́  anchez Goycochea   8

  • 8/18/2019 Tarea2-MetNum

    10/10

    UNIVERSIDAD DEL BÍO-BÍO

    FACULTAD DE CIENCIAS

    DEPARTAMENTO DE MATEMÁTICA

    Profesora: Verónica Anaya Domı́nguez.

    Ası́ de (8.2) y (8.3) se tiene|f ′′(x)| ≤ 2

    y tomando max́imo

    máxx∈[0,1]

    |f ′′(x)| = 2   (8.4)

    Luego, de (8.1) y (8.4)

    1

    12m2(2) ≤  10−4

    m2 ≥ 104

    6

    m ≥ √ 50003m ≥  40.8248 · · · ≈ 41

    Por lo tanto se necesitan 41  iteraciones para que el error sea menor a 10−4.  

    9   Nestor Abel S ́  anchez Goycochea