# Math Help - Showing that one algebraic equation is equivalent to another (fairly complicated)

1. ## Showing that one algebraic equation is equivalent to another (fairly complicated)

This is a part of a larger proof, which is irrelevant here. What I'm stuck on is showing that this:
k*(u0-u)^2+n*(y-u)^2
is the same as
(k*n/(k+n))*(y-u0)^2+(k+n)*((k*u0+n*y)/(k+n)-u)^2

Note that u0 and u are two different variables.

I've been factoring and pushing things around for more than 2 hours. I'm embarrassed to be stuck

2. ## Re: Showing that one algebraic equation is equivalent to another (fairly complicated)

Originally Posted by birdz
This is a part of a larger proof, which is irrelevant here. What I'm stuck on is showing that this:
k*(u0-u)^2+n*(y-u)^2
is the same as
(k*n/(k+n))*(y-u0)^2+(k+n)*((k*u0+n*y)/(k+n)-u)^2

Note that u0 and u are two different variables.

I've been factoring and pushing things around for more than 2 hours. I'm embarrassed to be stuck
$\frac{kn}{k+n} \cdot (y-u_0)^2 + (k+n) \cdot \left(\frac{ku_0+ny-ku-nu}{k+n}\right)^2=$

$= \frac{kn(y-u_0)^2}{k+n}+\frac{(ku_0+ny-ku-nu)^2}{k+n} =$

$= \frac{kn(y-u_0)^2+(k(u_0-u)+n(y-u))^2}{k+n}$

I think that you can proceed from here....

3. ## Re: Showing that one algebraic equation is equivalent to another (fairly complicated)

Originally Posted by birdz
Note that u0 and u are two different variables.
Why not use v? Easier to "handle" than u0, like less possible confusion...

4. ## Re: Showing that one algebraic equation is equivalent to another (fairly complicated)

princeps- Thank you so much!!!

Originally Posted by Wilmer
Why not use v? Easier to "handle" than u0, like less possible confusion...
You're right I probably should have. Although it's a bit easier for me to use notation similar to my original variables (selfish, I know). 'u' refers to the "true mean" and 'u0' refers to the mean of the prior. It's from the process of updating the prior of a normal-inverse chi squared distribution.

5. ## Re: Showing that one algebraic equation is equivalent to another (fairly complicated)

Whatever turns you on...