Thursday, January 3, 2019

Multiplying Polynomials with Excel


  I've roughed out a procedure for multiplying two polynomials together in Excel. Here's a short video showing how easily it can do this sort of thing once it's been set up.


I've replaced the original video with one showing the variables being edited. One can play the video full screen or try enlarging it by zooming in on the browser page.

Wednesday, December 26, 2018

Some Polynomial Factoring Formulas


  I got Nio to work out some polynomial factoring formulas for me. Looks like they follow a simple pattern.


Factoring a Quartic Polynomial into Two Quadratics 2


  The previous blog neglected to mention what happens if b=0 which has to be treated as a special case since the formula for d results in division by zero. When b=0 the initial sets of constraints are simplified slightly and the formula for d changes.


One can then proceed as before to find the best values for a, b, c and d.


There is only one remaining constraint which gives the same zeros.


We need only one solution to factor the quartics since the various zeros correspond to alternative permutations of the monomials in the quartic. Another special case occurs when in addition a=0 and the altered constraints tell us that d=A0 and c=A3. Zero coefficients warn about the occurrence of the special cases. One can use the same general method to factor a cubic equation into a quadratic and a monomial where one also finds a special case for a=0 since the formula for b involves division by a.

Tuesday, December 25, 2018

Factoring a Quartic Polynomial into Two Quadratics


  Lately I've been working on an Excel spreadsheet to solve for the eigenvalues of a given 4x4 matrix M with real coefficients. These eigenvalues are the roots of the eigenvalue equation |M-μI|=0 which is actually a 4th degree polynomial, a quartic equation. But before I got around to doing a blog on solving for the roots of these equations with numerical methods I decided to check to see if it was easier to factor the quartic into two quadratic equations instead.

This turned out to be the case. To see this lets start with a set of coefficients for a quartic equation and compare them with those that result from multiplying the two quadratics together. If the first quadratic is represented by q₁(x)=x²+ax+b and the second by q₂(x)=x²+cx+d so equating their products gives the set of four equations which need to be solved for a, b, c and d.


The first and last equations allow us to easily compute d and c if a and b are known. One can then substitute these formulas into the second and third equations to get two equation f₁(a)=0 and f₂(a)=0 by assuming that b is a function of a. Substituting the solution for b(a)² from one into the other results in a linear equation for b(a) giving us a rational function for b(a).



One can do a one dimensional search for the magnitude of the minimum error between the computed values for the quartic coefficients and the given values. One can alter the range of the search and change the step size to zoom in on a zero using feedback if necessary for precise values. Evaluating the function f₁(a) gives us a check on the zeros.


Substituting the four values for the zeros of a into our formulas gives the corresponding values for b, c, and d which check with the original polynomials used to generate the coefficients.


Note there are four pairs of monomials here since there is one double root. In general there would be six zeros but as with the example given here there is duplication since the coefficients of the first and second quadratic can be exchanged. The feedback mentioned above for finding the zeros uses copy and paste to transfer the value of a for the minimum err into the first row of the a column.

Merry Christmas to All

Wednesday, October 10, 2018

True Standard & Some Silver References


  Cupellation appears to be the most accurate assay method for silver but there are some losses, on the order of 0.1%, in the process which requires an adjustment to determine the fineness on the scale of a true standard. This points out the difficulty in specifying a definitive test for the fineness of silver and the care that needs to be taken.

Here are some books and links concerning silver and its history, alloys, assay and metallugy:

aes - Wiktionary  Harper's Dictionary of Classical Literature and Antiquities

Pliny - The Natural History of Metals c. 79 AD

Arbuthnot - Tables of Ancient Coins, Weights and Measures 1727, proportion of gold & silver in coins

Phillips - A Manual of Metallurgy 2nd Ed 1859, assay of the alloys & ores of silver

Phillips - The Mining and Metallurgy of Gold and Silver 1867, concentration of precious metals in lead, smelting

Percy - The Metallurgy of Lead 1870, lead-smelting

Hill - A Handbook of Greek & Roman Coins 1899, quality of metals used

Del Mar - A History of the Precious Metals 1902

Scientific American Cyclopedia of Formulas 1915, silver and copper alloys  dwt

Phase diagram - Wikipedia

Saturday, October 6, 2018

Provisional and Definitive Tests


  I've been trying to come up with a good example from the History of Science to illustrate the comparison of test procedures and one is the assessment of the purity of metals. One test might be the use of Archimedes' principle to test the specific gravity of a given sample. On the other hand one might take cupellation as the definitive test for purity but he disadvantage of cupellation is that it is destructive so one might prefer a provisional test like the use of Archimedes' principle.

Cupellation is used in the Trial of the Pyx for the assay of coinage. This method dates from ancient times. Modern silver standards are well regulated. For example sterling silver is required to have a fineness of 925.

A modern example of the purification of metals similar to cupellation is the Czochralski processX-rays can also be used for assaying metals.

Monday, October 1, 2018

Using Concurrence Counts for Comparisons


  In the last couple of blogs I tried to show how the expected number of good items in a sample can be estimated if the agreement and disagreement of two testers were known for correct assessments on the same set of items. One just needs the counts of the concurrence since from them one can determine what the testers observations were as indicated in this diagram. The counts in the last column are just the sum of the counts for the two path leading to the combined counts.


If one tries to make an estimate NG using the actual observations one ends up with an estimate of N0, the number of items in the sample instead.


So the testers' assessments themselves don't help us very much. In general we need a table of the concurrence of the actual number of good and bad items. We can alter the problem by asking how well a pass/fail function test will predict whether an item will function for a specified length of time with those that do being the number of "good" items. So we need to consider diagrams like these for the two testers.


After the true counts of concurrence have been determined on can use them to get the conditional probabilities for the testers which in turn allow us to evaluate the testers and their tests.

Supplemental (Oct 4): The reference to a concurrence matrix above would be more properly be called a concurrence table. The conditional probabilities are part of a matrix since they allow one set to be used to compute the other if one set of probabilities is known. The reason for the failure of the testers' concurrence estimate is due to the presence of false positives in the counts used.