Every oil contains different quantities of omega3 and omega6. I would like to mix two oils so that the ratio omega6/omega3 is the one I want.
For example, this are two oils:
In 100 grams
Omega6 Omega3
---------------------------------
FLAXSEED 51 grams 7 grams
SOYBEAN 14 grams 57 grams
I want for example a ratio omega6/omega3 of 2.
What formula should I apply that tell me the flaxseed/soybean ratio to use, in order to eat omega6/omega3 in the proper ratio?
Let the numbers in the first column of your table be called $p_1= 51$ and $p_2 = 7$.
Let $k$ be the ratio you want.
For a mix that's $s$ of the first item and $1-s$ of the second (if $s = .25$, that means 25% flaxseed and 75% soybean), you want to have $$ (1-s) p_1 + s p_2 = k ((1-s) q_1 + s q_2) $$ So we solve this for $s$:
\begin{align} (1-s) p_1 + s p_2 &= k ((1-s) q_1 + s q_2)\\ p_1-s p_1 + s p_2 &= k (q_1 -sq_1 + s q_2)\\ p_1- kq_1 - s p_1 + s p_2 &= -skq_1 + s k q_2\\ p_1- kq_1 - s(p_1 - p_2) &= -sk(q_1 - q_2)\\ p_1- kq_1 &= s(p_1 - p_2) -sk(q_1 - q_2)\\ p_1- kq_1 &= s[(p_1 - p_2) -k(q_1 - q_2)]\\ \frac{p_1- kq_1}{(p_1 - p_2) -k(q_1 - q_2)} &= s \end{align}
And that's your formula.