Message Boards Message Boards

0
|
4305 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Problem integrating a trigonometric function

Posted 10 years ago

The function Integrate fails to integrate correctly over a definite domain a certain continuous and differentiable rational function of trigonometric expression (see attached Mathematica 9 notebook with outputs and the comments therein).The corresponding numerical integration via NIntegrate as well as the plot of the function is used as a test. Could this be a bug or do I have a problem in my understanding? Fortunately, I have found a partial workaround which is also indicated in the file. Breaking the integral into two parts and a certain substitution seems to work. I am extremely curious on getting some insights on what is going wrong and how I can avoid this problem.

Attachments:
POSTED BY: subhra datta
2 Replies

I also appear to be getting some unexpected results in this example... Will try to have a closer look later.

M.

POSTED BY: Marco Thiel

It's a bug (and will be fixed). Your workaround, to make the integration bounds positive, should suffice.

Also, it is generally safer to use exact input and, if that is not an option, input precision that is higher than MachinePrecision. Even with code improvements I am not sure this example will be working correctly at machine precision.

POSTED BY: Daniel Lichtblau
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract