Group Abstract Group Abstract

Message Boards Message Boards

0
|
10.6K Views
|
5 Replies
|
0 Total Likes
View groups...
Share
Share this post:

How to use FindRoot output as input to NDSolve for 1st order DFEQ?

Posted 10 years ago
POSTED BY: Robert Curl
5 Replies

Dear Mr. Clarke,

It works like a charm!

Thank you,

Bob Curl

POSTED BY: Robert Curl

Please see this article:

http://support.wolfram.com/kb/12502

for an explanation of why ?NumericQ had to be added

POSTED BY: Sean Clarke

Thank you for your reply Mr. Lichtblau. I apologize for all the mistakes. I will follow up on your suggestions and post the complete code in the future. In the meantime, I have managed to get the program to work by setting up a grid of values of y[x] and x using FindRoot to populate the grid with values g and then create a 2D InterpolatingFunction . I replace the g function that calls FindRoot directly by the InterpolatingFunction. It feels like a kluge to me, but it works.

POSTED BY: Robert Curl

It sounds like a reasonable approach. There might be better ways but when you have something that works well enough, you have to ask whether it is worth the time to improve on it. Often this decision depends on whether you are doing a one-off problem vs. creating a method you may need to scale to larger size down the road.

POSTED BY: Daniel Lichtblau
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