How to integrate using trapezoidal method

조회 수: 6 (최근 30일)
Candice Pillow
Candice Pillow 2021년 2월 10일
댓글: David Goodmanson 2021년 2월 12일
How would I solve the above integral numerically using trapazoidal rule? I have no idea where to start, I am only able to use basic coding language functions, so nothing fancy please.
  댓글 수: 3
Candice Pillow
Candice Pillow 2021년 2월 11일
I am sorry, I forgot to mention that epsilon=x/sigma. The H_n is the hermite polynomial. So psi(x) would become of a function of x and epsilon. But looking at it further, I believe it would be possible to still pull out psi of the integral since it is divided by epsilon. Psi would be squared and you'd be left with e^-epsilon for the integration. My task is to evaluate the whole expression with different values of n, after the expression is simplified.
David Goodmanson
David Goodmanson 2021년 2월 12일
This comment is not going to provide any immediate solution, but using 'a' in place of epsilon the form of the integral is
[constants]*Integral{0,2*n+1} exp(-a^2)*psi(a)^2*(1/a^2) da
To lowest order, the hermite polynomials of odd order are proportional to 'a' at the origin, and the hermite polynomials of even order are a constant at the origin. So for odd order the integrand goes like a constant at the origin and the integral converges. You can get an answer by setting up an array of 'a' values, calculating the integrand values and then using the trapz function. But for even order the integrand goes like a^-2 at the origin and the integral diverges.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Numerical Integration and Differentiation에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by