Message Boards Message Boards

GROUPS:

FindRoot yielding unexpected values?

Posted 3 months ago
759 Views
|
2 Replies
|
1 Total Likes
|

Hello everyone,

I am trying to use FindRoot to identify all of the values of t for which a function y2(t) equals a particular value (YCritical). When I try this, however, FindRoot either gives the same point for different initial values of t or it simply gives the wrong answer, as indicated by a plot of the function. Is there a solution to this problem or should I try to find another method?

Alex

Attachments:
POSTED BY: Alex L
Answer
2 Replies

I cannot see any wrong root. I would suggest the RootSearch package by Ted Ersek, that works well with interpolating functions:

In[287]:= RootSearch[y2 == 150, {t, 0, 150}]

Out[287]= {{t -> 20.6681}, {t -> 45.8168}, {t -> 78.0834}, {t -> 
   109.089}, {t -> 131.397}}
Posted 3 months ago

Wow I did not know about this function; thank you so much!

POSTED BY: Alex L
Answer
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