How can I solve this series of 8 equations with 4 variables?

305 Views Asked by At

I have this series of equations and I would like to find a generic formula for S;

When;

p = 0, c = 0 and e = 0, S = 0 
p = 0, c = 1 and e = 0, S = 5/7
p = 0, c = 0 and e = 1, S = 1/7
p = 0, c = 1 and e = 1, S = 6/7
p = 1, c = 1 and e = 1, S = 1
p = 1, c = 1 and e = 0, S = 4/7
p = 1, c = 0 and e = 1, S = 3/7
p = 1, c = 0 and e = 0, S = 2/7

I know when solving simultaneous equations that I need to eliminate a variable and substitute but I feel like I have too many equations here.

2

There are 2 best solutions below

0
On BEST ANSWER

One can find an infinity of different generic formulas for $S$.

They are $8$ equations. So, arbitrary chose $8$ linear equations made of $8$ different functions of $p,c,e$ (not all linear) with $8$ unknown coefficients for the functions. Solve the system of $8$ linear equations for the coefficients. This give you the generic formula. For each arbitrary choice you get a formula.

For example, with the choice of functions $1,p,c,e,pc,pe,ce,pce$ the generic formula is : $$S=a_1+a_2p+a_3c+a_4e+a_5pc+a_6pe+a_7ce+a_8pce$$
Note : In this example the first function is $1$, that is a constant function. One could have chosen another function. It doesn't matter. With other functions, we would find at the end a different formula but as valid as the formula obtained below.

The system of $8$ equations written on matrix form is : $$\left(\begin{matrix} a_1 \\ a_2 \\ a_3 \\ a_4 \\ a_5 \\ a_6 \\ a_7 \\ a_8 \end{matrix}\right) = \left(\begin{matrix} 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 \\ 0 & 0 & 1 & 1 & 0 & 0 & 1 & 0 \\ 0 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\ 0 & 1 & 1 & 0 & 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 1 & 0 & 1 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 \end{matrix}\right)^{-1} \left(\begin{matrix} 0 \\ 5/7 \\ 1/7 \\ 6/7 \\ 1 \\ 4/7 \\ 3/7 \\ 2/7 \end{matrix}\right) = \left(\begin{matrix} 0 \\ 2/7 \\ 5/7 \\ 1/7 \\ -3/7 \\ 0 \\ 0 \\ 2/7 \end{matrix}\right)$$ This example of formula is : $$S=\frac27 p+\frac57 c+\frac17 e-\frac37 pc+\frac27 pce$$

One understand that with different choice of functions of $p,c,e$ one obtain as many different generic formulas as he want.

This works for all kind of function, even not of polynomial kind as above. For example one could chose functions such as $\sin(p)$ or $\exp(pc)$, etc.

0
On

Making a CAS do the calculation described by @NoChance, set $$ S(x) = \frac{x}{5040}(12x^6 - 287 x^5 + 2673 x^4 - 12155 x^3 + 27603 x^2 - 28598 x + 11472) \text{.} $$ Then $S(4p+2c+e)$ gives the values you have requested.

It's not great, but it does exactly what you way you want.

There is no polynomial in the variables $p$, $c$, $e$ that produces the given values. Your data is not "poised". (Any 3-variable polynomial passing through seven of your points cannot pass through the eighth. An example of a near miss is $S = \frac{1}{7}\left( p(2e-c)+c(2e+3)-e+2 \right)$ which passes through all your points except $p=c=e=S=0$.)

If we allow ourselves a little more room, $$S = \frac{1}{7}\left| p(2e-3c+2)+c(2e+5)-e \right| $$ works. (This comes from the 7-point near miss given by removing the absolute value bars. The miss is then $(p,c,e,S) = \left(0,0,1,\frac{-1}{7}\right)$, which can be patched up as shown. That there are any near misses which can be made to work this easily is a miraculous coincidence.)