Cubic Equation Definition:
A cubic equation is a polynomial equation of the third degree. The general form is
ax3+bx2+cx+d=0,
where a ≠ 0.
Cubic Equation Formula :
ax3 + bx2 + cx + d = 0,
where
a = coefficient of x3
b = coefficient of x2
c = coefficient of x and
d = constant.
Cubic Equation solving formula:
x1 = (-Term1 + r13 * math.cos(q3 / 3)
x2 = (-Term1 + r13 * math.cos(q3 + (2 * math.PI) / 3)
x3 = (-Term1 + r13 * math.cos(q3 + (4 * math.PI) / 3)
where x1, x2 and x3 are the roots of the cubic equation.
Example 1: Calculate the roots(x1, x2, x3) of the cubic equation,
x 3 - 4x2 - 9x + 36 = 0
Step 1: From the above equation, the value of a = 1, b = - 4, c = - 9 and d = 36.
Step 2: To Find X:
Substitute the values in the formula's below to find the roots. The variable disc is nothing but the discriminant, denoted generally as delta(Δ)
discriminant(Δ) = q3 + r2
q = (3c - b2) / 9
r = -27d + b(9c - 2b2)
s = r + math.sqrt(discriminant)
t = r - math.sqrt(discriminant)
term1 = math.sqrt(3.0) * ((-t + s) / 2)
r13 = 2 * math.sqrt(q)
Step 3: We get the roots,
x1 = 4, x2 = -3 and x3 = 3. This is an example for real roots in the cubic equation.
|
|