medium
1 min read
Sum or difference of two cubes
Sum of two cubes: The sum of two cubes can be found by adding the cubes of the two numbers. For example, if we have two numbers, a and b, then the sum of th...
Sum of two cubes: The sum of two cubes can be found by adding the cubes of the two numbers. For example, if we have two numbers, a and b, then the sum of th...
Sum of two cubes:
The sum of two cubes can be found by adding the cubes of the two numbers. For example, if we have two numbers, a and b, then the sum of their cubes would be a^3 + b^3.
Difference of two cubes:
The difference of two cubes can be found by subtracting the cubes of the two numbers. For example, if we have two numbers, a and b, then the difference of their cubes would be a^3 - b^3.
Examples:
(1 + 2)^3 = 1^3 + 2^3 + 1 * 2 * 3 = 1 + 8 + 6 = 15
(3 - 4)^3 = 3^3 - 4^3 = 27 - 64 = -37