Group Abstract Group Abstract

Message Boards Message Boards

0
|
5.4K Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

How to get the data points from the following differential equation?

Posted 10 years ago
sols = NDSolve[{x'[t] == (1/4) x[t - 15]/(1 + x[t - 15]^10) - x[t]/10, x[t /; t <= 0] == 0.01}, x, {t, 0, 10}];
POSTED BY: Dia Ghosh
2 Replies
Posted 10 years ago

Thank you very much for your response. Now if I want to find out the fft of x'[t], then?

POSTED BY: Dia Ghosh

The result is an interpolation function. So there is no "data points". You can use the function to generate the points you want. Interpolation function can be used as any other function. You can differentiate it, integrate it, plot it , etc...

ClearAll[x,t]
eq = x'[t] == (1/4) x[t - 15]/(1 + x[t - 15]^10) - x[t]/10;
sols = First@NDSolve[{eq, x[t /; t <= 0] == 0.01}, x, {t, 0, 10}];
x[1] /. sols 
   (*0.0114274*)

So you can Table command to generate points as needed.

    Table[{i, x[i] /. sols}, {i, 0, 10, 1}]
(*{{0, 0.01}, {1, 0.0114274}, {2, 0.012719}, {3, 0.0138877}, {4, 0.0149452}, {5,0.015902}, {6, 0.0167678}, {7, 0.0175512}, {8, 0.0182601}, {9,0.0189015}, {10, 0.0194818}}*)
POSTED BY: Nasser M. Abbasi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard