Solved

algorithm to calculate the derivative

Posted on 1997-04-09
2
708 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.

743 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now