Bouncing calculation of this balance equation with the Iteration Method

Click For Summary
The discussion focuses on solving the equation for [OH-] using the iteration method, starting with an initial guess of 10^-7 M. The iterative process yields values that bounce around, leading to an average of 1.19*(10^-7) M, which is suggested for convergence. Participants explain that taking the average helps stabilize the iteration when it oscillates between two values, as it can improve convergence speed. The conversation also highlights the importance of understanding the derivative of the function involved, indicating that convergence is more likely when the derivative is within certain bounds. Overall, the iterative method is compared to electronic calculators, which efficiently find roots by narrowing down intervals based on sign changes.
i_love_science
Messages
80
Reaction score
2
I need to solve the following equation for [OH-]:

Kw/[OH-] + (10^-5)Kb/(Kb+[OH-]) = [OH-]

by using the iteration method.

I guess that [OH-] = 10^-7 M. I plug this into the left hand side of the equation and find [OH-] = 1.39*(10^-7) M. I plug this value back into the left hand side, and get OH-] = 0.99*(10^-7) M, which is approx. my initial guess.

The solution says that I should take the average of the two values I am bouncing around: [OH-] = 1.19*(10^-7) M. If it continues to bounce, I should keep on taking averages until the value converges. Actually, it turns out to work.

I don't understand why specifically the average is taken, and the reasoning behind it. Can anyone explain it? Thanks.
 
Last edited by a moderator:
Physics news on Phys.org
If you look for a solution of f(x) = x using the obvious iteration <br /> x_{n+1} = f(x_n) then this will only converge if |f&#039;(x)| &lt; 1 at the fixed point. If the iteration bounces approximately between two numbers, then that's an indication that f&#039;(x) \approx -1 at the fixed point (compare with f(x) = -x) so the iteration will either not converge or will converge only slowly.

If instead you set <br /> x_{n + 1} = \frac{x_n + f(x_n)}2 then a fixed point is a solution of x = f(x) since x = \frac{x + f(x)}2 \quad\Leftrightarrow\quad x = f(x).
Is the iteration stable? That requires that <br /> \left|\frac{d}{dx}\left(\frac{x + f(x)}{2}\right)\right| &lt; 1 at the fixed point. This is equivalent to -3 &lt; f&#039;(x) &lt; 1, so should converge much faster than the obvious ieration when f&#039;(x) \approx -1.
 
  • Like
Likes Office_Shredder and Chestermiller
OK that is the equation to give you [OH-] of a dilute (10-5 M) base. Not good question asking that you don't tell us what is the Kb value nor what is the result when 'it works'.

It looks to me that your calculation by substituting previous value was not even converging – wouldn't you expect a base to give you [OH-] greater than 10-7 (if Kw = 10-14) whereas your calculation was going the other way.

I think of the calculation that you are told to do is just the same as an electronic calculator does automatically. I read somewhere that whereas people used to use methods like Newton's to home into approximate solutions as fast as possible, that was because the calculations you had to do at each step took time and effort so you minimised the number of iterations.Then when electronics brought the cost and time of numerical calculation hugely down it was found better to do a stupid calculation a large number of times than the more clever thing that might take the computer or programmer more time. So I think what your calculator does is it divides the range of the variable that you give it into I don't know how many intervals (maybe equal to the number of pixels if it's a graphical one), then calculates
Kw/[OH-] + (10^-5)Kb/(Kb+[OH-]) - [OH-]
for each value of the variable [OH-]. When this function changes sign between one calculation and the next, there is a root between the two corresponding values of [OH-]. It divides the interval in two, calculates the function again for the intermediate value and the result tells which half of the interval the root is in. It divides that interval in two again and does the same thing again and very rapidly homes into a solution far more precise than you ever need. I think it's more or less like that but don't really know anything apart from this thing I remember.(Nor do I know why you are being asked to go through this!) Can you tell us the value of the above function for your two initial values of [OH-] ? They ought to be of opposite sign I think.
 
Last edited:

Similar threads

  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 8 ·
Replies
8
Views
2K
Replies
7
Views
2K
  • · Replies 13 ·
Replies
13
Views
6K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 6 ·
Replies
6
Views
3K
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
5K