Cálculos AV2 - Cálculo Numérico

You might also like

Download as xlsx, pdf, or txt
Download as xlsx, pdf, or txt
You are on page 1of 9

Método da Bissecção

a)
f(x)=x³-9x+3 erro < 2 x 10-3

Iterações a b xn f(a) f(b) f(xn) Erro


1 0.00000 1.00000 0.50000 3.00000 -5.00000 -1.37500 0.50000
2 0.00000 0.50000 0.25000 3.00000 -1.37500 0.76563 0.25000
3 0.25000 0.50000 0.37500 0.76563 -1.37500 -0.32227 0.12500
4 0.25000 0.37500 0.31250 0.76563 -0.32227 0.21802 0.06250
5 0.31250 0.37500 0.34375 0.21802 -0.32227 -0.05313 0.03125
6 0.31250 0.34375 0.32813 0.21802 -0.05313 0.08220 0.01563
7 0.32813 0.34375 0.33594 0.08220 -0.05313 0.01447 0.00781
8 0.33594 0.34375 0.33984 0.01447 -0.05313 -0.01934 0.00391
9 0.33594 0.33984 0.33789 0.01447 -0.01934 -0.00244 0.00195
10 0.33594 0.33789 0.33691 0.01447 -0.00244 0.00602 0.00098
da Bissecção

b)
f(x)=(x/2)^2-senx erro ≤ 10-3

Iterações a b xn f(a) f(b) f(xn) Erro


1 1.50000 2.00000 1.75000 -0.43499 0.09070 -0.21836 0.25000
2 1.75000 2.00000 1.87500 -0.21836 0.09070 -0.07518 0.12500
3 1.87500 2.00000 1.93750 -0.07518 0.09070 0.00496 0.06250
4 1.87500 1.93750 1.90625 -0.07518 0.00496 -0.03581 0.03125
5 1.90625 1.93750 1.92188 -0.03581 0.00496 -0.01560 0.01563
6 1.92188 1.93750 1.92969 -0.01560 0.00496 -0.00536 0.00781
7 1.92969 1.93750 1.93359 -0.00536 0.00496 -0.00021 0.00391
8 1.93359 1.93750 1.93555 -0.00021 0.00496 0.00237 0.00195
9 1.93359 1.93555 1.93457 -0.00021 0.00237 0.00108 0.00098
10 1.93359 1.93457 1.93408 -0.00021 0.00108 0.00043 0.00049
A)
Intervado ( 1 , 3 )
erro ≤ 10-3
f(x) = x^3 - cosx
g(x) = (cosx)^1/3 Intervalo
g'(x)= 3x^2+senx 1
3
Considerando x₀ = 1

Iterações g(x) = (cosx)^1/3 │xn - xn-1│


x₁ 0.1801 0.820
x₂ 0.3279 0.148
x₃ 0.3156 0.012
x₄ 0.3169 0.001

B)
Intervado ( 1 , 3 )
erro ≤ 10-3
f(x) = (exp^x)+cosx-5
g(x) = ln(-cosx+5) Intervalo
g'(x) = senx/5-cosx 1
3
Considerando x₀ = 1

Iterações g(x) = ln(-cosx+5) │xn - xn-1│


x₁ 1.4951 0.495
x₂ 1.5942 0.099
x₃ 1.6141 0.020
x₄ 1.6181 0.004
x₅ 1.6188 0.001
Raiz estimada =0,3169

g'(x)= 3x^2+senx │g'(x)│


3.8414709848079 3.8414709848079

27.1411200080599 27.1411200080599

Raiz estimada =1,6188

g'(x) = senx/5-cosx │g'(x)│


-0.37200810890656 0.37200810890656

1.01821649821242 1.01821649821242
Método da Newt
x=5^1/3
erro ≤ 10-3
f(x) = x^3-5
f'(x) = 3x^2
Considerando x₀ = 2
x₁ = x₀-[f(x₀)/f'(x₀)] x₂ =
x₁ = 2-[(2³-5)/(3.(2²)] x₂ =
x₁ = 1.75 x₂ =

│x₁ - x₀│ │x₂ - x₁│


│1,75 - 2│ │1,75 - 1,7109│
Ԑ< 0.25 Ԑ<
Método da Newton

Raiz estimada = 1,7100

x₁-[f(x₁)/f'(x₁)] x₃ =
1,75-[(1,75³-5)/(3.(1,75²)] x₃ =
1.7109 x₃ =

│x₂ - x₁│ │x₂ - x₁│


│1,75 - 1,7109│ │1,7109 - 1,7100│
0.0391 Ԑ>
x₂-[f(x₂)/f'(x₂)]
1,7109-[(1,7109³-5)/(3.(1,7109²)]
1.7100

│x₂ - x₁│
│1,7109 - 1,7100│
0.0009
Intervado ( 3 , 4 )
erro ≤ 10-3 Raiz estimada 3.1416
f(x) = sen(x) - tg(x)
f'(x) = cos(x) - sec²(x)
f''(x) = -sen(x) - 2sec²(x) . tg(x)

Intervalo f(x) = sen(x) - tg(x) f'(x) = cos(x) - sec²(x)


3 0.2837 -2.0103
4 -1.9146 -2.9942

Considerando x₀ = 3

Iterações xn-1-[f(xn-1)/f'(xn-1)] f(x) = sen(x) - tg(x)


x₀ 3 0.2837
x₁ 3.1411 0.0010
x₂ 3.1416 0.0000
f''(x) = -sen(x) - 2sec²(x) . tg(x) f(x) . f''(x) │f'(x)│
0.1498 0.0425 2.0103
-4.6631 8.9280 2.9942

f'(x) = cos(x) - sec²(x) │xn - xn-1│


-2.0103 -
-2.0000 0.1411
-2.0000 0.0005

You might also like