(a − b) whole cube formula is:

(a−b)3=a3−3a2b+3ab2−b3(a-b)^3=a^3-3a^2b+3ab^2-b^3(a−b)3=a3−3a2b+3ab2−b3

Below is a compact “formula list” around (a − b)³.

Main identity

  • (a−b)3=a3−3a2b+3ab2−b3(a-b)^3=a^3-3a^2b+3ab^2-b^3(a−b)3=a3−3a2b+3ab2−b3

Same identity in alternative forms

  • (a−b)3=a3−3ab(a−b)−b3(a-b)^3=a^3-3ab(a-b)-b^3(a−b)3=a3−3ab(a−b)−b3
  • Rearranged as a difference of cubes plus a correction term:
    (a−b)3=(a3−b3)−3ab(a−b)(a-b)^3=(a^3-b^3)-3ab(a-b)(a−b)3=(a3−b3)−3ab(a−b)

Related cube identities (useful with it)

  • (a+b)3=a3+3a2b+3ab2+b3(a+b)^3=a^3+3a^2b+3ab^2+b^3(a+b)3=a3+3a2b+3ab2+b3
  • (a+b)3=a3+b3+3ab(a+b)(a+b)^3=a^3+b^3+3ab(a+b)(a+b)3=a3+b3+3ab(a+b)

Small HTML table for quick reference

html

<table border="1" cellpadding="6">
  <tr>
    <th>Expression</th>
    <th>Expanded form</th>
  </tr>
  <tr>
    <td>(a - b)<sup>3</sup></td>
    <td>a<sup>3</sup> - 3a<sup>2</sup>b + 3ab<sup>2</sup> - b<sup>3</sup></td>
  </tr>
  <tr>
    <td>(a - b)<sup>3</sup></td>
    <td>a<sup>3</sup> - 3ab(a - b) - b<sup>3</sup></td>
  </tr>
  <tr>
    <td>(a + b)<sup>3</sup></td>
    <td>a<sup>3</sup> + 3a<sup>2</sup>b + 3ab<sup>2</sup> + b<sup>3</sup></td>
  </tr>
  <tr>
    <td>(a + b)<sup>3</sup></td>
    <td>a<sup>3</sup> + b<sup>3</sup> + 3ab(a + b)</td>
  </tr>
</table>

Information gathered from public forums or data available on the internet and portrayed here.