4

$$P_b=m(x\bar{x})+ m\left(\frac{my ̅\bar{y}(m+1)}2\right)- m\left(\frac x{f_x} + \frac y{f_y} \right)S - M$$

I am a novice at maths, but me and a friend came up with a formula for a hobby of ours, and as I couldn't find any tags that I really understood would fit this question, I have listed it only as homework. If you can think of more relevant tags, please help me with that.

What we are trying to do is rearrange this equation so that the subject of the equation is $m$. This is a challenge considering the equation; our current workings led us to:

$$2(P_b - M)= m\left(2x\bar{x} + 2m^2y\bar{y} + my\bar{y} - \frac{2Sx}{f_x} - \frac{2Sy}{f_y}\right)$$

But we're stuck and can't get any further than that because of the appearance of $m^x, x > 1$. Could anybody help us to make $m$ the subject of this behemoth?

Thank you!

Jeel Shah
  • 9,306
Nick
  • 43

2 Answers2

1

Can you rewrite it as $(\mathrm{something})m^3 + (\mathrm{something})m^2 + (\mathrm{something})m + (\mathrm{something}) = 0$? If so, you can follow one of the many methods listed here, such as the general cubic formula - but beware, it's not pretty.

Billy
  • 4,337
  • Perhaps the most appropriate tag is "algebra-precalculus". (Though I wouldn't expect anyone to learn how to solve a cubic equation until well after calculus, admittedly, but it has the same flavour as a quadratic equation, just much uglier...) – Billy Jul 27 '13 at 23:07
  • I've had a look through what you've just linked, and I have to admit I'm a complete novice. I have no idea what to do with that information, as relevant as it may be, because it's too high level for me. Could you help walk me through this? I'm sorry if this is a long/tedious question. – Nick Jul 27 '13 at 23:24
  • @Nick The answer is, essentially, that you need to plug numbers into formulas, or perhaps write a computer program to do so if you can't face doing it yourself. If you try to solve it algebraically, you'll end up with something disgusting like George's formulas above no matter how you spin it (Wikipedia's methods are all different ways of saying the same thing). I like George's recursive algorithm, but of course it (almost certainly) won't give you exact answers. Still, let me know if I can help with anything. – Billy Jul 28 '13 at 00:45
0

Using Mathematica, I solved the cubic to get the following solution:

$$ \frac{\sqrt[3]{-216 f_x^3 f_y^3 M y^2 \bar{y}^2+216 f_x^3 f_y^3 P_b y^2 \bar{y}^2+36 f_x^3 f_y^3 x \bar{x} y^2 \bar{y}^2-2 f_x^3 f_y^3 y^3 \bar{y}^3-36 f_x^3 f_y^2 Sy y^2 \bar{y}^2-36 f_x^2 f_y^3 Sx y^2 \bar{y}^2+\sqrt{4 \left(-f_x^2 f_y^2 y^2 \bar{y}^2-12 f_x f_y y \bar{y} (-f_x f_y x \bar{x}+f_x Sy+f_y Sx)\right)^3+\left(-216 f_x^3 f_y^3 M y^2 \bar{y}^2+216 f_x^3 f_y^3 P_b y^2 \bar{y}^2+36 f_x^3 f_y^3 x \bar{x} y^2 \bar{y}^2-2 f_x^3 f_y^3 y^3 \bar{y}^3-36 f_x^3 f_y^2 Sy y^2 \bar{y}^2-36 f_x^2 f_y^3 Sx y^2 \bar{y}^2\right)^2}}}{6 \sqrt[3]{2} f_x f_y y \bar{y}}-\frac{-f_x^2 f_y^2 y^2 \bar{y}^2-12 f_x f_y y \bar{y} (-f_x f_y x \bar{x}+f_x Sy+f_y Sx)}{3\ 2^{2/3} f_x f_y y \bar{y} \sqrt[3]{-216 f_x^3 f_y^3 M y^2 \bar{y}^2+216 f_x^3 f_y^3 P_b y^2 \bar{y}^2+36 f_x^3 f_y^3 x \bar{x} y^2 \bar{y}^2-2 f_x^3 f_y^3 y^3 \bar{y}^3-36 f_x^3 f_y^2 Sy y^2 \bar{y}^2-36 f_x^2 f_y^3 Sx y^2 \bar{y}^2+\sqrt{4 \left(-f_x^2 f_y^2 y^2 \bar{y}^2-12 f_x f_y y \bar{y} (-f_x f_y x \bar{x}+f_x Sy+f_y Sx)\right)^3+\left(-216 f_x^3 f_y^3 M y^2 \bar{y}^2+216 f_x^3 f_y^3 P_b y^2 \bar{y}^2+36 f_x^3 f_y^3 x \bar{x} y^2 \bar{y}^2-2 f_x^3 f_y^3 y^3 \bar{y}^3-36 f_x^3 f_y^2 Sy y^2 \bar{y}^2-36 f_x^2 f_y^3 Sx y^2 \bar{y}^2\right)^2}}}-\frac{1}{6} $$

You're welcome! I suspect however, that this isn't what you had in mind!

A better way to do this would be numerical approximation. Compute the derivative of your function with respect to $m$, which is:

$$ g'(m) = -\frac{2 S_x}{f_x}-\frac{2 S_y}{f_y}+2 m^2 y \bar{y}+m y \bar{y}+m (4 m y \bar{y}+y \bar{y})+2 x \bar{x} $$

Now, choose some value $m_0$ and recursively compute:

$$ m_{n+1} = m_n - \frac{g(m)}{g'(m)} $$

The longer you do this process, the closer to the value of $m$ you'll get.

  • That makes my eyes bleed. Thanks for the alternative, it will do for the time being! I know this may fluctuate, but is there a recommended number of iterations suggested for reasonable accuracy using the recursive calculation? – Nick Jul 27 '13 at 23:54
  • @Nick, convergence (if it happens) is quadratic, so each iteration approximately doubles the number of correct digit. – George V. Williams Jul 28 '13 at 00:25