Trabalho De Calculo Numerico - Integral
Trabalho Escolar: Trabalho De Calculo Numerico - Integral. Pesquise 862.000+ trabalhos acadêmicosPor: isabela90 • 8/2/2014 • 237 Palavras (1 Páginas) • 315 Visualizações
1- a)
>>syms x
>>int (x*sin(x))
ans =
sin(x) - x*cos(x)
b)
>>int(x*sin(x),-3,3)
ans =
2*sin(3) - 6*cos(3)
c)
>> x=-3:0.5:3;
>> y=x.*sin(x);
>>trapz(x,y)
ans =
6.1039
d)
>>format long
>>quad('x.*sin(x)',-3,3,10^-3)
ans =
6.222072998887778
2- a)
>>syms t
>>int(t*exp(4*t))
ans =
(exp(4*t)*(4*t - 1))/16
b)
>>int(t*exp(4*t),-3,3)
ans =
(exp(-12)*(11*exp(24) + 13))/16
c)
>> t=-3:0.5:3;
>> y=t.*exp(4.*t);
>>trapz(t,y)
ans =
1.529118064814388e+05
d)
>>format long
>>quad('t.*exp(4.*t)',-3,3,10^-3)
ans =
1.118939191957488e+05
3- a)
>>syms x
>>int((cos(x))^3)
ans =
sin(x) - sin(x)^3/3
b)
>>int((cos(x))^3,-3,3)
ans =
(3*sin(3))/2 + sin(9)/6
c)
>> x=-3:0.5:3;
>> y=(cos(x)).^3;
>>trapz(x,y)
ans =
0.262548871568820
d)
>>format long
>>quad('(cos(x)).^3',-3,3,10^-3)
ans =
0.281018797868466
4- a)
>>syms x
>>int((1-x)*exp(x))
ans =
-exp(x)*(x - 2)
b)
>>int((1-x)*exp(x),-3,3)
ans =
- 5*exp(-3) - exp(3)
c)
>> x=-3:0.5:3;
>> y=(1-x).*exp(x);
>>trapz(x,y)
ans =
-21.584280054540187
d)
>>format long
>>quad('(1-x).*exp(x)',-3,3,10^-3)
ans =
-20.334559618171287
...