Group Abstract Group Abstract

Message Boards Message Boards

Higher order derivates: Plotting Problems with orders > 4

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

Simon,

As suggested by Frank, you can use DSolve[] for this problem. The problem with NDSolve[] is that solution interpolation order is not enough to produce "nice" result. You need to set InterpolationOrder option to get a better one:

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,
    Method -> {"ImplicitRungeKutta", "DifferenceOrder" -> 20},
   InterpolationOrder -> All
   ];

I.M.

POSTED BY: Ivan Morozov
Posted 11 years ago
POSTED BY: Simon Tyran

MaxSteps -> Infinity doesn't force the algorithm to take an infinite number of steps; it removes the limit on the number of steps, which is then determined by numerical goals set for the calculation. What you're seeing is the result of the NDSolve not being able to produce an exact solution, since it uses polynomial interpolation. If you used a quadratic instead of a sine function, you might get the result you expect. I haven't tried it so I don't know.

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

The "problem" does occur using Mathematica 10.

Ok so I'll stay with version 9.

What you're seeing is the result of using a numerical algorithm, which takes finite steps

Therefor I used "MaxSteps -> Infinity", but with no success

If you change from NDSolve to DSolve, the "problem" goes away.

This is what I did and it works, but I was not sure if the NDSolve error was on me. I expected Mathematica to plot the 7th derivate easier than the 0th, because it is defined directly while the lower derivatives need to be further evaluated. Curiously the Plot for the low derivatives gives the correct results, while depending on the incorrectly plotted higher derivate which is a straigt an plain Sin[t].

Still wondering,

Yukterez

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