Message Boards Message Boards

Can Mathematica modify lightly the inital conditions of NDSolve??

Posted 10 years ago

Hello to everybody,

I was trying to solve a couple of differential equations with NDSolve, they are functions of "x", "z" and the time "t". As a initial condition I impose the function to be the Hyperbolic tangent of a gaussian at t = 0, but to my surprise when I use the function "Animate", at t = 0 the function is not exactly a the hyperbolic tangent of a gaussian but rather something close to it. Why this is so? Is it possible that Mathematica changes "arbitrarily" the inital conditions in order to make it easier to solve???

Any suggestion??

I attached the screenshots of the code I use to arrive to the solutions and the plot of the supposed Tanh of the Gaussian too. You will see is not exactly the Hyperbolic tangent of a gaussian.

Thanks a lot in advance!

enter image description here

enter image description here

enter image description here

POSTED BY: Arnau Jim
4 Replies

I suspect the warning message about MaxPoints for the independent variable is a clue to your problem.

POSTED BY: Frank Kampas
Posted 10 years ago

Ok!

Here it goes! Thanks to everybody

Attachments:
POSTED BY: Arnau Jim

Or a notebook file. See the "Add a file to this post" button.

POSTED BY: Bruce Miller

It would be easier to assist you if you put your code into a code sample box.

POSTED BY: Frank Kampas
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