I am new to Matlab and cannot figure out why Matlab will not calculate this integral. Any help would be greatly appreciated. Thanks!
clc;
%Symbolic Variables
syms lambda_x x x_prime y y_prime pi k
%Constants
k = 10;
x = 5;
y = 6;
x_prime = -1;
y_prime = 2;
g1 = exp(1i*lambda_x*(x-x_prime))*exp(-1i*abs(y-y_prime)*sqrt((k^2)-(lambda_x^2)));
g2 = sqrt((k^2)-(lambda_x^2));
g3 = g1/g2;
g3integral = int(g3,lambda_x,-inf,inf, 'PrincipalValue', true);
pretty(g3integral)

댓글 수: 4

Aquatris
Aquatris 2018년 9월 13일
편집: Aquatris 2018년 9월 13일
There might not be a closed form solution to the integral. Where does this equation come from? Did you try any online integral calculator?
Brandon Peter
Brandon Peter 2018년 9월 13일
That is what I am attempting to integrate
Jan
Jan 2018년 9월 14일
What about integrating it numerically and not symbolically?
Brandon Peter
Brandon Peter 2018년 9월 14일
How would you go about doing that?

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2018년 9월 14일

0 개 추천

Numerically it is undefined because the denominator passes through 0, giving a division by 0.
The cauchy principle value does not appear to exist. Take the limit of g3 as lambda_x approaches -infinity or +infinity and you will see it being infinite. Take the limit as lambda_x approaches -10 or +10 and you will see complex infinities with different sign on the two sides of the discontinuity.

카테고리

도움말 센터File Exchange에서 Numerical Integration and Differentiation에 대해 자세히 알아보기

태그

질문:

2018년 9월 13일

답변:

2018년 9월 14일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by