ejercicio 1 del método de bisección. la ecuación … · 7, 1.109375000, k5.079502106 8,...

22
> > (5) (5) (2) (2) (4) (4) > > (3) (3) > > (1) (1) > > > > > > > > > > > > Ejercicio 1 del método de bisección. La ecuación estudiada por Leonardo de Pisa. Es importante la terminología. f d x/x 3 C 2$ x 2 C10$x K 20; f := x/x 3 C 2 x 2 C 10 x K20 f 1 ; K 7 f 2 ; 16 Métodos de Maple. Hallamos las raíces. fsolve f ; 1.368808108 solve f x ; 1 3 352 C 6 3930 1/3 K 26 3 352 C6 3930 1/3 K 2 3 , K 1 6 352 C 6 3930 1/3 C 13 3 352 C6 3930 1/3 K 2 3 C 1 2 I 3 1 3 352 C 6 3930 1/3 C 26 3 352 C6 3930 1/3 , K 1 6 352 C 6 3930 1/3 C 13 3 352 C 6 3930 1/3 K 2 3 K 1 2 I 3 1 3 352 C 6 3930 1/3 C 26 3 352 C6 3930 1/3 plot f x , x = 1 ..2 ;

Upload: vuhanh

Post on 19-Sep-2018

228 views

Category:

Documents


0 download

TRANSCRIPT

> >

(5)(5)

(2)(2)

(4)(4)

> >

(3)(3)

> >

(1)(1)

> >

> >

> >

> >

> >

> >

Ejercicio 1 del método de bisección. La ecuación estudiada por Leonardo de Pisa.

Es importante la terminología.

f d x/x3C2$ x2C10$xK20;f := x/x3C2 x2C10 xK20

f 1 ; K7

f 2 ;16

Métodos de Maple.

Hallamos las raíces.

fsolve f ;1.368808108

solve f x ;13

352C6 39301/3

K26

3 352C6 39301/3 K

23

, K16

352C6 39301/3

C13

3 352C6 39301/3

K23C

12

I 3 13

352C6 39301/3

C26

3 352C6 39301/3 , K

16

352C6 39301/3

C13

3 352C6 39301/3

K23K

12

I 3 13

352C6 39301/3

C26

3 352C6 39301/3

plot f x , x = 1 ..2 ;

> >

> >

> >

> >

> >

(6)(6)

> >

x1.2 1.4 1.6 1.8 2

K4

K3

K2

K1

0

1

2

3

a d 1; b d 2; n d 7; h dbKa

2nK1 ;

a := 1b := 2n := 7

h :=164

for i from 1 to 2nK1 do print i, evalf aCi$h , evalf f aC i$h ; end do;1, 1.015625000, K6.7331504822, 1.031250000, K6.4638366703, 1.046875000, K6.1920356754, 1.062500000, K5.9177246095, 1.078125000, K5.6408805856, 1.093750000, K5.361480713

7, 1.109375000, K5.0795021068, 1.125000000, K4.7949218759, 1.140625000, K4.50771713310, 1.156250000, K4.21786499011, 1.171875000, K3.92534256012, 1.187500000, K3.63012695313, 1.203125000, K3.33219528214, 1.218750000, K3.03152465815, 1.234375000, K2.72809219416, 1.250000000, K2.42187500017, 1.265625000, K2.11285018918, 1.281250000, K1.80099487319, 1.296875000, K1.48628616320, 1.312500000, K1.16870117221, 1.328125000, K0.848217010522, 1.343750000, K0.524810791023, 1.359375000, K0.198459625224, 1.375000000, 0.130859375025, 1.390625000, 0.463169097926, 1.406250000, 0.798492431627, 1.421875000, 1.13685226428, 1.437500000, 1.47827148429, 1.453125000, 1.82277298030, 1.468750000, 2.17037963931, 1.484375000, 2.52111434932, 1.500000000, 2.87500000033, 1.515625000, 3.23205947934, 1.531250000, 3.59231567435, 1.546875000, 3.95579147336, 1.562500000, 4.32250976637, 1.578125000, 4.69249343938, 1.593750000, 5.06576538139, 1.609375000, 5.44234848040, 1.625000000, 5.82226562541, 1.640625000, 6.20553970342, 1.656250000, 6.59219360443, 1.671875000, 6.98225021444, 1.687500000, 7.37573242245, 1.703125000, 7.77266311646, 1.718750000, 8.17306518647, 1.734375000, 8.57696151748, 1.750000000, 8.984375000

> >

> >

(9)(9)

(7)(7)

> >

(10)(10)

> > > >

(8)(8)

49, 1.765625000, 9.39532852250, 1.781250000, 9.80984497151, 1.796875000, 10.2279472452, 1.812500000, 10.6496582053, 1.828125000, 11.0750007654, 1.843750000, 11.5039978055, 1.859375000, 11.9366722156, 1.875000000, 12.3730468857, 1.890625000, 12.8131446858, 1.906250000, 13.2569885359, 1.921875000, 13.7046012960, 1.937500000, 14.1560058661, 1.953125000, 14.6112251362, 1.968750000, 15.0702819863, 1.984375000, 15.53319931

64, 2., 16.

for i from 1 to 2nK1 do m i d evalf aC i$h ; end do:m 23 ; m 24 ;

1.3593750001.375000000

k d 3; en d k$ ln 10

ln 2; evalf en ;

k := 3

en :=3 ln 10

ln 29.965784285

c7 = m 23 Cm 24

2;

c7 = 1.367187500

(1)(1)

> >

> >

(2)(2)> >

(3)(3)

> >

> >

(5)(5)

> > > >

(4)(4)> >

> >

Ejercicio 2 del método de bisección. El intervalo es (0,1).

f d x/x5K3$ x2C1;f := x/x5K3 x2C1

f 0 ; 1

f 1 ;K1

Métodos de Maple.

Hallamos las raíces.

fsolve f ;K0.5610700072

solve f x ;RootOf _Z5K3 _Z2C1, index = 1 , RootOf _Z5K3 _Z2C1, index = 2 , RootOf _Z5K3 _Z2

C1, index = 3 , RootOf _Z5K3 _Z2C1, index = 4 , RootOf _Z5K3 _Z2C1, index = 5

plot f x , x = 0 ..1 ;

> >

> >

> >

(6)(6)

> >

> >

> >

x0.2 0.4 0.6 0.8 1

K1

K0.5

0

0.5

1

a d 0; b d 1; n d 7; h dbKa

2nK1 ;

a := 0b := 1n := 7

h :=164

for i from 1 to 2nK1 do print i, evalf aCi$h , evalf f aC i$h ; end do;1, 0.01562500000, 0.99926757912, 0.03125000000, 0.99707034233, 0.04687500000, 0.99340842944, 0.06250000000, 0.98828220375, 0.07812500000, 0.98169236356, 0.09375000000, 0.9736400545

7, 0.1093750000, 0.96412698098, 0.1250000000, 0.95315551769, 0.1406250000, 0.940728821810, 0.1562500000, 0.926850944811, 0.1718750000, 0.911526943612, 0.1875000000, 0.894762992913, 0.2031250000, 0.876566496714, 0.2187500000, 0.856946200115, 0.2343750000, 0.835912301216, 0.2500000000, 0.813476562517, 0.2656250000, 0.789652423018, 0.2812500000, 0.764455109819, 0.2968750000, 0.737901750020, 0.3125000000, 0.710011482221, 0.3281250000, 0.680805568622, 0.3437500000, 0.650307506323, 0.3593750000, 0.618543139724, 0.3750000000, 0.585540771525, 0.3906250000, 0.551331275126, 0.4062500000, 0.515948206227, 0.4218750000, 0.479427914128, 0.4375000000, 0.441809654229, 0.4531250000, 0.403135699230, 0.4687500000, 0.363451451131, 0.4843750000, 0.322805552732, 0.5000000000, 0.281250000033, 0.5156250000, 0.238840253134, 0.5312500000, 0.195635348635, 0.5468750000, 0.151698011036, 0.5625000000, 0.107094764737, 0.5781250000, 0.0618960456938, 0.5937500000, 0.01617631316

39, 0.6093750000, K0.0299858385740, 0.6250000000, K0.0765075683641, 0.6406250000, K0.123301676542, 0.6562500000, K0.170276492843, 0.6718750000, K0.217335765244, 0.6875000000, K0.264378547745, 0.7031250000, K0.311299088446, 0.7187500000, K0.357986718447, 0.7343750000, K0.404325739548, 0.7500000000, K0.4501953125

> >

(12)(12)

> >

(7)(7)

> >

(9)(9)

> >

(10)(10)

> >

> >

(11)(11)

(8)(8)

> >

> >

(13)(13)

49, 0.7656250000, K0.495469345750, 0.7812500000, K0.540016382951, 0.7968750000, K0.583699491852, 0.8125000000, K0.626376152053, 0.8281250000, K0.667898143654, 0.8437500000, K0.708111435255, 0.8593750000, K0.746856072056, 0.8750000000, K0.783966064557, 0.8906250000, K0.819269276258, 0.9062500000, K0.852587312559, 0.9218750000, K0.883735408160, 0.9375000000, K0.912522316061, 0.9531250000, K0.938750195362, 0.9687500000, K0.962214499763, 0.9843750000, K0.9827038655

64, 1., K1.

for i from 1 to 2nK1 do m i d evalf aC i$h ; end do:m 38 ; m 39 ;

0.59375000000.6093750000

k d 3; en d k$ ln 10

ln 2; evalf en ;

k := 3

en :=3 ln 10

ln 29.965784285

c7 d m 38 Cm 39

2;

c7 := 0.6015625000

f c7 ;K0.006854537

evalf % ;K0.006854537

evalf38

26;

0.5937500000

> >

> >

> >

(2)(2)> >

> >

> >

> >

(3)(3)

(1)(1)

(4)(4)

Ejercicio 3 del método de bisección. Se buscan raíces de 3x-e^x.

f d x/3$xKexp x ;f := x/3 xKex

f 0 ; K1

evalf f 1 ;0.281718172

evalf f 2 ;K1.389056099

plot f x , x = 0 ..2 ;

x0.5 1 1.5 2

K1.2

K1.0

K0.8

K0.6

K0.4

K0.2

0

0.2

a d 0; b d 1; n d 7; h dbKa

2nK1 ;

> >

(5)(5)

> >

a := 0b := 1n := 7

h :=164

for i from 1 to 2nK1 do print i, evalf aCi$h , evalf f aC i$h ; end do;1, 0.01562500000, K0.96887270902, 0.03125000000, K0.93799340703, 0.04687500000, K0.90736600204, 0.06250000000, K0.87699445905, 0.07812500000, K0.84688280706, 0.09375000000, K0.81703514007, 0.1093750000, K0.78745561508, 0.1250000000, K0.75814845309, 0.1406250000, K0.729117945010, 0.1562500000, K0.700368446011, 0.1718750000, K0.671904383012, 0.1875000000, K0.643730249013, 0.2031250000, K0.615850612014, 0.2187500000, K0.588270108015, 0.2343750000, K0.560993448016, 0.2500000000, K0.534025417017, 0.2656250000, K0.507370875018, 0.2812500000, K0.481034759019, 0.2968750000, K0.455022083020, 0.3125000000, K0.429337941021, 0.3281250000, K0.403987507022, 0.3437500000, K0.37897603523, 0.3593750000, K0.35430886424, 0.3750000000, K0.32999141525, 0.3906250000, K0.30602919526, 0.4062500000, K0.28242780027, 0.4218750000, K0.25919291128, 0.4375000000, K0.23633029929, 0.4531250000, K0.21384582730, 0.4687500000, K0.19174545031, 0.4843750000, K0.17003521732, 0.5000000000, K0.14872127133, 0.5156250000, K0.12780985334, 0.5312500000, K0.10730730235, 0.5468750000, K0.087220057

> >

(9)(9)

(6)(6)

> >

(8)(8)

> >

> >

> >

(7)(7)

36, 0.5625000000, K0.06755465737, 0.5781250000, K0.04831774638, 0.5937500000, K0.02951607239, 0.6093750000, K0.01115648940, 0.6250000000, 0.00675404341, 0.6406250000, 0.02420845042, 0.6562500000, 0.04119955043, 0.6718750000, 0.05772004744, 0.6875000000, 0.07376253045, 0.7031250000, 0.08931947246, 0.7187500000, 0.10438322747, 0.7343750000, 0.11894602748, 0.7500000000, 0.13299998349, 0.7656250000, 0.14653708450, 0.7812500000, 0.15954918951, 0.7968750000, 0.17202803152, 0.8125000000, 0.18396521353, 0.8281250000, 0.19535220454, 0.8437500000, 0.20618034055, 0.8593750000, 0.21644082056, 0.8750000000, 0.22612470657, 0.8906250000, 0.23522291758, 0.9062500000, 0.24372623059, 0.9218750000, 0.25162527760, 0.9375000000, 0.25891054261, 0.9531250000, 0.26557235962, 0.9687500000, 0.27160091163, 0.9843750000, 0.276986225

64, 1., 0.281718172

for i from 1 to 2nK1 do m i d evalf aC i$h ; end do:m 39 ; m 40 ;

0.60937500000.6250000000

k d 3; en d k$ ln 10

ln 2; evalf en ;

k := 3

en :=3 ln 10

ln 29.965784285

c7 d m 39 Cm 40

2;

c7 := 0.6171875000

f c7 ;

> >

(13)(13)

(11)(11)

(10)(10)

> >

> >

> >

(12)(12)

> >

K0.002144652

evalf % ;K0.006854537

evalf38

26 ;

0.5937500000

Raíz en el intervalo [1,2].

a d 1; b d 2; n d 6; h dbKa

2n;

a := 1b := 2n := 6

h :=164

for i from 1 to 2n do print i, evalf aC i$h , evalf f aCi$h ; end do;1, 1.015625000, 0.2857864612, 1.031250000, 0.2891806443, 1.046875000, 0.2918901034, 1.062500000, 0.2939040565, 1.078125000, 0.2952115506, 1.093750000, 0.2958014617, 1.109375000, 0.2956624878, 1.125000000, 0.2947831519, 1.140625000, 0.29315179410, 1.156250000, 0.29075657211, 1.171875000, 0.28758545812, 1.187500000, 0.28362623213, 1.203125000, 0.27886648314, 1.218750000, 0.27329360615, 1.234375000, 0.26689479416, 1.250000000, 0.25965704317, 1.265625000, 0.25156713918, 1.281250000, 0.24261166419, 1.296875000, 0.23277698720, 1.312500000, 0.22204926221, 1.328125000, 0.21041442722, 1.343750000, 0.19785819523, 1.359375000, 0.18436605824, 1.375000000, 0.16992327725, 1.390625000, 0.154514881

> >

(14)(14)

(15)(15)

> >

26, 1.406250000, 0.13812566527, 1.421875000, 0.12074018228, 1.437500000, 0.10234274429, 1.453125000, 0.08291741430, 1.468750000, 0.06244800631, 1.484375000, 0.04091807832, 1.500000000, 0.018310930

33, 1.515625000, K0.00539040434, 1.531250000, K0.03020315335, 1.546875000, K0.05614482036, 1.562500000, K0.08323318237, 1.578125000, K0.11148629838, 1.593750000, K0.14092250939, 1.609375000, K0.17156044840, 1.625000000, K0.20341903741, 1.640625000, K0.23651750042, 1.656250000, K0.27087536243, 1.671875000, K0.30651245544, 1.687500000, K0.34344892545, 1.703125000, K0.38170523346, 1.718750000, K0.42130216547, 1.734375000, K0.46226083148, 1.750000000, K0.50460267649, 1.765625000, K0.54834948250, 1.781250000, K0.59352337451, 1.796875000, K0.64014682552, 1.812500000, K0.68824266253, 1.828125000, K0.73783407254, 1.843750000, K0.78894460755, 1.859375000, K0.84159819056, 1.875000000, K0.89581912057, 1.890625000, K0.95163208058, 1.906250000, K1.00906213959, 1.921875000, K1.06813476460, 1.937500000, K1.12887582161, 1.953125000, K1.19131158562, 1.968750000, K1.25546874263, 1.984375000, K1.321374402

64, 2., K1.389056099

for i from 1 to 2n do m i d evalf aC i$h ; end do:

c7 dm 32 Cm 33

2;

> >

(16)(16)

> >

> >

(15)(15)c7 := 1.507812500

Iteraciones para error menor o igual que 10^{-4}.

k d 4; en d k$ ln 10

ln 2; evalf en ;

k := 4

en :=4 ln 10

ln 213.28771238

(3)(3)> >

> > (2)(2)

> >

> >

> >

(1)(1)> >

> >

Ejercicio 4 del método de bisección. Ecuación de Kepler.

f d x/xK0.5$sin x K0.7;f := x/xC K1 $0.5 sin x K0.7

evalf f 1 ;K0.1207354924

evalf f 2 ;0.8453512866

plot f x , x = 1 ..2 ;

x1.2 1.4 1.6 1.8 2

K0.1

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

a d 1; b d 2; n d 4; h dbKa

2nK1 ;

a := 1

> >

> > > >

> >

> >

> >

(8)(8)

(7)(7)

> >

(9)(9)

> >

(5)(5)

> >

(4)(4)

(6)(6)

b := 2n := 4

h :=18

for i from 1 to 2nK1 do print i, evalf aCi$h , evalf f aC i$h ; end do;1, 1.125000000, K0.02613379702, 1.250000000, 0.07550769033, 1.375000000, 0.18455347154, 1.500000000, 0.30125250675, 1.625000000, 0.42573432986, 1.750000000, 0.55800702667, 1.875000000, 0.6979571092

8, 2., 0.8453512866

for i from 1 to 2nK1 do m i d evalf aC i$h ; end do:

9.965784285

c7 d m 1 Cm 2

2;

c7 := 1.187500000

Para un error menor que 5*10^{-6} hace falta $n$ mayor que:

5 $ln 5ln 2

C6;

5 ln 5ln 2

C6

evalf % ;17.60964047

> >

> >

> >

> >

> >

(3)(3)

(2)(2)

(1)(1)

> >

> >

Ejercicio 5. La raíz 7^{1/4} con valor menor que una centésima.

f d x/ x4K7;f := x/x4K7

evalf f 1 ;K6.

evalf f 2 ;9.

plot f x , x = 1 ..2 ;

x1.2 1.4 1.6 1.8 2

K6

K4

K2

0

2

4

6

8

a d 1; b d 2; n d 4; h dbKa

2nK1;

a := 1

(5)(5)

> >

(7)(7)

> >

> >

> >

(6)(6)

> >

> >

> >

(4)(4)

b := 2n := 4

h :=18

for i from 1 to 2nK1 do print i, evalf aC i$h , evalf f aC i$h ; end do;1, 1.125000000, K5.3981933592, 1.250000000, K4.5585937503, 1.375000000, K3.4255371094, 1.500000000, K1.937500000

5, 1.625000000, K0.027099609386, 1.750000000, 2.3789062507, 1.875000000, 5.359619141

8, 2., 9.

for i from 1 to 2nK1 do m i d evalf aC i$h ; end do:m 5 ; m 6 ;

1.6250000001.750000000

c4 d m 5 Cm 6

2;

c4 := 1.687500000

(2)(2)

(3)(3)

> >

(1)(1)

> >

> >

> >

> >

> > > >

Ejercicio 6b.

f d x/ exp x Kx2C3$xK2;f := x/exKx2C3 xK2

evalf f 0 ;K1.

evalf f 1 ;2.718281828

plot f x , x = 0 ..1 ;

x0.2 0.4 0.6 0.8 1

K1

0

1

2

a d 0; b d 1; n d 4; h dbKa

2nK1;

a := 0

> >

> >

> >

(5)(5)

> >

(4)(4)

(6)(6)

> >

> >

> >

b := 1n := 4

h :=18

for i from 1 to 2nK1 do print i, evalf aC i$h , evalf f aC i$h ; end do;1, 0.1250000000, K0.5074765472, 0.2500000000, K0.0284745833, 0.3750000000, 0.4393664154, 0.5000000000, 0.89872127105, 0.6250000000, 1.3526209576, 0.7500000000, 1.8045000177, 0.8750000000, 2.258250294

8, 1., 2.718281828

for i from 1 to 2nK1 do m i d evalf aC i$h ; end do:

c4 d m 2 Cm 3

2;

c4 := 0.3125000000

> > > >

> >

(1)(1)> >

> > > >

(3)(3)

(2)(2)

> >

Ejercicio 6c.

f d x/ 2 x$cos 2$x K xC1 2;f := x/2 x cos 2 x K xC1 2

evalf f K3 ;K9.761021720

evalf f K2 ;1.614574484

plot f x , x =K3 ..K2 ;

xK3 K2.8 K2.6 K2.4 K2.2

K8

K6

K4

K2

0

a dK3; b dK2; n d 4; h dbKa

2nK1;

a := K3

> >

> >

> >

(5)(5)

> >

> >

> >

> >

(4)(4)

(6)(6)

b := K2n := 4

h :=18

for i from 1 to 2nK1 do print i, evalf aC i$h , evalf f aC i$h ; end do;1, K2.875000000, K8.4674813992, K2.750000000, K6.9601837593, K2.625000000, K5.3290737554, K2.500000000, K3.6683109285, K2.375000000, K2.069235226

6, K2.250000000, K0.61391890277, K2.125000000, 0.630246832

8, K2., 1.614574484

for i from 1 to 2nK1 do m i d evalf aC i$h ; end do:

c4 d m 6 Cm 7

2;

c4 := K2.187500000