Actually, there is no good and general way to solve a system of simultaneous nonlinear equations-even on a computer![Press, Fannery, Teukolsky, and Vettering, (1994), Numerical Recipes, Cambridge University Press] If you can guess some even approximate values for the solutions, then you can use to the computer to search for a better and better until you are satisfied with the results. (Computers are very good at quickly doing laborious calculations over and over again, but they are rather lacking in the intuition needed to make a good guess; but then again, computers don't usually take physics courses.)
In our case of two spheres and three pieces of string, we know that the sine and cosine functions must be less than 1 in magnitude, and that the tensions should be of similar magnitude to the weights of the spheres. Some of the Exploration you can do with this problem is see at what point your initial guess gets so bad that the computer if unable to find a solution.
The Newton-Raphson method starts by writing the N equations to be solved with all zeros on the right-hand side of the equations:
fi (x1, x2, ..., xN) = 0, i=1, N
where x1, x2, ...xN are the unknowns, and where there are N of these fi functions. For our problem, we take the first six unknowns to be the sines and cosines of the angles, and the last three to be the tensions:
x1 | = | sin A1, | x6 | = | cos A3, | |
x2 | = | sin A2, | x7 | = | T1, | |
x3 | = | sin A3, | x8 | = | T2, | |
x4 | = | cos A1, | x9 | = | T3, | |
x5 | = | cos A2. |
So now we can follow the Newton-Raphson formalism and write the geometric
constraints and the force equations in terms of the f functions:
f1 | = | 3 x4 + 4 x5 + 4x6 -8 | = | 0, |
f2 | = | 3 x1 - 4 x2 + 4 x3 | = | 0, |
f3 | = | x7 x4 - x9 x6 | = | 0, |
f4 | = | x9 x6 - x8 x5 | = | 0, |
f5 | = | x7 x1 - x9 x3 -10 | = | 0, |
f6 | = | x9 x3 + x8 x3 - 20 | = | 0, |
f7 | = | x1 x1 + x4 x4 -1 | = | 0, |
f8 | = | x2 x2 + x5 x5 - 1 | = | 0, |
f9 | = | x3 x3 + x6 x6 -1 | = | 0, |
Now that we know the nine functions f1-f9,
it's easier to describe the method for finding the x's which make
all of them simultaneously zero (that is, after all, the solution to our
problem). Basically, we have the computer try out ("search for")
different values for the x's and see if we happen find some which
make the f's smaller. If so, we then repeat the search starting
at these improved values of the x's, and try to find yet smaller
values for the f's. We keep having the computer make these "trials
and errors" until all the f's are essentially zero. Because
the f's may get very small yet not perfectly zero, the solution
may not be "exactly" the right answer in a mathematical sense.
For this reason, the solution is often called a "numerical" solution.
Yet in a practical sense, it can be made to be a good solution, certainly
good enough to build bridges on!
Back to Problem
Back to Interactive Tutorial
In a more mathematical language, we are looking for solutions of the nine equations
fi (x1, x2, ..., x9) = 0 , i = 1, 9
We have our initial guess values of x's (let's call them y1-y9)
for which the f's do not quite vanish
fi (y1, y2, ..., y9) ~ 0, i = 1, 9.
We pray that a small correction dx to the x's can be found for which
the f's really do vanish.
fi (y1+dx1, y2+dx2, ..., y9+dx9) = 0, i=1, 9 .
While these equations are still nonlinear, and so nearly impossible to
solve, we make a Taylor series expansion of the f's about the initial
values to obtain linear equations:
fi (y1+dx1, y2+dx2, ..., y9+dx9) ~ fi (y1+dx1, y2+dx2, ..., y9+dx9) + Sumj (dfi/dxj) dxj ,
Yet by assumption the first term on the right-hand side of these equations
vanish, and so we are left with:
0 = fi (y1+dx1, y2+dx2, ..., y9+dx9) + Sumj (dfi/dxj ) dxj, i=1, 9.
These are now linear equations in the nine corrections dxj.
Because they are linear they are solved using the techniques of linear
algebra, which are not hard to do on a computer (explicitly, LU decomposition).
Once the solution is obtained, they become the new initial guess and the
technique is repeated. A solution is usually found after just a few such
steps.
Back to Problem
Back to Interactive Tutorial