小编tom*_*ees的帖子

python中高度振荡的一维被积函数(包含贝塞尔函数)的数值积分

我试图对由几个贝塞尔函数(第一类和第二类)组成的实值被积函数进行数值评估。被积函数正在振荡和衰减,需要在 0 和 +? 之间进行评估。到目前为止,我尝试使用 scipy.integrate 子包(quad 和 fixed_quad)都没有成功。评估值在实际上应该是平滑的时候跳来跳去。对于某些参数值集,我还会收到警告:“IntegrationWarning:积分可能发散,或缓慢收敛。” (已知收敛)或“IntegrationWarning:已达到最大细分数 (50)”。

等式来自:http : //dx.doi.org/10.1029/WR003i001p00241

它也可以在这里找到:http : //www.aqtesolv.com/papadopu.htm

感谢您在 Python 中对繁琐函数进行数值积分方面的任何帮助...

代码示例

import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from scipy import special as sps
import scipy.integrate as integrate

# define constants and variables (SI mks units):
r_w = 0.15
r_c = 0.16
b = 10
S_s = 1E-6
Q = 0.001
S = S_s*b
K=1E-8
T=K*b
alpha = (r_w**2)*S/r_c**2
def r_D(r): …
Run Code Online (Sandbox Code Playgroud)

python scipy numerical-integration quad bessel-functions

1
推荐指数
1
解决办法
1585
查看次数