Group Abstract Group Abstract

Message Boards Message Boards

Higher order derivates: Plotting Problems with orders > 4

Posted 11 years ago

First I define the 5th order derivative of my function of t to be sin(t):

f = Sin[t];
tMax = Pi/2;

nds = NDSolve[{
    x'''''[t] == f,
    x''''[0] == 0,
    x'''[0] == 0,
    x''[0] == 0,
    x'[0] == 0,
    x[0] == 0

    }, x, {t, 0, tMax}, 
    MaxSteps -> Infinity];

Then I make up the Plotting command:

plot[?_] := 
 Plot[Evaluate[? /. nds], {t, 0, tMax}, Frame -> True, 
  PlotRange -> All]

xt = Evaluate[x[tMax] /. nds][[1]] "m"; "x(t)" -> xt
plot[x[t]]

ct = Evaluate[x'''''[tMax] /. nds][[
   1]] "m/sec^5";  "c(t)" -> ct
plot[x'''''[t]]

?his works well up to the 3rd detivative, but at the 4th and 5th it starts oscillating like crazy. The function of the 5th derivative should be a plain Sinus, but it looks like this:

http://s24.postimg.org/6wifn1gx1/5thderivative.png

When I define lower derivatives the expected function always comes out clearly, but it always starts breaking down at order 4 or 5. I tried to increase WorkingPrecision, but that only made it worse. Any ideas?

Scratching my head,

Yukterez

PS: I work on Mathematica 9, because version 10 was unstable in various ways. If this problem does not appear in version 10 please tell me, then I will reinstall it.

Attachments:
POSTED BY: Simon Tyran
5 Replies
POSTED BY: Ivan Morozov
Posted 11 years ago

Superb! This brings nice results.

Excited,

Yukterez

POSTED BY: Simon Tyran
POSTED BY: Frank Kampas

The "problem" does occur using Mathematica 10. What you're seeing is the result of using a numerical algorithm, which takes finite steps and makes approximations. If you change from NDSolve to DSolve, the "problem" goes away.

POSTED BY: Frank Kampas
Posted 11 years ago
POSTED BY: Simon Tyran
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard