Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline omorr  
#1 Posted : 28 January 2012 11:06:19(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
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 Good )

Regards,
Radovan

Edited by user 28 January 2012 17:29:14(UTC)  | Reason: Not specified

When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline omorr  
#2 Posted : 08 February 2012 01:48:16(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
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
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.