Scipy.integrate.tplquad дает неправильный результат для интеграла по большому объемуPython

Программы на Python
Ответить Пред. темаСлед. тема
Anonymous
 Scipy.integrate.tplquad дает неправильный результат для интеграла по большому объему

Сообщение Anonymous »


I'm trying to integrate a function of 3 variables f(x,y,z) over all space.

When I integrate over a small volume, I get roughly the right result. However, when I increase the volume of integration, python says that the integral is zero.

I'm fairly confident that the issue here is that the function f is only non-zero in a small region of space, and tplquad dosen't sample over this region enough when the integration volume is large. I found an answer to a similar problem in 1D at this link; scipy.integrate.quad gives wrong result on large ranges. The solution in 1D was to pass an argument 'points' to scipy.integrate.quad, and this helped quad focus on the interval where the integral was non-zero.

My question is; is there a similar argument to 'points' for tplquad?
Or perhaps some other way I can instruct tplquad to focus on a particular region of space?



Источник: https://stackoverflow.com/questions/512 ... rge-volume
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

Вернуться в «Python»