Ask Your Question
0

integral from sin at plus minus infinity seems to be bad

asked 2014-10-06 17:01:53 -0500

kote gravatar image

updated 2014-10-06 18:23:09 -0500

tmonteil gravatar image

This doesn't seem right to me

integrate(sin(x), x, -oo, +oo)
0

And this looks bad at all

integrate(sin(x), x, -oo, +2*oo)
0

Why this happening?

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
1

answered 2014-10-06 18:07:35 -0500

tmonteil gravatar image

updated 2014-10-06 18:24:41 -0500

The second example is the same as the first, since:

sage: +oo
+Infinity
sage: +2*oo
+Infinity

The problem seems that Sage (more precisely Maxima) knows that the sin function is odd, and learned how to use this to integrate fast if the endpoints are opposite to eachother:

sage: var("y")
y
sage: integrate(sin(x), x, -y, y)
0
sage: integrate(tan(x), x, -oo, oo)
0

Indeed, it is not able to compute half of it:

sage: integrate(sin(x), x, 0, y)
ValueError: Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(y>0)', see `assume?` for more details)
Is y positive, negative or zero?

While Maxima seems faulty:

sage: integrate(sin(x), x, -oo, oo, algorithm='maxima')
0

Sympy seems to know that there is a problem here:

sage: integrate(sin(x), x, -oo, oo, algorithm='sympy')
RuntimeError: cos_eval(): cos(infinity) encountered

Moreover:

sage: integrate(sin(x), x, 0, y, algorithm='sympy')
-cos(y) + 1

This is now reported at trac ticket 17109

edit flag offensive delete link more
0

answered 2014-10-18 09:24:59 -0500

Your problem is in your input. These various systems are guessing differently about what you mean by integration from minf to inf. either it means limit (integrate(f(x),x,-a,a) as a->inf)

or limit(limit (integrate(f(x),x,a b) as a->-minf, b-> minf) in some unspecified order.

What you mean is ???

The idea that this is a bug to be patched in the computer system is fundamentally incorrect. What has to be fixed is you (or in general, the user's) expectation that something he/she sees in mathematical discourse that is essentially an abuse of notation, can be interpreted either by literally computing with it, or by guessing it means something else.

It is apparent that neither Sage nor Maxima addresses this adequately, which might be to quiz the user as to what is meant

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-10-06 17:01:53 -0500

Seen: 653 times

Last updated: Oct 18 '14