Cubic Polynomials — Managing the Architecture to Calculate Roots

Rotating cubic roots into managed quadratic segments where the math is easier!

Cubic Polynomials — Managing the Architecture to Calculate Roots

This post presents a novel method for approximating 1st roots of cubic polynomials that avoids the lengthy gradient and height calculation iterations associated with Newton’s and some of my own previously posted methods.

It particularly addresses the task of approximating cubic polynomial roots in ‘difficult to get to’ locations - namely where root gradients are low and close to turning points. Such ‘architecture’ would normally require two or more iterations to solve.

This method exploits the amazing symmetry of cubic polynomials and their ‘component architecture’ by ‘rotating’ roots into segments where the underlying quadratic architecture approximates the cubic curvature.

This means we can use the simpler quadratic math to calculate a root!

This post assumes knowledge of polynomials at the high school level.

Note: In the interests of read time I’ll skip basic calculations where evident.

Background

In a previous post dealing with quadratic polynomials, Maths is Graphs — A Visual PerspectiveI presented an ‘X-ray view’ of how polynomials are constituted from their component parts.

This showed graphically how the three separate building blocks: ax², bx and cform the function y=ax²+bx+c, and importantly, how these sum to zero at the roots.

Furthering this recognition that any polynomial is simply the sum of its parts at any point x, there is nothing to prevent us exchanging or sharing parts from one component group with another — provided the overall total doesn’t change.

For example, consider the cubic: y=Ax³+Bx²+Cx+D

As long as the total function remains the same, we can reconfigure this as:

y=Ya+Yb where; Ya=(A-l)x³-mx²-nx-h and

Yb=lx³+(B+m)x²+(C+n)x+D+h

By managing these component functions we can create intercepts or ‘Nodes’ with the principal function, which can be used as platforms for Newton’s and other approximation methods.

This post furthers this methodology by using quadratic coefficient transfers (B+-m) to flatten the quadratic parabola to better simulate the principal function profile in a particular segment.

Root Rotation

Refer to Graph 1 below, of a cubic polynomial y=-x³-3x²+4x+10 (blue) with its component functions Ya=-x³ (dashed green), and Yb=-3x²+4x+10 (dashed black).

It can be seen that the quadratic component’s Turning Point J=(0.67, 11.33) and the Inflection Point (Xip,Yip) span a segment where the quadratic and cubic curves are closely aligned.

Rb1 is the intercept of the quadratic segment Yb=-3x²+4x+10 and a line, X Axis Flipped, y=8 which is equidistant with the X-axis from Yip=4.

Rotation

Given the close alignment of the cubic and quadratic curves, if the cubic function is visually rotated 180 deg. clockwise about the Inflection Point (Xip, Yip)Root Rb, it will transpose very closely to quadratic intercept Rb1.

This means Root Rb can be approximately represented by intercept Rb1’s quadratic math. I.e. we can use the standard Quadratic Equation to treat the Rb1 intercept as a root with y=8 as its X-axis.

Note: Rotation is only required when Rb1 and Rb are on opposite sides of Yip.

Graph 1

Quadratic math

Consider the cubic polynomial y=Ax³+Bx²+Cx+D and the bracketed part of the formula below, which is basically the standard Quadratic Equation of component Bx²+Cx+D with its X-axis being D-X Axis Flipped=D-2Yip.

The unbracketed term 2B/3A=2Xip simply shifts the selected Root x result across Xip to Root Rb x-coordinate.

Hence:

Approx. Root Rb=2Xip-Rb1 where Rb1 is the selected intercept nearest the inflection point (Xip, Yip).

This is calculated as:

The following example will demonstrate the simplicity of Root Rotation before I introduce improvements by changing the component functions.

Example 1

Referring again to y=-x³-3x²+4x+10

Calculate Xip and Yip as follows:

dy/dx=-3x²-6x+4

d²y/dx²=-6x-6

Hence: Xip=-1 giving Yip=+1–3–4+10=+4

Using the formula:

Root Rb=-1.62 compared with actual Rb=-1.6.

Roots 2 and 3

The remaining two roots are simply ‘downloaded’ from the ‘Extended Quadratic Equation’ I presented in Cubic Polynomials-A Simpler Approach.

Where factor L=-Root Rb=1.6; A=-1, B=-3 and D=10, giving roots Ra=-3.3 and Rc=1.9.

This example shows that the method is particularly effective with roots near turning points.

Where the roots are closer to the 
Inflection Axis Yip it becomes necessary to manage the components to improve curve matching. We’ll discuss changes in the next section.

Example 2

Refer to Graph 2 below, showing function y=x³+6x²-x-30 with the quadratic component Intercept K=(-1.65, -12) with the line y=-12 being on the Inflection Point at Xip=(-2, -12).

Intercept Rb1 of the quadratic and X Axis Flipped y=-24 approximates Root Rb after rotation.

Solving for Root Rb:

Hence: Root Rb=-3.08 compared with actual Rb=-3.

Managing the ‘Architecture’

While both examples have returned satisfactory results with minimal effort, compared with Newton’s and other approximations, improved accuracy can be achieved by reducing the gap between the quadratic and cubic curves in the segment between constant D and the inflection point (Xip, Yip).

This can be achieved by flattening the quadratic curve Yb=(B+m)x²+Cx+D by deducting m from the coefficient of  where m=Sqrt(Xip)  as detailed in the next example.

Example 3

Referring to Graph 3 below, and returning to y=x³+6x²-x-30 with Gap Xip-Intercept Di=-2+1.65=-0.35.

We can reduce this gap by letting m=Sqrt(Xip)=1.414.

This flattens the quadratic so that gap Xip-Intercept Di reduces from -0.35 to gap Xip-Intercept Ei=-2+1.87=-0.13 and moves intercept Rb1 from 0.92 to -1.04.

The ‘flattened’ quadratic Yb=(6–1.414)x²-x-30 is shown dashed red and component Ya=X³+1.414 in dashed green.

Hence:

Approx. Root Rb=2Xip-Rb1=-4+1.04=-2.96 compared with actual Root Rb=-3.

Graph 3

This process can be conveniently packaged into the above formula to present the novel 1st Root Approximation Formula as follows, where (B-Sqrt(Xip)) replaces coefficient B:

Summary

Rotating Roots into a managed ‘architecture segment’ is a relatively quick and accurate method of approximating a 1st root of a cubic polynomial by use of an amended Quadratic Equation and ‘rotational imagination’.

Care does need to be taken to get the sign right when allocating Root Rb1 to Root Rb.

In cases like Example 1 where the turning point is close to the roots, it can be highly accurate where normally two or more iterations of Newton’s method would be required. However given the ease of deducting Sqrt(Xip) from coefficient B, it is recommended this be the norm when using the method.

I hope I have demonstrated how reconfiguring the ‘LEGO’ block of functions can be effective in approximating roots of cubic polynomials, and another way to make math work for you; not you for it!