## Solution to #17

```Let the two metals be designated "a" and "b" and their densities
be designated Da and Db, repectively. Suppose a composite coin of
mass M is constructed of layers of metals a and b weighing Ma and
Mb, repectively.  Thus, M = Ma + Mb.  Let's call X the mass
fraction of metal a: X = Ma/M. The fraction of metal b
is therefore 1-X, since there are only 2 metals.

Now, the overall density of the composite coin is just its total
mass divided by its total volume V.  The total volume V is just
the sum of the volumes of the two layers Va + Vb.

M          M
D = ------- = ---------
V       Va + Vb

But from the definition of density Va = Ma/Da and Vb = Mb/Db.  Thus

M
D = -----------
Ma     Mb
---- + ----
Da     Db

But Ma = X*M and Mb = (1-X)*M.  Thus

M
D = ---------------
X*M    (1-X)*M
---- + -------
Da      Db

factoring and cancelling M:

1
D = --------------
X      1-X
---- + ------
Da      Db

And there you go - given the densities of the two metals and the fraction
of one of the metals, you can calculate the density of the composite coin. ```