Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- format long;
- f = @(x) cos(x.^(-1).*log(x))./x;
- q = zeros(1,1);
- I = zeros(1,1);
- count = 1;
- for n=200:200:2000
- a = zeros(n,1);
- a(1) = 0;
- for j=2:n+1
- b = fzero(@(x) x*exp(x)-(i-1/2)*pi,0);
- a(j) = exp(-b);
- end
- q = q + integral(f,a(2),1);
- for u=1:n
- q = q + integral(f, a(n+1),a(n));
- end
- I(count) = q;
- count = count +1;
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement