Solved

algorithm to calculate the derivative

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

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Which checksum is this? 7 139
mixing C++ and C code elegantly 10 153
Pointer in one class to member in another 6 116
UPD maximums on Red Hat 6 110
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…
This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

863 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

24 Experts available now in Live!

Get 1:1 Help Now