Вы находитесь на странице: 1из 3

QUESTÃO 1

a) x=0:0.001:0.05; y=1250./x.*(1-(1+x).^(-10))-10000; plot(x,y), grid

b) >> [c,n,err]=bissec('1250./x.*(1-(1+x).^(-10))-10000',0.04,0.05,1e-6)

c=
0.0428
n=
14

err =
6.1035e-07

2) a) >> x=-5:0.1:5; y=x.^2-3*x; plot(x,y), grid


>> hold on
>> y=8-exp(x); plot(x,y)
n x |f(x)|
1 2 2.6109
2 2.3112 0.4946
3 2.2690 0.0111
4 2.2680 1.1454e-4

3) a) x=-10:0.1:10; y=x./(5+x.^2); plot(x,y), grid

O mínimo absoluto ocorre no intervalo [-3; -1];

Poderia ter sido feito da seguinte forma também:


>> syms x
>> diff(x/(5+x^2))
ans =

1/(x^2 + 5) - (2*x^2)/(x^2 + 5)^2


>> x=-10:0.1:10; y=1./(x.^2 + 5) - (2*x.^2)./(x.^2 + 5).^2; plot(x,y), grid
O gráfico mostra que há dois extremos (zeros), ou seja, um máximo e um mínimo e, olhando no
gráfico da f(x), vê-se que o mínimo ocorre em [-3;-1]

b) >> [c,n,err]=bissec('1./(x.^2 + 5) - (2*x.^2)./(x.^2 + 5).^2',-3,-1,1e-6)

c=
-2.2361
n=
21
err =
9.5367e-07

d) >> x=-10:0.1:10; y=x./(5+x.^2); plot(x,y), grid


>> hold on
>> x=-2.2361; y=x./(5+x.^2);plot(x,y,'*r')

Вам также может понравиться