Using the integral function for large upper limit

조회 수: 8 (최근 30일)
will steel
will steel 2022년 1월 8일
댓글: Torsten 2022년 1월 10일
how do I know if integral(fun,x0,inf) is being accurate or not? Ive noticed that replacing inf by a very large number (given i know the fun decays sharply with x) gives a different and smaller answer? Why is this the case and what kind of magic is matlab doing when I give it an infinite limit?
Also, I notice a rescaling of my variables gives a different answer still. In SI units the lower bound x0 is of order 10^15. I have rescaled my units such that x0 is of order 1. Each gives a very different answer (yes i have accounted for converting back the units)...which can i trust?
  댓글 수: 8
will steel
will steel 2022년 1월 9일
@David Goodmanson Ah okay i will use the scaled version and just note matlabs struggles for future reference. Many thanks
Torsten
Torsten 2022년 1월 10일
@will steel You might also test MATLAB's "quad" for integration. "Old" does not always mean "Bad" :-)

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

답변 (0개)

카테고리

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

태그

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by