Group Abstract Group Abstract

Message Boards Message Boards

How do I control the step size of NDSolve at a differential equation?

Posted 10 years ago

I have the following differential equation

sol = NDSolve[{y'[t] == y[t] - 2*Exp[-t], y[0] == 1}, y, {t, 0, 10}]      


Plot[y[t] /. sol, {t, 0, 4}, AxesLabel -> {"Time--->", "y(t)--->"}]

how to control the step size of NDSolve

POSTED BY: Dia Ghosh
2 Replies
Posted 10 years ago

Click on NDSolve documentation

Click on >Details and Options

Scroll down to find MaxStepSize

Insert ,MaxStepSize->10^-9 inside the closing ] of your NDSolve

Evaluate

(Use this method for most questions to see if the answer is in the documentation)

POSTED BY: Bill Simpson
Posted 10 years ago

Thank you

POSTED BY: Dia Ghosh
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard