Group Abstract Group Abstract

Message Boards Message Boards

Avoid error while calculating an integral with Wolfram Language? W|A is ok

POSTED BY: Camilo Ramirez
3 Replies

NIntegrate can only handle integrals that would result in a number. So NIntegrate[0.4 a b, {b, 0, 1}] can't be done (but Integrate[0.4 a b, {b, 0, 1}] can be done). So I'm not sure if Integrate always calls NIntegrate when there are approximate values...

POSTED BY: Sander Huisman

I think it would be helpful if symbolic functions like Integrate and Minimize automatically rationalized their inputs, rather than calling the numerical version (NIntegrate or NMinimize).

POSTED BY: Frank Kampas

Hi Camilo,

I agree with you that the error should not happen, but it is caused by giving approximate values. Compare:

Integrate[500 (1.4 - Log[0.5 t + 1])/(t + 2), t]

and

Integrate[500 (7/5 - Log[t/2 + 1])/(t + 2), t]

Please submit as Product Feedback on https://www.wolfram.com/support/contact/email/ Thanks!

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