Correct reasoning of error propagation?

11 views (last 30 days)
Nicki
Nicki on 2 May 2017
Edited: David Goodmanson on 5 May 2017
Hello Matlabers! I am kind of a beginner and have just learned how to use Matlab to solve mathematical problems! I have a question and I hope to find someone that posses the knowledge I lack :p.
This is the case: The first part of my problem is to solve a boundary value problem. I did that and I know that I have 5 correct numbers in my solution. The next part is to change one of the variables in the equation related to the boundary value problem to get a specific value. I found the value of the variable, h with the secant method to be h= 8.1559.
The specific value I was searching from the boundary value problem was T = 750. I got that when the variable h = 8.1559. But because I have 5 correct decimals I said that the error has to be +/- 0.005 in the boundary value problem --> Error in h. So what I did was I used the secant method again to find h when the values of T when T is 749.995 and 750.005:
  • T = 750.005 → h = 8.1557
  • T = 750.000 → h = 8.1559
  • T = 749.995 → h = 8.1562 I now made the conclusion that I have two correct decimals. Is it correct? Is the reasoning correct?
Would really appreciate an answer! Really! Thanks!

Answers (1)

David Goodmanson
David Goodmanson on 3 May 2017
Edited: David Goodmanson on 3 May 2017
Hi Nicki, First off, you only see the values of h rounded to four decimal places. You can help your cause quite a bit by using 'format long' which shows many more decimal places than four.
I will assume that you are solving T = f(h), and that the secant method has a very small tolerance value so the answer for h is good to many decimal places. Suppose that f(h0) = T0, with T0 = 750.00. A small change in T, to T = 750.005, is due to a small change in h. If you are in the linear regime (no guarantee, but let's say it's the case) then by Taylor series
T = T0 + (df/dh)*(h - h0)
or
T - T0 = (df/dh)*(h - h0) where (df/dh) is the derivative evaluated at h0.
You don't have enough decimal places to tell exactly, but roughly speaking a change of .005 in T corresponded to a change of .0002 in h, so df/dh is around 25.
Now, the precision of h depends on the precision of T. If you assume that T is good to two decimal places, then | T - T0 | is at most about 1e-2 (or maybe 5e-3 if you want a stricter definition). Then you can say something about | h - h0 |, which in this example would be less than 4e-4 with the loose definition on T, or about three and a half decimal places.
More often than not you would assume a precision in h and determine a precision in T, but it works either way. Also, all this depends on the secant method having a small enough tolerance to not mess these assumptions up.
  4 Comments
Nicki
Nicki on 4 May 2017
Exactly! @David Goodmanson. h is a fixed variable.I want T = 750 at the last array of the vector x. To get that I use the secant method with h varying and I have the condition that x_end - 750 = 0. And I then get h!
David Goodmanson
David Goodmanson on 4 May 2017
Edited: David Goodmanson on 5 May 2017
Ok, when the smoke clears, just the two variables h and T are left, meaning you can consider T to effectively be a function of h. Or you could say that h is a function of T which leads to the same results, but let's say T = f(h). So what I said in the answer basically does apply.
In the linear regime, if T varies from some desired value T0 by an amount deltaT, and h varies from the desired h0 amount by delh, then
delt = const x delh
which is just (T-T0) = (df/dh)*(h-h0) in the original answer, expressed differently.
What I don't understand is that if you set T = 750, matlab interprets that in double precision as 750.0000000000000 . Lots of precision there, delT is about 1e-13. An h that would give that precise a value for T would have a very small delh and thus lot of (nonzero) decimal digits. But you are saying that h only has four decimal digits.
On the other hand if you were adjusting h manually til T got pretty close to 750, say T = 750.0001, then delT is about 1e-4 and it would take far fewer decimal digits in h to accomplish that. But I had the idea that you were not doing things that way, but rather using a secant method which can find a precise value for T, and hence a precise h.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!