Metodos Numericos Derivacion e Integracion

download Metodos Numericos Derivacion e Integracion

of 20

Transcript of Metodos Numericos Derivacion e Integracion

  • 7/24/2019 Metodos Numericos Derivacion e Integracion

    1/20

    df(x)

    f(x)

    f(x) = sin(x) x = 2;13432 h h

    f(x) = f1f0h +O(h)f(x) = sin(x)x= 2, 13432

    f(x) =0, 53416f(x) = sin(2,13432+h)sin(2,13432)hh= 2 : f(x) =0, 84144 error= 57, 52%h= 1 : f(x) =0, 83810 error= 56, 90%h= 0, 5 : f(x) =0, 71916 error= 34, 63%h= 0, 2 : f(x) =0, 61487 error= 15, 10%h= 0, 1 : f(x) =0, 57551 error= 7, 74%

  • 7/24/2019 Metodos Numericos Derivacion e Integracion

    2/20

    g(x) = 1/(1 +ex) x= 1/2

    f(x) = f1f0h +O(h) f(x) = f0f1h

    f(x) = sin(x) f(x) = sin(x) x= 2, 13432 x= 2, 13432 f(x) =0, 53416 f(x) =0, 53416f(x) = sin(2,13432+h)sin(2,13432)h f

    (x) = sin(2,13432)sin(2,13432h)hh= 2 : f(x) =0, 84144 h= 2 : f(x) = 0, 35573h= 1 : f(x) =0, 83810 h= 1 : f(x) =0, 06086h= 0, 5 : f(x) =0, 71916 h= 0, 5 : f(x) =0, 30520h= 0, 2 : f(x) =0, 61487 h= 0, 2 : f(x) =0, 44635h= 0, 1 : f(x) =0, 57551 h= 0, 1 : f(x) =0, 49104

    f(x) = f1f0h +O(h) f(x) = f0f1h

    g(x) = 1/(1 +ex) g(x) = 1/(1 +ex) x= 1/2 x= 1/2

    g(x) =0, 2350

    g(x) =0, 2350g(x) =

    1

    1+e0,5+h 1

    1+e0,5

    h g(x) =

    11+e0,5

    11+e0,5h

    h

    h= 2 : g(x) =0, 15084 h= 2 : g(x) =0, 22001h= 1 : g(x) =0, 19511 h= 1 : g(x) =0, 24491h= 0, 5 : g(x) =0, 21719 h= 0, 5 : g(x) =0, 24991h= 0, 2 : g(x) =0, 22864 h= 0, 2 : g(x) =0, 24008h= 0, 1 : g(x) =0, 23196 h= 0, 1 : g(x) =0, 23771

    h h

    f(x) = sin(x)

    x= 0, 6

    h = 0, 1

    h= 0, 01 h= 0, 0000000001

    f(x) = f1f0h +O(h)f(x) = sin(x)x= 0, 6f(x) = 0, 82533f(x) = sin(0,6+h)sin(0,6)hh= 0, 1 : f(x) = 0, 79575 error= 3, 58%h= 0, 01 : f(x) = 0, 82249 error= 0, 34%h= 0, 0000000001 : f(x) = 0, 82531 error= 0, 0024%

    h

    h h

    f(x) = tan(x) x = 3, 14 h = 0, 1 h = 0, 01

    f(x) = tan(x)x= 3, 14f(x) = 1, 00000f(x) = tan(3,14+h)tan(3,14)h

  • 7/24/2019 Metodos Numericos Derivacion e Integracion

    3/20

    h= 0, 1 : f(x) = 1, 00318h= 0, 01 : f(x) = 1, 00001

    g(x)

    xi

    f(x) = (0,990025)+4(0,997502)3(1)0,2 =8, 5x105f(x) = 12(0,997502)+0,9900250,22 =0, 12447f(x) = 0,9975022(0,990025)+0.9603980,22 =0, 55375f(x) = 0,9900252(0,960398)+0,9406780,22 = 0, 2476

    f(x) = 3(0,940678)4(0,960398)+0,9900250,4 =0, 07383

    f(x) =arctan(x) x=

    2 h

    f(x) = f12f0+f1h2f(x) = arctan(x)x=

    2

    f(x) = 1/3

    f(x) = arctan(2+h)2arctan(

    2)+arctan(

    2h)

    h2

    h= 2 : f(x) =0, 28866 error= 13, 40%h= 1 : f(x) =0, 33983 error= 1, 94%h= 0, 5 : f(x) =0, 32254 error= 3, 23%h= 0, 2 : f(x) =0, 31565 error= 5, 305%h= 0, 1 : f(x) =0, 31461 error= 5, 617%

    x, x+h, x+ 2h, x+ 3h xh f(x) f(xh) = f(x)f(x)h+ 12f(x)h2 16f(3)(x)h3 + 124f(4)(x)(h)4 +O(h5)f(x+h) = f(x) +f(x)h+ 12f

    (x)h2 + 16f(3)(x)h3 + 124f

    (4)(x)h4 +O(h5)

    f(x+ 2h) = f(x) + 2f(x)h+ 12f(x)(2h)2 + 16f

    (3)(x)(2h)3 + 124f(4)(x)(2h)4 +O(h5)

    f(x+ 3h) = f(x) + 3f(x)h+ 12f(x)(3h)2 16f(3)(x)(3h)3 + 124f(4)(x)(3h)4 +O(h5)

    f(x+ 3h)f(x2h) = f(x)h+ 52f

    (x)h2 + 196f(3)(x)h3 +O(h4)

    f(x+h)f(xh) = 2f(x)h+ 26f(3)(x)h3 +O(h5)8(f(x+h)f(xh))(f(x+ 3h)f(x2h)) = 12f(x)h+O(h5)f

    (x) 112h [f(x+ 2h) + 8f(x+h)8f(xh) +f(x2h)] +O(h4)

    J0(x) J0(0, 0) = 1; 00000000, J0(0, 1) =0, 99750156, J0(0, 2) = 0, 99002497, J0(0, 3) = 0, 97762625, J0(0, 4) = 0, 96039823 J0(0, 5) = 0, 93846981.

  • 7/24/2019 Metodos Numericos Derivacion e Integracion

    4/20

    x f0(x) f

    (x)

    0, 0 1, 00000000 0, 0000010, 1 0, 99750156 0, 0409360, 2 0, 99002497 0, 00495010, 3 0, 97762625 0, 1483180, 4 0, 96039823

    0, 146427

    0, 5 0, 93846981 0, 242786 f(x) =|x2| cos(x) x = 2

    h f0(x) f

    (x) f

    (x)

    1, 0 1, 00000000 0, 414847 0, 651840, 8 0, 99750156 0, 753147 0, 486090, 6 0, 99002497 0, 43594 0, 801190, 4 0, 97762625 0, 12915 0, 588500, 2 0, 96039823 0, 40778 0, 50484

    f(x) ={

    0,1

  • 7/24/2019 Metodos Numericos Derivacion e Integracion

    5/20

    f

    (x) =f2+16f130f0+16f1+f2

    12h2

    f(x) = 1/(1 +x2)

    x= 1

    f(x) = 0, 5

    f(x) = 1

    1+(1+(1+2h)2)+ 16

    1+(1+(1+h)2) 30

    1+(1+(1)2)+ 16

    1+(1+(1h)2)+ 1

    1+(1+(12h)2)

    12h2

    h= 0, 5 : f

    (x) = 0, 40305h= 0, 3 : f

    (x) = 0, 93093h= 0, 1 : f

    (x) = 13, 1865

    h= ban+ 2

    =120

    4 + 2 =

    12

    6 = 2

    x1 = a+hx2 = a+ 2hx3 = a+ 3hx4 = a+ 4h

    x5 = a+ 5h

    x1 = 2x2 = 4x3 = 6x4 = 8x5 = 10

    h= b

    a

    n =12

    0

    3 =12

    3 = 4

    x0 = ax1 = a+hx2 = a+ 2hx3 = a+ 3h= b

    x0 = 0

  • 7/24/2019 Metodos Numericos Derivacion e Integracion

    6/20

    x1 = 4x2 = 8x3 = 12

    h= ba

    n =

    1202

    =12

    2 = 6

    x0 = ax1 = a+hx2 = a+ 2h= b

    x0 = 0x1 = 6x2 = 12

    0 sin xdx

    0 sin xdx= pi

    22 (sin(0) + 2sin(/2) +sin())0 sin xdx=

    pi

    22 (0 + 21 + 0)0 sin xdx=

    pi

    2 = 1.5708

    20

    3x2dx

    ba

    f(x)dx=3

    8h [f(x0) + 3f(x1) + 3f(x2) +f(x3)]

    a= 0b= 2h= ban =

    203 =

    23

    xk f(xk)0 0

    2/3 4/34/3 16/3

    2 12

    2

    0

    3x2dx=3

    8 2

    3

    0 + 3

    4

    3

    + 3

    16

    3

    + 12

    = 8

    ba sin xdx

  • 7/24/2019 Metodos Numericos Derivacion e Integracion

    7/20

    Erect=(ba)2

    2 f ()

    ESimp =(ba)5

    90 =f(4) ()

    f (0) = cos (0) = 1

    fiv

    2

    = sin

    2

    = 1

    (ba)22

    =(ba)5

    90

    45 (ba)2 = (ba)5

    ba= 3

    45 = 3.556899

    10

    x2exdx

    1

    0

    x2exdx= 0.1606027941

    a= 0b= 1a+b2 =

    12

    ba

    f(x)dx= (ba) f

    a+b

    2

    1

    0

    x2exdx= (10)f

    1

    2

    1

    0

    x2exdx= 0.1516326649

    a= 0b= 1a+b2 =

    12

    b

    a

    f(x)dx= (f(a) +f(b)) ba

    2 1

    0

    x2exdx= (0 + 0.3678794412)

    102

    1

    0

    x2exdx= 0.1839397206

  • 7/24/2019 Metodos Numericos Derivacion e Integracion

    8/20

    ba

    f(x)dx=

    ba

    6

    f(a) + 4f(

    a+b

    2 ) +f(b)

    1

    0

    x2exdx=

    106

    0 + 4f(

    1

    2) + 0.3678794412

    1

    0

    x2exdx=

    106

    [0 + 40.1516326649 + 0.3678794412]

    1

    0

    x2exdx= 0.1624016835

    f(x) = sin(x)f(x) = 1 +ex cos (4x)f(x) = sin (

    x)

    P1(x) = f(x0)(xx1)

    (x0x1)+ f(x1)

    (xx0)

    (x1x0)

    xk f(xk)x0 = a f(x0)x1 = b f(x1)

    ba

    f(x)dx=

    f(a)

    ba

    (xb)(ab)

    dx+f(b)

    ba

    (xa)(ba)

    dx

    b

    a

    f(x)dx=

    f(a)

    (ab)

    b

    a

    (xb)dx+ f(b)(ba)

    b

    a

    (xa)dx

    b

    a

    f(x)dx=

    f(a)

    (ab)

    x2

    2bx

    b

    |a

    + f(b)

    (ba)

    x2

    2ax

    b

    |a

  • 7/24/2019 Metodos Numericos Derivacion e Integracion

    9/20

    ba

    f(x)dx= f(a)

    (ab)

    1

    2

    b2 a2+b(ab)+ f(b)

    (ba)

    1

    2

    b2 a2a(ba)

    ba

    f(x)dx=f(a)(ab)

    (ab) 1

    2(a+b) +b

    +

    f(b)(ba)(ba)

    1

    2(b+a)a

    ba

    f(x)dx= f(a)a

    2 b

    2+ b

    +f(b)

    a

    2+

    b

    2a

    ba

    f(x)dx=f(a)

    2 (ba) + f(b)

    2 (ba)

    ba

    f(x)dx= (f(a) +f(b))

    ba2

  • 7/24/2019 Metodos Numericos Derivacion e Integracion

    10/20

  • 7/24/2019 Metodos Numericos Derivacion e Integracion

    11/20

    b

    a

    g(x)dx=

    1

    0

    1 + 9x4dx

    ba

    g(x)dx=m1i=0

    hg(xi) +Error

    g(x) =

    1 + 9x4

    g

    (x) = 36x3

    2

    1 + 9x4

    a= 0b= 1

    = 13h= bam =

    104 =

    14

    xk g(xk)0 1

    1/4

    256/161/2 5/4

    3/4

    97/4

    ba

    g(x)dx=m1i=0

    hg(xi) +Error

    m1i=0

    hg(xi) = 1h

    (g(x1) +g(x2)g(x3))

    1

    0

    1 + 9x4dx=

    1

    4

    256

    16 +

    5

    4+

    97

    4

    +Error

    1

    0

    1 + 9x4dx= 1.178053613 +Error

    1

    0

    1 + 9x4dx= 1.178053613 (ba) h

    2 g()

    = 1.178053613

    (10)2 1

    4g

    1

    3

  • 7/24/2019 Metodos Numericos Derivacion e Integracion

    12/20

    Error=(ba) h2

    g()

    Error=

    (10)2

    14

    10

    5

    = 0.0790569415

    Er% =

    IanaticaInumerica|Ianatica 100%

    Er% =

    1.5478656551.1780536131.547865655 100%

    Er% = 23.89

    ba

    g(x)dx=h

    2

    g(x0) + 2

    m1i=0

    g(xi) +g(xm)

    +Error

    m1i=0

    hg(xi) = 2(g(x1) +g(x2)g(x3))

    1

    0

    1 + 9x4dx=

    1

    2 1

    4

    1 + 2

    256

    16 +

    5

    4+

    97

    4

    +

    10

    +Error

    = 1.69833832 +Error

    Error=(ba) h212

    g()

    Error=(10)

    12

    1

    4

    2(8.208)

    Error= 3.29103

    Er% =

    IanaticaInumerica|Ianatica 100%

    Er% = 1.5478656551.69833832

    1.547865655

    100%

    Er% = 9.72

    b

    a

    g(x)dx=h

    3

    g(x0) + 4

    mi=1

    g(x2i1) + 2m1i=1

    g(x2i) +g(x2m)

    +Error

  • 7/24/2019 Metodos Numericos Derivacion e Integracion

    13/20

    a= 0b= 1= 13h= ba2m =

    1023 =

    16

    xk g(xk)

    0 11/6 145/122/6

    10/3

    3/6 5/44/6 5/3

    5/6

    769/12

    b

    a

    g(x)dx=h

    3

    g(x0) + 4

    3i=1

    g(x2i1) + 22

    i=1

    g(x2i) +g(x2m)

    +Error

    impar3

    i=1g(x2i1) = g(x1) +g(x3) +g(x5) =

    145

    12 +

    5

    4+

    769

    12 = 4.564370319

    par2

    i=1

    g(x2i) = g(x2) +g(x4) =

    10

    3 +

    5

    3=

    5 +

    10

    3

    1

    0

    1 + 9x4dx=

    1

    3 1

    6

    1 + 4(4.564370319) + 2

    5 +

    10

    3

    +

    10

    +Error

    = 1.547848743 +Error

    Error=(ba) h4

    180 g(4)()

    g

    (x) = 36x3

    2

    1 + 9x4

    g

    (x) =54(3x6 +x2)

    3

    1 + 9x4

    g

    (x) =180x(19x4)

    5

    1 + 9x4

    g(4)(x) =108(405x8 126x4 + 1)

    7

    1 + 9x4

    g(4)() =108(4058 1264 + 1)

    7

    1 + 94g(4)(

    1

    3) =87.56099604

    1

    0

    1 + 9x4dx= 1.547848743

  • 7/24/2019 Metodos Numericos Derivacion e Integracion

    14/20

    Er% =

    IanaticaInumerica|Ianatica 100%

    Er% =

    1.5478656551.5478487431.547865655

    100%

    Er% = 1.09103

    1.09103

    longitud =

    /4

    0

    1 + (sin(x))2dx= 0.8520033931

    ba

    g(x)dx=

    /4

    0

    1 + (sin(x))2dx

    ba

    g(x)dx=m1i=0

    hg(xi) +Error

    g(x) =

    1 + (sin(x))

    2

    g

    (x) =sin(x)cos(x)

    1 + (sin(x))2

    a= 0b= 4= 16h= bam =

    404 =

    16

    xk g(xk)

    0 1/16 1.01885241

    2/16 1.0707224713/16 1.143966033

    4/1662

    b

    a

    g(x)dx=m1i=0

    hg(xi) +Error

  • 7/24/2019 Metodos Numericos Derivacion e Integracion

    15/20

    m1i=0

    hg(xi) = 1h

    (g(x1) +g(x2) +g(x3))

    /4

    01 + (sin(x))

    2dx=

    16(1.01885241 + 1.070722471 + 1.143966033)

    /4

    0

    1 + (sin(x))

    2dx= 0.6349042738

    Er% =

    IanaticaInumerica|Ianatica 100%

    Er% =

    0.85200339310.63490427380.8520033931

    100%

    Er% = 25.48

    ba

    g(x)dx=h

    2

    g(x0) + 2

    m1i=0

    g(xi) +g(xm)

    +Error

    m1i=0

    hg(xi) = 2(g(x1) +g(x2) +g(x3))

    /4

    0

    1 + (sin(x))2dx=

    1

    2

    16

    1 + 2 (1.01885241 + 1.070722471 + 1.143966033) +

    6

    2

    /4

    0

    1 + (sin(x))

    2dx= 0.8533180908

    Er% =

    IanaticaInumerica|Ianatica 100%

    Er% = 0.85200339310.8533180908

    0.8520033931

    100%

    Er% = 0.154

    b

    a

    g(x)dx=h

    3

    g(x0) + 4

    mi=1

    g(x2i1) + 2m1i=1

    g(x2i) +g(x2m)

    +Error

  • 7/24/2019 Metodos Numericos Derivacion e Integracion

    16/20

    b

    a

    g(x)dx=h

    3

    g(x0) + 4

    3i=1

    g(x2i1) + 22

    i=1

    g(x2i) +g(x2m)

    +Error

    a= 0b= 4

    m= 3

    h= ba

    2m =

    4023 =

    24

    xk g(xk)0 1

    /24 1.0084825662/24 1.0329507723/24 1.070722471

    4/2452

    5/24 1.170722203

    6/2462

    impar3

    i=1

    g(x2i1) = g(x1) +g(x3) = 1.008482566 + 1.070722471 = 2.079205037

    par2

    i=1

    g(x2i) = g(x2) = 1.070722471

    /4

    0

    1 + (sin(x))

    2dx=1

    3

    16

    1 + 4 (2.079205037) + 2 (1.070722471) +

    6

    2

    /4

    0

    1 + (sin(x))

    2dx= 0.8301010608

    Er% =

    IanaticaInumerica|Ianatica 100%

    Er% =

    0.85200339310.83010106080.8520033931 100%

    Er% = 2.57

  • 7/24/2019 Metodos Numericos Derivacion e Integracion

    17/20

    ex

    longitud =

    1

    0

    1 +e2xdx= 1.192701402

    ba

    g(x)dx=

    1

    0

    1 +e2xdx

    b

    a

    g(x)dx=m1i=0

    hg(xi) +Error

    g(x) = 1 +e2xa= 0b= 1= 1/3h= bam =

    16

    xk g(xk)0 2

    1/6 1.3101646122/6 1.2302101933/6 1.1695637824/6 1.1240983675/6 1.090355723

    1 1.065521132b

    a

    g(x)dx=m1i=0

    hg(xi) +Error

    m1i=0

    hg(xi) = 1h

    (g(x1) +g(x2) +g(x3) +g(x4) +g(x5))

    1

    0

    1 +e2xdx=1

    6(1.310164612 + 1.230210193 + 1.169563782 + 1.124098367 + 1.090355723)

    1

    0

    1 +e2xdx= 0.9873987795

    Er% =

    IanaticaInumerica|Ianatica 100%

  • 7/24/2019 Metodos Numericos Derivacion e Integracion

    18/20

    Er% =

    1.1927014020.98739877951.192701402 100%

    Er% = 17.213245

    b

    a

    g(x)dx=h

    2

    g(x0) + 2

    m1i=0

    g(xi) +g(xm)

    +Error

    m1i=0

    hg(xi) = 2(g(x1) +g(x2) +g(x3) +g(x4) +g(x5))

    1

    01 +e2xdx=

    1

    2

    1

    6

    (2 + 2(1.310164612 + 1.230210193 + 1.169563782 + 1.124098367 + 1.090355723) + 1.0655

    1

    0

    1 +e2xdx= 1.2428588738

    Er% =

    IanaticaInumerica|Ianatica 100%

    Er% =

    1.1927014021.24285887381.192701402 100

    Er% = 4.2053670

    b

    a

    g(x)dx=h

    3

    g(x0) + 4

    mi=1

    g(x2i1) + 2m1i=1

    g(x2i) +g(x2m)

    +Error

    b

    a

    g(x)dx=h

    3

    g(x0) + 4

    3i=1

    g(x2i1) + 22

    i=1

    g(x2i) +g(x2m)

    +Error

    a= 0

    b= 4

    m= 3

    h= ba

    2m =

    1023 =

    1

    6

  • 7/24/2019 Metodos Numericos Derivacion e Integracion

    19/20

    xk g(xk)0 2

    1/6 1.3101646122/6 1.2302101933/6 1.169563782

    4/6 1.1240983675/6 1.0903557231 1.065521132

    impar3

    i=1

    g(x2i1) = g(x1) +g(x3) = 1.310164612 + 1.169563782 = 2.479728394

    par2

    i=1

    g(x2i) = g(x2) = 1.230210193

    1

    0

    1 +e2xdx=

    1

    3 1

    6(2 + 4 (2.479728394) + 2 (1.230210193) + 1.065521132)

    1

    0

    1 +e2xdx= 0.858047505

    Er% =

    IanaticaInumerica|Ianatica 100%

    Er% =

    0.85200339310.8580475050.8520033931 100%

    Er% = 0.709399979.

    20

    g(t)dt= w0g(0) +w1g(1) +w2g(2)

    t2

    g(0) = 1, g(1) = 1, g(2) = 1 20

    g(t)dt=

    20

    dt

    =t|20 = 2w0+w1+w2 = 2

    g(0) = 0, g(1) = 1, g(2) = 2

  • 7/24/2019 Metodos Numericos Derivacion e Integracion

    20/20

    20

    tdt= t2

    2 |20

    20

    tdt= 2

    w1+ 2w2 = 2

    t2g(0) = 0, g(1) = 1, g(2) = 4

    20

    t2dt= t3

    3 |20

    20

    tdt=8

    3

    w1+ 4w2 =8

    3

    w0 + w1 + w2 = 20 + w1 + 2w2 = 2

    0 + w1 + 4w2 = 83

    w0 =1

    3

    w1 =4

    3

    w2 =1

    3

    f(x0 +ht) = g(t)

    x= x0 +ht

    dx= hdt

    xi+1

    xi

    f(x)dx=

    h

    3

    f(xi) + 4f(

    xi+xi+12

    ) +f(xi+1)

    x1+htx0+ht

    g(t)hdt=

    13

    xi+1x0

    t

    f(xi) + 4f

    2xi+ht

    2

    +f(xi+1)