Plot Binary Eutectic from Temperature of Melting and Enthalpy

I'm a little confused about plotting a binary eutectic diagram (temperature vs mole fraction), and finding the eutectic point. I understand the eutectic point is the lowest temperature that a mixture of the two substances will melt, and that this is somehow related to minimizing the Gibbs free energy of the system. However, I can't figure out how to actually solve for the eutectic point or how to graph it based on the melting temperature and enthalpy of fusion of two compounds.

I found a formula $$\frac{X_A}{X_B} = \frac{T_B-T_0}{T_A-T_0}$$ where X is the mole fraction of each component, but I was getting unrealistic answers for certain mole fractions, e.g. for $$X_A=.9$$ I was getting a value greater than the melting point of A. And for $$X_A=X_B$$ this equation can't be solved. Also, this formula doesn't take into account the enthalpy of fusion, so doesn't seem to relate to the free energy.

The volume & entropy of the system is unknown, so I wasn't sure how to set up an equation to solve for the Gibbs free energy of either component, but I was thinking that if I had an equation, I would be able to solve a system of equations for the lowest free energy and plot it (somehow?).

Can anyone explain the relationship between the making a eutectic diagram and the free energy of components in the system?

Edit: Thank you for the answer! That was really helpful conceptually in relating the free energy of a mixture to that of the pure substances, but I actually have a problem from the class that says:

Calculate and graph the binary eutectic melting diagram for the system diopside - anorthite using the data given below, and assuming for both diopside and anorthite that the activity in the liquid is equal to the mole fraction.

\begin{array}{lll} \text{Diopside}\, (\ce{CaMgSi2O6}): & \Delta H_\mathrm{fusion} = \pu{20,000 cal/mol} & T_\mathrm{fusion} = \pu{1390^\circ C} \\ \text{Anorthite}\, (\ce{CaAl2Si2O6}): & \Delta H_\mathrm{fusion} = \pu{29,000 cal/mol} & T_\mathrm{fusion} = \pu{1553^\circ C} \end{array}

So it must be possible to find based on these parameters right? Is the fact that the activity is equal to the mole fraction make the difference in solving it?

The reason that you can't figure out how to solve for the eutectic based on the melting temperature and enthalpy of fusion of the two constituents is because, well, you can't. Those bits of information, while useful in constructing the phase diagram (well, at least the melting temperatures), are not what determines the eutectic. You will have a eutectic if and only if there are interactions between the constituents in the liquid phase that reduce the Gibbs free energy below the ideal value.

Lets make this more concrete. Take elements A and B, each with a solid and liquid phase, no intermediate phases. Taking just one phase (solid or liquid) for the moment, what happens to the Gibbs free energy when we mix them together? The first bit you get is the weighted combination of the pure phase free energies, that is: $G_{mixture} = x_{A}G_{A} + x_{B}G_{B}$. But is that enough? Well, no, we forgot the entropy of mixing term. So, for an ideal mixture,

$G_{ideal} = x_{A}G_{A} + x_{B}G_{B} + RT(x_{A}\ln x_{A} + x_{B} \ln x_{B})$

What does this look like? Well, taking 'fake' elements, A that melts at 950K and B that melts at 1000K, just using ideal mixtures for solid and liquid, one gets a pretty boring diagram that looks like: with the slight separation in solidus and liquidus from the slight asymmetry in the melting points. Hmmmm... - no eutectic (since the ideal mixing impacts both liquid and solid in the same way, that is to be expected).

OK, now lets move to a regular solution model. The difference is the addition of an enthalpy term, that describes whether an A atom would rather see A or B around it (and vice versa). In the simplest way, this can be represented by a heat of mixing term using one parameter, $\Omega$. $\Omega$ is positive if the atoms don't want to mix (so, it can cause a miscibility gap), or negative if they actually prefer to mix. So, for a regular solution one gets:

$G_{regular} = x_{A}G_{A} + x_{B}G_{B} + \Omega x_A x_B + RT(x_{A}\ln x_{A} + x_{B} \ln x_{B})$

Setting $\Omega$ to -1kJ/mol, the previous diagram turns in to:

and you see that a eutectic has now formed at about $x_B = 0.25$.

Now, back to the parameters you thought were important: The melting temperature is kind of important, in so far as an asymmetry between them shifts the eutectic of the regular solution towards the lower melting element.

The enthalpy of fusion is not a factor at all in determining where phase boundaries are.

The interaction term(s) are highly relevant, since they determine where and how deep the eutectic is.

You are almost certainly being asked to make several assumptions:

1. the solids that form are "pure" solids with only one or the other component in them.
2. the liquid is an ideal liquid, with an ideal entropy / free energy of mixing
3. the specific heats of the fluids and solids can be approximated as being equal.

This said, the free energy of all phases is known. Calculate the chemical potentials in each phase. Set the chemical potentials for both compounds in two or more phases equal to each other. When there is a solution for two different phases, that is the liquidus / solidus. When there is a solution for three phases at once, that is the eutectic.

Oh, except that if you have many compounds all together, you need to have all phases in equilibrium for a eutectic.