Three Component Food Mixtures

This Demonstration calculates the mass of three food ingredients that will form a mixture of a chosen mass having a specified moisture content and amount of carbohydrates, fat or protein (CFP), etc. Each ingredient is specified by its percent moisture and percent CFP. The calculation is based on three mass balances: the total mass, the moisture and the CFP. If there is exactly one, solution the numerical results are displayed in a table. The proportion of each component in the mixture is also displayed in a pie chart along with two other pie charts that illustrate how much each ingredient contributes to the mixture's moisture and CFP.


  • [Snapshot]
  • [Snapshot]
  • [Snapshot]


Snapshot 1: fat-rich mixture
Snapshot 2: moist mixture
Snapshot 3: dry mixture
Mixing ingredients is a common operation in the food and other industries. The target mixture is usually specified by the total mass, the moisture content and the concentration of an important component. This Demonstration calculates the amounts of three components needed to meet these specifications. The calculation is based on the solution of three mass-balance equations: total mass (arbitrary units), moisture contents (%) and the important component (%) (carbohydrates, fat or protein (CFP), etc., for example). They are:
where a, b, and c are the three ingredients, and the moistures and CFPs are the user-entered values (in percent). The three unknowns are the masses of the ingredients , , and .
When these equations have unique solutions, the values of , , and are displayed in a table along with their contribution to the mixture in percent. The solution is also displayed as a pie chart accompanied by two smaller pie charts depicting each component's percent contribution to the mixture's moisture and CFP.
When the equations at a particular set of parameters do not have a unique solution or yield a physically impossible or unrealistic situation, an error message is displayed in place of the table and pie charts.
    • Share:

Embed Interactive Demonstration New!

Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details »

Files require Wolfram CDF Player or Mathematica.

Mathematica »
The #1 tool for creating Demonstrations
and anything technical.
Wolfram|Alpha »
Explore anything with the first
computational knowledge engine.
MathWorld »
The web's most extensive
mathematics resource.
Course Assistant Apps »
An app for every course—
right in the palm of your hand.
Wolfram Blog »
Read our views on math,
science, and technology.
Computable Document Format »
The format that makes Demonstrations
(and any information) easy to share and
interact with.
STEM Initiative »
Programs & resources for
educators, schools & students.
Computerbasedmath.org »
Join the initiative for modernizing
math education.
Step-by-Step Solutions »
Walk through homework problems one step at a time, with hints to help along the way.
Wolfram Problem Generator »
Unlimited random practice problems and answers with built-in step-by-step solutions. Practice online or make a printable study sheet.
Wolfram Language »
Knowledge-based programming for everyone.
Powered by Wolfram Mathematica © 2018 Wolfram Demonstrations Project & Contributors  |  Terms of Use  |  Privacy Policy  |  RSS Give us your feedback
Note: To run this Demonstration you need Mathematica 7+ or the free Mathematica Player 7EX
Download or upgrade to Mathematica Player 7EX
I already have Mathematica Player or Mathematica 7+