[SciPy-User] Problems with scipy.integrate.quad and sinusoidal weights
Fri Sep 28 09:02:36 CDT 2012
> the weight function is automatically added
> >>> integrate.quad(lambda x: np.exp(-x)*np.sin(100*x), 0., 10., args=())
> Warning: The maximum number of subdivisions (50) has been achieved.
> If increasing the limit yields no improvement it is advised to analyze
> the integrand in order to determine the difficulties. If the position
> of a
> local difficulty can be determined (singularity, discontinuity) one will
> probably gain from splitting up the interval and calling the integrator
> on the subranges. Perhaps a special-purpose integrator should be used.
> (0.0099990111781434986, 0.00068140460275433325)
> >>> integrate.quad(lambda x: np.exp(-x), 0., 10., args=(), weight='sin',
> (0.0099987410521618428, 7.0983734843630013e-10)
> (I never used wvar before, just guessing
Ahh, you are completely right. I was thinking that weight function meant
what basis function it used in the numerical integration, but of course it
simply multiply it to the integrand.
Thanks for making that clear to me :)
> > Cheers,
> > Per
> > _______________________________________________
> > SciPy-User mailing list
> > SciPy-User@scipy.org
> > http://mail.scipy.org/mailman/listinfo/scipy-user
> SciPy-User mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-User