Message Boards Message Boards

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

Interpolating Functions

Posted 10 years ago
POSTED BY: Brandyn Wessels
2 Replies
Posted 10 years ago
POSTED BY: Brandyn Wessels
Posted 10 years ago

Hi Brandyn,

It would help if you would post code. But . . . NDSolve returns a rule which can be used to define a solution. NDSolveValue returns the solution itself. In both cases the solution is an interpolating function. It may be that the "value" you are seeing is the range limits that are displayed in the representation of the interpolating function. But the function itself accepts values of the independent variable, with the solution "valid" within the displayed range.You can see this if you execute the code below. (I deleted the output before posting because it would be very messy.)

Kind regards, David

eq = {y''[t] == -1, y[0] == 0, y'[0] == 10};

(* NDSolve returns a rule -- use it to define solution variable *)
solution = y /. NDSolve[eq, y, {t, 0, 20}][[1]]

Plot[solution[t], {t, 0, 20}]

(* NDSolveValue returns a solution -- set variable to it *)
solution = NDSolveValue[eq, y, {t, 0, 20}]

Plot[solution[t], {t, 0, 20}]
POSTED BY: David Keith
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