Solved

algorithm to calculate the derivative

Posted on 1997-04-09
2
713 Views
Last Modified: 2011-09-20
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?
0
Comment
Question by:ericj040697
2 Comments
 

Accepted Solution

by:
Msoft earned 50 total points
ID: 1249868
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


I Hope It`s will help you.
                                           



0
 
LVL 4

Expert Comment

by:jos010697
ID: 1249869
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
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question