We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

# algorithm to calculate the derivative

on
Medium Priority
750 Views
I am looking for an algorithm to calculate the derivative of functions like i=f(v). Do you know if this is somewhere publicly awailable?
Comment
Watch Question

## View Solution Only

Commented:
Hi,

There are Mathematics ways to calculate the derivative of GOOD functions.  (like Sin , Cos , tan, log  etc.)
In this way you can calculate the derivative Exactly. ( Here I mean Exactly as Math. Exactly )
For Ex.  Sin(a)` = Cos (a) ,  Cos(a)` = -Sin (a) etc. (There only About 20 Formulas)

But If you have not GOOD (Normal) Function so you can't calculate the derivative Exactly.
And You have only Approximately  Methods.  (From Array of Variables and not from Function )

Physics Ex:

We know velocity of  Car In Each  Second. And we want to Calculate the Acceleration in Each Sec.

Time: (Sec)           0          1         ....i ...        n
Velocity:(M/s)      V(0)   V(1)    ...V(I).. V(n)            (In array V: Element  V(i) it`s Velocity at Sec i )

SR: Sampling Rate ( In Our Example is Each Sec =>  SR = 1 )
The A(i)  - acceleration at momet i (at Sec i ) equal to V` (derivative of V)

A(i) = V` = ( V(i)-V(i-1) ) / SR

Not the solution you were looking for? Getting a personalized solution is easy.

Commented:
You're basiscally correct; a better estimation of f'(x), given
f(x) (in any form), is

(f(x+h)-f(x-h))/(2h)

kind regards,

Jos
##### Thanks for using Experts Exchange.

• View three pieces of content (articles, solutions, posts, and videos)
• Ask the experts questions (counted toward content limit)
• Customize your dashboard and profile