フィルターのクリア

fsolve and truncation error

8 ビュー (過去 30 日間)
John Miller
John Miller 2012 年 6 月 19 日
Hello,
how can I display the truncation error when I run fsolve?
thank you

回答 (1 件)

Walter Roberson
Walter Roberson 2012 年 6 月 19 日
fsolve() accepts arbitrarily complex functions. You cannot numerically calculate the truncation error of arbitrarily complex functions.
For example, suppose the function calculates the number of Odd Perfect Numbers, and suppose the solution come out with is 0. The truncation error would be the actual number of odd Perfect Numbers, a value that no one knows even though it has been actively studied for nearly 400 years. In order for fsolve() to return a (valid) truncation error, fsolve() would have to be able to solve a major outstanding problem in mathematical theory. No Can Do.
  4 件のコメント
John Miller
John Miller 2012 年 6 月 19 日
My function is a strong nonlinear 10 dimensional vector field :) to differentiate it with respect to t is not an good idea...
I thought about counting the amount of iteration. When the number of iterations is greater than a upper threshold, the timestep is reduced by a factor of a. When the number of iterations is less then the lower threshold, the timestep is increased by a factor of c.
Or how works the stepcontrol in the ode() solvers ? This works pretty good...
John Miller
John Miller 2012 年 6 月 20 日
Are you supplying jacobians? No but fsolve can easily return the jacobian...

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeCalculus についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by