Hi,
I would like to know if anyone has a clear understanding on the following parameters used to control the precision/accuracy of NDSolve.
- PrecisionGoal / WorkingPrecision
- WorkingPrecision
I have been working on the solution of the following differential equation
x'[s] = Cos[theta[s]]
y'[s] = Sin[theta[s]]
theta'[s] = 2 b - Sin[theta[s]] / x[s] (for s >0, and b for s = 0)
with the initial condition x[0] = 0, y[0] = 0, theta[0] = 0.
This differential equation has an exact solution x[s] = (1/b) Sin[b s], y[s] = (1/b) (1 - Cos[b s]), theta[s] = b s. Therefore, I can check the precision of the result. So I launch Mathematica and solve it with b = 1, PrecisionGoal -> 20, WorkingPrecision -> 30. But I can't seem to get something better than 9 digits of precision.
I have attached a Mathematica notebook to prove that.
I kind of understand that there is no way an algorithm can guarantee a given precision. But the documentation around PrecisionGoal looks pretty unclear to me. So here are my questions :
- Is there a way to get a better precision with Mathematica ?
- What does PrecisionGoal really control and can we get an idea of how it works ?
Attachments: