[SciPy-User] Integration of double integral with integration variable as
Fri Jan 15 02:19:33 CST 2010
I thank you very much for your help. Well, my example is easy to solve,
indeed. Though this was only an example.
But the trick with the functions does it. Something one could have
You bet it helped ;)
Jose Amoreira wrote:
> Your example is easy!
> Since sin(y) is an odd function, integrating over [-x,x] gives zero and that's
> it. For a more illustrative example, replace sin with cos (still easy enough
> to do it quicker analytically). Using scipy.integrate.quad, you do it like
> this (excerpt from an idle session):
>>>> def g(x):
> return quad(cos,-x,x)
> The reason I take the zero-th element of the quad output is that the remaining
> is an estimate of the error.
> Maybe you should also look into scipy.integrate.dblquad.
> Hope this helps.
> On Thursday 14 January 2010 09:23:28 am Torsten Andre wrote:
>> Hey everyone,
>> I am new to SciPy, but need to integrate something like this, where the
>> boundaries of the inner integral are terms of outer variable's
>> integration variable:
>> Is this feasible in SciPy? I tried using quad but it only complains that
>> x is not defined. Unfortunately I was unable to find anything on the
>> list or in the documentation.
>> Thanks for your time.
>> SciPy-User mailing list
> SciPy-User mailing list
More information about the SciPy-User