# Rearranging a formula

My algebra is very rusty, it's been about 15years since I studied, and I was stumped recently when trying to rearrange this formula;

$$a = b^2 + 2b^2(1 - b)$$

to give $b$ in terms of $a$.

Can someone show me step by step working please :)

I remember 'change side, change sign' but it all gets very confusing very quickly.

Thanks!

So,

$$2b^2(1-b)\Rightarrow 2b^2 - 2b^3$$

Giving

$$a = b^2 + 2b^2 - 2b^3$$

$$a = 3b^2 - 2b^3$$

$$a + 2b^3 - 3b^2 = 0$$

is this right so far?

-
That's completely correct. – Gigili May 16 '12 at 10:46
Well now I'm stuck how to get b = ... – pglove May 16 '12 at 10:59
You were stumped, not because you are rusty, but because you probably never learned how to solve third degree equations - this topic is not in the syllabus of the educational systems with which I am familiar. – Gerry Myerson May 16 '12 at 13:02
Quite right Gerry, I foolishly assumed that because it only had a's and b's it must be very simple, haha. That' me reminded then :) – pglove May 17 '12 at 3:59

$$a=b^2+2b^2(1-b)\Longrightarrow 2b^3-3b^2+a=0$$ and this is a cubic equation in b for which you'll have to use Cardano's formula. Read here http://mathworld.wolfram.com/CubicFormula.html

-
You're a legend, thanks! – pglove May 16 '12 at 10:19
Sorry, I'm still not fully there... seems more complicated than I first expected. – pglove May 16 '12 at 10:42

I will try to walk you through the steps. The general tactic is here to substitute some variables repeatedly to get "simpler" expression, i.e. expressions we understand better. Then we can finally solve the equation and "just" have to resubstitute. Be prepared that the general solution looks somewhat messy.

So we have our equation $$b^3-\frac32b^2+c=0$$ for $c=\frac a2$.

The solution tells us that we want to get rid of the second order part. This is done by setting $b=z+\frac12$. After doing some calculations you will end up with

$$z^3-\frac14z-\frac14+c=0$$ or $$z^3-\frac14z+r$$ with $r=c-\frac14$. All you really need to see this is $(x+y)^3=x^3+3x^2y+3xy^2+y^3$. We can further improve this by setting $z=w+\frac{1}{12w}$ (I dont choose this numbers randomly but according to the provided link, they depend on the given coefficients). Then it looks like

$$w^3+\frac{1}{12^3w^3}+r=0$$

Multiplying everything by $w^3$ yields

$$(w^3)^2+rw^3+\frac{1}{12^3}=0$$

which is a quadratic equation in $w^3$. The standard formula now gives

$$w^3=\frac{-r}{2}\pm\sqrt{\left(\frac{r^2}{4}\right)-\frac{1}{12^3}}.$$

So you have two solutions for $w^3$ and taking the third root gives you three solutions each, making a total of six (You probably remember that $x^2=something$ has two solutions namely $\pm$ the square root, here you will get three solutions, two of which are complex.) Now you have to roll everything back to get solutions for your initial equation. Somewhere along the way back the six solutions should reduce to three. Either since a priori different solutions end up being equal eventually, or since some solutions give illegal results. The link says something about it but I don't find it really clear. Maybe someone can comment on that.

-
Thanks Simon, I'm much further down the rabbit hole now :) – pglove May 17 '12 at 4:46

I think you might have not described the problem accurately, but after giving a lot of thought, my understanding is that $a,b$ are integers. With that assumption here is my analysis.

$$3b^2 - 2b^3 = a$$

$$\Rightarrow b^2(3-2b) = a \times 1 \tag{1}$$

One way to look at this is

$b^2 = 1$ and $3-2b = a$ (Note: there could be other combination of values)

Therefore to express $b$ in terms of $a$, you are looking for

$$b = \frac{3-a}{2} \tag{2}$$

You could stop here and have $b$ in terms of $a$, but since we have reached so far, let us check to see if the solutions are correct.

Furthermore, since $b^2 = 1$, $b = \pm 1$

Plug in the value of $b$ from $(2)$ into $(1)$, to obtain

$$\left(\frac{3-a}{2}\right)^2=1$$ and it further reduces to $(a-5)(a-1)=0$

The $(a,b)$ values are therefore $(1,1), (5,-1)$

From $(1)$, the other option is $b^2 = a$ and $(3-2b)=1$ which means $b=1$ and $b = \sqrt{a} = 1$

-
Why do you think that a,b are integers? – Américo Tavares May 16 '12 at 19:17
I think if it is not specified what $a$ and $b$ are people are entitled to give different approach to solving a problem. (There is not only one way to look at a problem) – Kirthi Raman May 16 '12 at 20:19
I think that your interpretation is more interesting, but I thought that "to give b in terms of a" would mean to solve the equation for b. – Américo Tavares May 16 '12 at 20:23
@AmericoTavers Thanks. You have given a complete algebraic solution. My +1 for that answer. – Kirthi Raman May 16 '12 at 22:12
Wow! I got two downvotes on this one. (Unpleasant wow!) – Kirthi Raman May 17 '12 at 1:12

Your last equation is correct. $$\begin{equation*} a+2b^{3}-3b^{2}=0 \end{equation*}\tag{0}$$ This equation is a cubic equation in $b$, which can be solved algebraically by the Cardano's cubic formula (see e.g. this PlanetMath entry). We can write it as

$$\begin{equation*} b^{3}-\frac{3}{2}b^{2}+\frac{a}{2}=0. \end{equation*}\tag{1}$$

1. This equation has in general $3$ complex roots. First we make the change of variables $$b=t+\frac{1}{2}.\tag{1a}$$ Since $$\begin{equation*} \left( t+\frac{1}{2}\right) ^{3}-\frac{3}{2}\left( t+\frac{1}{2}\right) ^{2}+\frac{a}{2}=t^{3}-\frac{3}{4}t-\frac{1}{4}+\frac{1}{2}a, \end{equation*}\tag{2}$$ we get the reduced cubic equation $$\begin{equation*} t^{3}-\frac{3}{4}t-\frac{1}{4}+\frac{1}{2}a=0.\tag{3} \end{equation*}$$
2. The Cardano's method to solve $(3)$ is to write the variable $t$ as a sum of two variables $$t=u+v.\tag{3a}$$ Since $$\begin{eqnarray*} &&\left( u+v\right) ^{3}-\frac{3}{4}\left( u+v\right) -\frac{1}{4}+\frac{1}{2}a \\ &=&\left( u^{3}+v^{3}-\frac{1}{4}+\frac{1}{2}a\right) +\left( 3uv-\frac{3}{4}\right) \left( u+v\right) =0 \end{eqnarray*}\tag{4}$$ every solution of the following system is a solution of the reduced cubic $(3)$ as well. $$\begin{eqnarray*} &&\left\{ \begin{array}{c} u^{3}+v^{3}-\frac{1}{4}+\frac{1}{2}a=0 \\ 3uv-\frac{3}{4}=0 \end{array} \right. \\ &\Leftrightarrow &\left\{ \begin{array}{c} u^{3}+v^{3}=\frac{1}{4}-\frac{1}{2}a \\ u^{3}v^{3}=\frac{1}{64} \end{array} \right. \\ &\Leftrightarrow &\left\{ \begin{array}{c} u^{3}+\frac{1}{64u^{3}}-\left( \frac{1}{4}-\frac{1}{2}a\right) =0 \\ v^{3}=\frac{1}{64u^{3}} \end{array} \right. \\ &\Leftrightarrow &\left\{ \begin{array}{c} \left( u^{3}\right) ^{2}-\left( \frac{1}{4}-\frac{1}{2}a\right) u^{3}+\frac{1 }{64}=0 \\ v^{3}=\frac{1}{64u^{3}}. \end{array} \right. \end{eqnarray*}\tag{5}$$
3. If we write $$Y=u^{3},\tag{5a}$$ we get the following quadratic equation $$\begin{equation*} Y^{2}-\left( \frac{1}{4}-\frac{1}{2}a\right) Y+\frac{1}{64}=0, \end{equation*}\tag{6}$$ whose solutions are $$\begin{eqnarray*} Y_{+} &=&\frac{1}{8}-\frac{1}{4}a+\frac{1}{4}\sqrt{-a+a^{2}} \\ Y_{-} &=&\frac{1}{8}-\frac{1}{4}a-\frac{1}{4}\sqrt{-a+a^{2}}. \end{eqnarray*}\tag{7}$$
4. So, without loss of generality, the solutions of the system $(5)$ are $$\begin{equation*} u=Y_{+}^{1/3},\qquad v=\frac{1}{4Y_{+}^{1/3}}=Y_{-}^{1/3}. \end{equation*}\tag{8}$$
5. Combining the above results we obtain the following formula: $$\begin{eqnarray*} b &=&t+\frac{1}{2}=u+v+\frac{1}{2} \\ &=&\left( \frac{1}{8}-\frac{1}{4}a+\frac{1}{4}\sqrt{a^{2}-a}\right) ^{1/3}+\left( \frac{1}{8}-\frac{1}{4}a-\frac{1}{4}\sqrt{a^{2}-a}\right) ^{1/3}+\frac{1}{2}.\tag{9} \end{eqnarray*}$$
6. The $3$ complex (or real) values of $(9)$ give all the solutions of $(0)$.
-
I like this algebraic approach! – Kirthi Raman May 16 '12 at 22:14
@Artin Glad to know. Thanks. – Américo Tavares May 16 '12 at 22:42
Well I'm absolutely baffled, but this is exactly the answer I was looking for. It is a lot more complicated than anticipated, thank you so much for taking the time to solve this. :) – pglove May 17 '12 at 4:14
@pglove Glad to hear that. Thanks! – Américo Tavares May 17 '12 at 9:17