# Need a calculation to find a relationship/correlation

1. Feb 25, 2015

### shott92

basically i have a system where force 1 + force 2 must equal force max
they have the following ratio (these are the ultimate forces as in 100% of force 1 needs to be used or 100% of force 2)
force1 = 1906.901
force2 = 1760.033
simple, but to really throw me off... force 1 has to be 29% of force2...
so i kinda got this using goal seek to find force2 = 1388.40585, as such
with force 1 contributing 21.114% of force 1 = 402.6377
and force 2 contributing 78.886% of force 2 = 1388.40585 (so i found this with goal seek :/ but need to find an equation or way to calcualte the correlation without goal seek basically)

sorry i have tried making it as clear as i can, if clarifying anything specific will help please ask.

2. Feb 25, 2015

### h6ss

If you define $x$ and $y$ respectively as the first and the second force, then you have:

$x=0.29y$
$x\le1906.901$
$y\le1760.033$

And if I understand well, you want to maximise $f(x,y)=x+y$ under the stated conditions.

How would you do that?

3. Feb 25, 2015

### shott92

so yeah the first bit i get, the x=0.29y as this is and then x and y have to be equal or less than the given values but i dont get where i would have to go from there...
i used excel and put in
cell1 (goal seek - must equal 1 change cell 4)
cell2 (=cell4*0.29/force1)
cell3 (=cell4/force2)
cell4 (goal seek (variable cell)
this gave me the percentages but it may have well of been trial and error (i think thats how excel does it to be fair)
but i need to use this as part of a larger equation using first principles and so so i need some form of calculation that actually has an answer if you get me
and unfortunatly if your answer solves my problem, im afraid i dont understand nor know how to do it, sorry

4. Feb 25, 2015

### h6ss

Ah, you also want their ratios to add up to 100%. I understand now.

In that case, we add $\frac{x}{1906.901} + \frac{y}{1760.033} = 1$ as another condition.

Have you seen methods for solving constrained optimization problems?

5. Feb 25, 2015

### shott92

nope sorry once again not got a clue :/

6. Feb 25, 2015

### shott92

so is there an actual calculation that re-arranges this system to give a ratio or percentage or come correlation or is it only solvable with goal seek or trail and error ??

7. Feb 26, 2015

### h6ss

The method of Lagrange multipliers is usually used for solving constrained optimization problems like the one you've proposed. More information about that method here: http://en.wikipedia.org/wiki/Lagrange_multiplier

That's the only way I can think of solving this problem analytically, although it might not be (or certainly is not) the most optimal approach. Generally, numerical methods should be used to solve such problems, just like you did with Excel. When analytical solutions aren't expected, you shouldn't worry about using numerical methods.

Also, I can confirm you that the answer you've found with Excel is in fact the maximum value of $f(x,y)$ we're looking for.

Last edited: Feb 26, 2015