1 страниц (2 вхождений)
Numerical differentiation? - Сообщения
#1 Опубликовано: 28.01.2012 04:06:19
Hello Andrey,
There are many situations when we need numerical derivatives. Unfortunately, SMath does not provide this at the moment. There is numerical integration (not symbolical) and symbolical differentiation (not numerical) applied. On the other hand SMath have a rather useful splines functions. Just as an example: we can have a defined function which includes integration and/or splines but could not have the derivative of it. Another example: calculating Jacobian is needed quite often, but we can not have it strictly numerically if the functions are defined that way. Of course, we can make ourselves the finite difference approximation but, as we know, the numerical differentiation is quite prone to errors as a numerical procedure. I think that SMath will need a more accurate numerical differentiation built-in method.
I suppose that you would make it already done and suppose that would include some problems, regarding SMath calculating engines. Therefore, I would kindly ask you to consider implementing a built in function for numerical differentiation in some future SMath versions (actually ASAP
)
Regards,
Radovan
There are many situations when we need numerical derivatives. Unfortunately, SMath does not provide this at the moment. There is numerical integration (not symbolical) and symbolical differentiation (not numerical) applied. On the other hand SMath have a rather useful splines functions. Just as an example: we can have a defined function which includes integration and/or splines but could not have the derivative of it. Another example: calculating Jacobian is needed quite often, but we can not have it strictly numerically if the functions are defined that way. Of course, we can make ourselves the finite difference approximation but, as we know, the numerical differentiation is quite prone to errors as a numerical procedure. I think that SMath will need a more accurate numerical differentiation built-in method.
I suppose that you would make it already done and suppose that would include some problems, regarding SMath calculating engines. Therefore, I would kindly ask you to consider implementing a built in function for numerical differentiation in some future SMath versions (actually ASAP

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#2 Опубликовано: 07.02.2012 18:48:16
Hello,
I am continuing the comment regarding the previous post and numerical differentiation. Here is an example where the SMath will fail in finding the first derivative.

diffproblem.sm
Many problems of the sort "Result is above max. allowed positive number" which is obtained by SMath symbolic engine can be overcome by using Numerical optimization or eval() function. This time it is connected with differentiation and there is no escape - it will fail whatever we try. Actually, I do not know how to force SMath to give the result. I gave here the finite difference approximation just for the comparison. Besides the mentioned problems, one of my favorite function - roots()- will fail sometimes even for a single nonlinear equation - which might be quite frustrating. I suppose the problem originated from the same source if the roots() was based on Newton-Raphson method. Just for the sake of example here is the continued previous problem where roots() failed. Fortunately solve() was successful and even the "homemade" simple root finding function give the result here.
rootsfailed.sm
Regards,
Radovan
I am continuing the comment regarding the previous post and numerical differentiation. Here is an example where the SMath will fail in finding the first derivative.

diffproblem.sm
Many problems of the sort "Result is above max. allowed positive number" which is obtained by SMath symbolic engine can be overcome by using Numerical optimization or eval() function. This time it is connected with differentiation and there is no escape - it will fail whatever we try. Actually, I do not know how to force SMath to give the result. I gave here the finite difference approximation just for the comparison. Besides the mentioned problems, one of my favorite function - roots()- will fail sometimes even for a single nonlinear equation - which might be quite frustrating. I suppose the problem originated from the same source if the roots() was based on Newton-Raphson method. Just for the sake of example here is the continued previous problem where roots() failed. Fortunately solve() was successful and even the "homemade" simple root finding function give the result here.
rootsfailed.sm
Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
1 страниц (2 вхождений)
-
Новые сообщения
-
Нет новых сообщений