Factorising a Cubic: An Easy Way?

  • Context: Undergrad 
  • Thread starter Thread starter tmonk
  • Start date Start date
  • Tags Tags
    Cubic
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 3K views
tmonk
Messages
3
Reaction score
0
I am attempting to derive the formula for the variance of a continuous uniform distribution where [tex]f(x) = \left\{ \begin{array}{ll}<br /> \frac{1}{b-a} & \mbox{$a \leq $x$ \leq b$};\\<br /> 0 & \mbox{otherwise}.\end{array} \right.[/tex]

I was successful, but only after using Wolfram Alpha to factorise the cubic.

By using [tex]Var[x] = \int_a^b \! x^{2}f(x)\, \mathrm{d}x - \mu^{2}[/tex]
I got this:[tex]\frac{b^{3} - a^{3} + 3a^{2}b - 3ab^{2}}{12(b-a)}[/tex]
The numerator just factorises to give (b-a)3, which gives the correct formula of [tex]\frac {(b-a)^{2}}{12}[/tex]

I tried using algebraic division to divide by the common factor of b-a, but I don't think I did it right. Is there an easy way to factorise the cubic?
 
Physics news on Phys.org
tmonk said:
I tried using algebraic division to divide by the common factor of b-a, but I don't think I did it right. Is there an easy way to factorise the cubic?

Just for fun.
Here's the method to do algebraic division on polynomials. :smile:

Code:
b-a | b[SUP]3[/SUP] - 3ab[SUP]2[/SUP] + 3a[SUP]2[/SUP]b - a[SUP]3[/SUP] | b[SUP]2[/SUP] ...
      b[SUP]3[/SUP] -  ab[SUP]2[/SUP]
      ----------
          -2ab[SUP]2[/SUP] + 3a[SUP]2[/SUP]b
          ...
@MM: Hey ;)