Group Abstract Group Abstract

Message Boards Message Boards

0
|
9.9K Views
|
6 Replies
|
3 Total Likes
View groups...
Share
Share this post:

why does FindRoot with Integrate inside not always work correctly

Posted 11 years ago

I would like, for a function that I have defined, to find a limit of integration that results in a given value of integration. I am using findroot to find the limit of integration but one way of calling findroot works and another does not and I do not understand the difference in the two ways of calling findroot. With one way of calling I get

findroot fails

and the other way I get

findroot works

The only difference in the two ways of calling is that I changed the format of the call from

FindRoot[f[x]==a,{x,x0}]

to

FindRoot[f[x]-a,{x,x0}]

Can anyone explain why there is a difference in the way Mathematica responds?

POSTED BY: Mike Luntz
6 Replies

For reference, the related discussion is probably http://community.wolfram.com/groups/-/m/t/415464.

POSTED BY: Bruce Miller
Posted 11 years ago
POSTED BY: Mike Luntz
POSTED BY: Daniel Lichtblau

Michael Trott suggests the following variant, as it can be used to handle the issue of ConditionalExpression swallowing Equal.

threshold = FindRoot[Integrate[
    fSum[y] /. Catenate[{setb, setp}], {y, detThresh, \[Infinity]}, 
    Assumptions -> Element[detThresh, Reals]] == pfa, {detThresh, initThresh}, Evaluated->False]

It seems that this Evaluated option is not documented though.

POSTED BY: Daniel Lichtblau
Posted 11 years ago
POSTED BY: Mike Luntz

If you post full code to reproduce the problem, rather than an image of incomplete code, you will increase the chance of someone figuring out what might be at issue.

I say this quite often, actually. It was less of an issue back in the days before gifs.

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