Hey Numpy people! I have to integrate functions like: Int_0^1 (t*(t1))**(H/2) dt or Int_1^1 1/abs(t)**(1H) dt, with H around .3 I just tried quadrature on the 1st one: it needs very order of quadrature to be precise and is in that case slow. Would it work better with Multipack? (I have to upgrade to python 1.5.2 to try Multipack!) Thank you for your help. JeanBernard
On Wed, 22 Mar 2000, JeanBernard Addor wrote:
Hey Numpy people!
I have to integrate functions like:
Int_0^1 (t*(t1))**(H/2) dt
This is a beta function with arguments (1H/2,1H/2) and is related to gamma functions. B(x,y) = Gamma(x)Gamma(y)/Gamma(x+y)
or
Int_1^1 1/abs(t)**(1H) dt, with H around .3
This can be can done analytically = 2 Int_0^1 t**(H1) dt = 2 [ t**(H)/H ]_0^1 = 2/H
I just tried quadrature on the 1st one: it needs very order of quadrature to be precise and is in that case slow.
HTH Peter
Hey! I am now able to reply to my question! Quadpack from multipack is much more quicker and accurate! and it needs not Python 1.5.2 (on my system it crashes with new python, but it is a quick installation) comparision:
quadrature.quad(lambda t: t**(H1), 0, 1) 2.54866576894 quadpack.quad(lambda t: t**(H1), 0, 1) (3.33333333333, 4.26325641456e14) 1/H 3.33333333333
The expected result is 1/H, (H was .3). It is possible to improve the precison of the result of quadrature, it becomes very slow, but never very precise. JeanBernard On Wed, 22 Mar 2000, JeanBernard Addor wrote:
Hey Numpy people!
I have to integrate functions like:
Int_0^1 (t*(t1))**(H/2) dt
or
Int_1^1 1/abs(t)**(1H) dt, with H around .3
I just tried quadrature on the 1st one: it needs very order of quadrature to be precise and is in that case slow.
Would it work better with Multipack?
(I have to upgrade to python 1.5.2 to try Multipack!)
Thank you for your help.
JeanBernard
participants (2)

JeanBernard Addor

peter.chang＠nottingham.ac.uk