Ok, so there is some sort of bug. Here is what Matlab (maple) 2008a gives: >> int((8*pi^2*f^2*w^2+w^4)/(16*pi^4*f^4+w^4), f, 0, inf)
ans = PIECEWISE([NaN, And(0 < (w^4)^(1/4)*2^(1/2)*pi+pi*(-2*csgn(w^2)*w^2)^ (1/2),(w^4)^(1/4)*2^(1/2)*pi-pi*(-2*csgn(w^2)*w^2)^(1/2) < 0,(w^4)^ (1/4)*2^(1/2)*pi+pi*(-2*csgn(w^2)*w^2)^(1/2) < 0,0 < (w^4)^(1/4)*2^ (1/2)*pi-pi*(-2*csgn(w^2)*w^2)^(1/2))],[NaN, And(0 < (w^4)^(1/4)*2^ (1/2)*pi+pi*(-2*csgn(w^2)*w^2)^(1/2),(w^4)^(1/4)*2^(1/2)*pi+pi*(-2*csgn (w^2)*w^2)^(1/2) < 0,0 < (w^4)^(1/4)*2^(1/2)*pi-pi*(-2*csgn(w^2)*w^2)^ (1/2))],[NaN, And((w^4)^(1/4)*2^(1/2)*pi-pi*(-2*csgn(w^2)*w^2)^(1/2) < 0,(w^4)^(1/4)*2^(1/2)*pi+pi*(-2*csgn(w^2)*w^2)^(1/2) < 0,0 < (w^4)^ (1/4)*2^(1/2)*pi-pi*(-2*csgn(w^2)*w^2)^(1/2))],[NaN, And((w^4)^(1/4)*2^ (1/2)*pi+pi*(-2*csgn(w^2)*w^2)^(1/2) < 0,0 < (w^4)^(1/4)*2^(1/2)*pi-pi* (-2*csgn(w^2)*w^2)^(1/2))],[NaN, And(0 < (w^4)^(1/4)*2^(1/2)*pi+pi* (-2*csgn(w^2)*w^2)^(1/2),(w^4)^(1/4)*2^(1/2)*pi-pi*(-2*csgn(w^2)*w^2)^ (1/2) < 0,(w^4)^(1/4)*2^(1/2)*pi+pi*(-2*csgn(w^2)*w^2)^(1/2) < 0)], [NaN, And(0 < (w^4)^(1/4)*2^(1/2)*pi+pi*(-2*csgn(w^2)*w^2)^(1/2),(w^4)^ (1/4)*2^(1/2)*pi+pi*(-2*csgn(w^2)*w^2)^(1/2) < 0)],[NaN, And((w^4)^ (1/4)*2^(1/2)*pi-pi*(-2*csgn(w^2)*w^2)^(1/2) < 0,(w^4)^(1/4)*2^(1/2)*pi +pi*(-2*csgn(w^2)*w^2)^(1/2) < 0)],[NaN, (w^4)^(1/4)*2^(1/2)*pi+pi* (-2*csgn(w^2)*w^2)^(1/2) < 0],[NaN, And(0 < (w^4)^(1/4)*2^(1/2)*pi+pi* (-2*csgn(w^2)*w^2)^(1/2),(w^4)^(1/4)*2^(1/2)*pi-pi*(-2*csgn(w^2)*w^2)^ (1/2) < 0,0 < (w^4)^(1/4)*2^(1/2)*pi-pi*(-2*csgn(w^2)*w^2)^(1/2))], [NaN, And(0 < (w^4)^(1/4)*2^(1/2)*pi+pi*(-2*csgn(w^2)*w^2)^(1/2),0 < (w^4)^(1/4)*2^(1/2)*pi-pi*(-2*csgn(w^2)*w^2)^(1/2))],[NaN, And((w^4)^ (1/4)*2^(1/2)*pi-pi*(-2*csgn(w^2)*w^2)^(1/2) < 0,0 < (w^4)^(1/4)*2^ (1/2)*pi-pi*(-2*csgn(w^2)*w^2)^(1/2))],[NaN, 0 < (w^4)^(1/4)*2^(1/2) *pi-pi*(-2*csgn(w^2)*w^2)^(1/2)],[NaN, And(0 < (w^4)^(1/4)*2^(1/2)*pi +pi*(-2*csgn(w^2)*w^2)^(1/2),(w^4)^(1/4)*2^(1/2)*pi-pi*(-2*csgn(w^2) *w^2)^(1/2) < 0)],[NaN, 0 < (w^4)^(1/4)*2^(1/2)*pi+pi*(-2*csgn(w^2) *w^2)^(1/2)],[NaN, (w^4)^(1/4)*2^(1/2)*pi-pi*(-2*csgn(w^2)*w^2)^(1/2) < 0],[1/8*2^(1/2)*w^2*(2+csgn(w^2))/(w^4)^(1/4), otherwise]) And here is what Mathematica's web integral gives (with 'x' in place of 'f'): Integrate[(8*Pi^2*x^2*w^2 + w^4)/(16*Pi^4*x^4 + w^4), x] == (w*(-6*ArcTan[1 - (2*Sqrt[2]*Pi*x)/w] + 6*ArcTan[1 + (2*Sqrt[2]*Pi*x)/ w] + Log[-w^2 + 2*Sqrt[2]*Pi*w*x - 4*Pi^2*x^2] - Log[w^2 + 2*Sqrt[2] *Pi*w*x + 4*Pi^2*x^2]))/ (8*Sqrt[2]*Pi) They don't let you do definite integrals there. And the computation timed out on Wolfram Alpha. Anybody actually *know* what this integral should be? ~Luke On May 26, 5:25 pm, Robert Kern <robert.k...@gmail.com> wrote: > On Tue, May 26, 2009 at 19:22, Luke <hazelnu...@gmail.com> wrote: > > > I'm using the latest pull from git://git.sympy.org/sympy.git, and this > > is the response I get: > > In [1]: from sympy import * > > > In [2]: f, w = symbols('fw') > > > In [3]: s = 2*pi*I*f > > > In [4]: ia = (-2*s**2*w**2 + w**4)/(s**4 + w**4) > > > In [5]: simplify(integrate(ia, (f, 0, infty))) > > --------------------------------------------------------------------------- > > NameError Traceback (most recent call > > last) > > > /home/luke/lib/python/sympy/<ipython console> in <module>() > > > NameError: name 'infty' is not defined > > > In [6]: simplify(integrate(ia, (f, 0, oo))) > > Out[6]: 0 > > > In [10]: oo.__class__ > > Out[10]: <class 'sympy.core.numbers.Infinity'> > > > I'm guessing 'infty' is something you've defined on your own machine > > for convenience. > > No, I'm just dumb. That's from numpy. > > In [3]: from sympy import * > > In [4]: %sym -r f w > Adding real variables: > f > w > > In [5]: s = 2*pi*I*f > > In [6]: ia = (-2*s**2*w**2 + w**4)/(s**4 + w**4) > > In [7]: simplify(powsimp(integrate(ia, (f, 0, oo)))) > Out[7]: 0 > > > What exactly does it mean to be using the 'trunk'? > > "the latest pull from git://git.sympy.org/sympy.git" > > -- > Robert Kern > > "I have come to believe that the whole world is an enigma, a harmless > enigma that is made terrible by our own mad attempt to interpret it as > though it had an underlying truth." > -- Umberto Eco --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sympy?hl=en -~----------~----~----~----~------~----~------~--~---