Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I have a question. Suposse I have some data with their respective errors:

 Data = {{0.067, 0.423}, {0.30, 0.408}, {0.60, 0.433}, {0.25,0.3512}, {0.37, 0.4602}, {0.44, 0.413}, {0.60, 0.390}, {0.73,0.437}, {0.8, 0.47}};

 Errors = {0.055, 0.0552, 0.0662, 0.0583, 0.0378, 0.080, 0.063, 0.072, 0.08};

I want to construct somehow numerical derivatives of these data at som specific point. My idea was first to find a fit of those data (I'm not including the errors so far)

model = a*x + b*x^2 + c*x^3 + d*x^4 + f*x^5 + g*x^6 + h*x^7 + j*x^8 + k*x^9;

fit = FindFit[Dataf, model, {a, b, c, d, f, g, h, j, k}, z];

modelf = Function[{z}, Evaluate[model /. fitfs8]];

fits = Plot[modelf[x], {x, 0, 1.0}, Epilog -> Map[Point, Datafs8], 
 Frame -> True, ImageSize -> 700, PlotStyle -> Directive[Red], 
FrameLabel -> {Style["x", Italic], 
 Style["y", Italic]}, Axes -> False, 
 LabelStyle -> Directive[16]];

enter image description here

The reason why I choose those model was matter of convenience, since I have some theoretical model (Black line, I don't add the expression because is quite "complicated"). After that I make a Numerical Derivative of the Model and compare with the analytical derivative of the theoretical prediction

enter image description here

The questions are:

  1. How can I include the errors in the method?
  2. How can I get then expressions (numbers) for y' at some point with errors as well?

I appreciate your help :)

share|improve this question
You have 18 numbers and 9 errors?? Anyways, with value and error, you could assign in mathematica: number=SetPrecision[value,-Log10[error/value]] –  Coolwater Jan 30 at 11:57
Yes...it.s supossed the data is kind of (x_i,y_i) and errors (Delta y_i) –  Alejandro Guarnizo Jan 30 at 13:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.