Problem with integration: there is a pole on a contour
I have a problem with calculation of the complex integral
The integrand has a pole in z=1 and z=-1 lying on the unit circle.
My code are as following:
t = @(theta) exp(1i*theta);
f = @(t) (t^2+3*t+2*1i)/(t+4)/(t-1)/(t+1);
integrand = @(theta) f(t(theta))*1i*exp(1i*theta);
integral_result = integral(integrand, 0, 2*pi, ‘ArrayValued’, true, ‘AbsTol’, 1e-12, ‘RelTol’, 1e-12);
result = (1/(2*pi*1i)) * integral_result;
I_num=result;
disp([‘numerical solution=’,num2str(I_num)])
How do i fix it…I have a problem with calculation of the complex integral
The integrand has a pole in z=1 and z=-1 lying on the unit circle.
My code are as following:
t = @(theta) exp(1i*theta);
f = @(t) (t^2+3*t+2*1i)/(t+4)/(t-1)/(t+1);
integrand = @(theta) f(t(theta))*1i*exp(1i*theta);
integral_result = integral(integrand, 0, 2*pi, ‘ArrayValued’, true, ‘AbsTol’, 1e-12, ‘RelTol’, 1e-12);
result = (1/(2*pi*1i)) * integral_result;
I_num=result;
disp([‘numerical solution=’,num2str(I_num)])
How do i fix it… I have a problem with calculation of the complex integral
The integrand has a pole in z=1 and z=-1 lying on the unit circle.
My code are as following:
t = @(theta) exp(1i*theta);
f = @(t) (t^2+3*t+2*1i)/(t+4)/(t-1)/(t+1);
integrand = @(theta) f(t(theta))*1i*exp(1i*theta);
integral_result = integral(integrand, 0, 2*pi, ‘ArrayValued’, true, ‘AbsTol’, 1e-12, ‘RelTol’, 1e-12);
result = (1/(2*pi*1i)) * integral_result;
I_num=result;
disp([‘numerical solution=’,num2str(I_num)])
How do i fix it… numerical integration, cauthy, matlab code MATLAB Answers — New Questions