Wolfram Integrator Error, Am I Missing Something?

  • Thread starter Thread starter Poopsilon
  • Start date Start date
  • Tags Tags
    Error
Poopsilon
Messages
288
Reaction score
1
So I put the function 1/(2*(cos(2*pi*x))^2+3*(sin(2*pi*x))^2) into the Wolfram indefinite integral calculator here: http://integrals.wolfram.com/index.jsp?expr=1%2F%282*%28cos%282*pi*x%29%29%5E2%2B3*%28sin%282*pi*x%29%29%5E2%29&random=false. And I get an antiderivative which when evaluated from 0 to 1 is clearly equal to 0.

Now I take the same function and put it into Wolfram's definite integral calculator evaluated from 0 to 1 here: http://www.wolframalpha.com/input/?i=integrate+1%2F%282*%28cos%282*pi*x%29%29%5E2%2B3*%28sin%282*pi*x%29%29%5E2%29+dx+from+x%3D0+to+1. And I get 1/sqrt(6), what is going on with this discrepancy, is Wolfram wrong, or am I missing something?
 
Physics news on Phys.org
That's crazy. Did you take the derivative of the function the indefinite integral calculator gives you to make sure it was right?

Your function is always positive so it's clear that the answer of 0 is wrong
 
I tried integrating your function using a TI-89, and I come up with a definite integral of (√6) / 6 when evaluated from 0 to 1.

The indefinite integral is quite long ...
 
You are hitting Wolfram Alpha in a weak point. It doesn't understand what you are going to do with the antiderivative. Your integral clearly goes to infinity as the upper limit of the definite integral goes to infinity. WA's indefinite integral doesn't. Because arctan is really multivalued unless you restrict the domain of tan. It gave you what is probably a valid antiderivative in a certain range of x. It's not valid on the whole range 0 to 1. I'll give it some points for getting the answer right when you told it the limits.
 
So does that mean there is not one antiderivative for this function that works over any interval, but actually a plurality of them depending on what range of x values you are interested in?

Although if that was the case I can't see how taking the derivative of all these different antiderivatives would give you the same function back.
 
Poopsilon said:
So I put the function 1/(2*(cos(2*pi*x))^2+3*(sin(2*pi*x))^2) into the Wolfram indefinite integral calculator here: http://integrals.wolfram.com/index.jsp?expr=1%2F%282*%28cos%282*pi*x%29%29%5E2%2B3*%28sin%282*pi*x%29%29%5E2%29&random=false. And I get an antiderivative which when evaluated from 0 to 1 is clearly equal to 0.

Now I take the same function and put it into Wolfram's definite integral calculator evaluated from 0 to 1 here: http://www.wolframalpha.com/input/?i=integrate+1%2F%282*%28cos%282*pi*x%29%29%5E2%2B3*%28sin%282*pi*x%29%29%5E2%29+dx+from+x%3D0+to+1. And I get 1/sqrt(6), what is going on with this discrepancy, is Wolfram wrong, or am I missing something?

Look at a graph of the function that's given as the anti-derivative. It's discontinuous (with jump discontinuities) on the interval over which you are integrating.

Here is what WolframAlpha shows.
attachment.php?attachmentid=41923&stc=1&d=1323838474.gif
 

Attachments

  • wolframalpha-20111213224334050.gif
    wolframalpha-20111213224334050.gif
    10.1 KB · Views: 788
Poopsilon said:
So I put the function 1/(2*(cos(2*pi*x))^2+3*(sin(2*pi*x))^2) into the Wolfram indefinite integral calculator here: http://integrals.wolfram.com/index.jsp?expr=1%2F%282*%28cos%282*pi*x%29%29%5E2%2B3*%28sin%282*pi*x%29%29%5E2%29&random=false. And I get an antiderivative which when evaluated from 0 to 1 is clearly equal to 0.

Now I take the same function and put it into Wolfram's definite integral calculator evaluated from 0 to 1 here: http://www.wolframalpha.com/input/?i=integrate+1%2F%282*%28cos%282*pi*x%29%29%5E2%2B3*%28sin%282*pi*x%29%29%5E2%29+dx+from+x%3D0+to+1. And I get 1/sqrt(6), what is going on with this discrepancy, is Wolfram wrong, or am I missing something?

Maple gives exactly the same thing (with slightly different ways of writing equivalent results). If you plot the antiderivative function F(x) as given by Mathematica or Maple, you will see it has jump discontinuities at x = 1/4 and x = 3/4. You could have a *continuous* antiderivative by essentially adding the jump discontinuity to the formula in (1/4,3/4) and once again in (3/4,1). Basically, this amounts to changing the constant of integration as you pass through x = 1/4 and again as you pass through x = 3/4. For that continuous antiderivative, Fc(x) we do, indeed, get the definite integral as the difference Fc(1)-Fc(0).

Fortunately, both Mathematica and Maple are smart enough to know they must be more careful when dealing with the definite integral. In fact, we can get Maple to give us the appropriate result using the commands J1 := int(f,x=0..t) assuming t>0,t<1/4; and J2:=int(f,x=0..t) assuming t>1/4,t<3/4. The result for t>1/4, t<3/4 has an extra term that switches on at t = 1/4 (and again at t = 3/4), to give a continuous F(t).

RGV
 
Poopsilon said:
So I put the function 1/(2*(cos(2*pi*x))^2+3*(sin(2*pi*x))^2) into the Wolfram indefinite integral calculator here: http://integrals.wolfram.com/index.jsp?expr=1%2F%282*%28cos%282*pi*x%29%29%5E2%2B3*%28sin%282*pi*x%29%29%5E2%29&random=false. And I get an antiderivative which when evaluated from 0 to 1 is clearly equal to 0.
The integrand is always positive. How could a definite integral from 0 to some positive number ever be negative?

What Mathematica is doing is using a substitution involving the principal branch of the inverse tangent that is only valid in the range x∈(-1/4,1/4).
 
Back
Top