# First Derivative

1. Mar 24, 2015

### nazmulislam

Hi,

I have some points say, 100 points which come from a periodic tube profile, i.e., (z,r), where z and r are the axial and radial coordinates, respectively.

Now, I need to calculate the first derivative at each point.

Cheers

2. Mar 24, 2015

### Staff: Mentor

Can you post a sketch of the setup? And you want to calculate the derivatave of what with respect to what? Can you show some sample data?

Is this for schoolwork, or is a data set from your work?

3. Mar 24, 2015

### nazmulislam

Hi, I have given the profile below

I want to calculate dh/dz. Some data are below:

z h
-1 1
-0.8 0.823664
-0.6 0.714683
-0.4 0.714683
-0.2 0.823664
0 1
0.2 1.176336
0.4 1.285317
0.6 1.285317
0.8 1.176336
1 1

The data set from my work.

Thanks

#### Attached Files:

• ###### Profile.pdf
File size:
86.6 KB
Views:
71
File size:
2.6 KB
Views:
84
4. Mar 24, 2015

### Staff: Mentor

It looks to me like your data do not match your graph...

But in any case, are you aware of the definition of the derivative? Or implementations in discrete datasets?

One way to do it is:

$$h'(z) =\frac{h(z+1)-h(z-1)}{2z}$$

Okay, LaTeX isn't working for me tonight... In clear text:
Note from Mark44: It's fixed now @Berkman -- there was an extra brace that I removed.

h'(z) = ( h(z+1) - h(z-1) ) / 2z

Where 2z is the distance between the 2 bracketing datapoints (in the units of z). Does that make sense?

Last edited by a moderator: Mar 25, 2015
5. Mar 24, 2015

### nazmulislam

Yes, I understand the facts. Many thanks.

Cheers

6. Mar 25, 2015

### Integral

Staff Emeritus
Numeric derivatives are notoriously bad, so take your results with a grain of salt. A better approach would be to attempt to fit your data to a sinusoidal function. Then get your derivatives from that.