# Cubic Polynomials — Managing the Architecture to Calculate Roots

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

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.*

## B**ackground**

In a previous post dealing with quadratic polynomials, *Maths is Graphs — A Visual Perspective**, *I 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

*form the function*

**c**,**,**

*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;

**and**

*Ya=(A-l)x³-mx²-nx-h**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

**(dashed green), and**

*Ya=-x³***(dashed black).**

*Yb=-3x²+4x+10*It can be seen that the quadratic component’s ** Turning Point J=(0.67, 11.33) **and the

**span a segment where the quadratic and cubic curves are closely aligned.**

*Inflection Point (Xip,Yip)*** Rb1** is the intercept of the quadratic segment

**and a line,**

*Yb=-3x²+4x+10*

*X Axis***which is equidistant with the X-axis from**

*Flipped, y=8*

*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)**,

**, it will transpose very closely to quadratic intercept**

*Root Rb*

*Rb1.*This meansRoot Rbcan be approximately represented by interceptRb1’squadratic math. I.e. we can use the standard Quadratic Equation to treat theRb1intercept as a root withy=8as its X-axis.

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

## Q**uadratic 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

**with its X-axis being**

*Bx²+Cx+D*

*D-X Axis Flipped=D-2Yip.*The unbracketed term ** 2B/3A=2Xip **simply shifts the selected Root

**result across**

*x***to**

*Xip***x-coordinate**

*Root Rb*

*.*Hence:

**Approx. Root Rb =2Xip-Rb1 **where

**is the selected intercept nearest the inflection point**

*Rb1***.**

*(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

**as follows:**

*Yip**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.*## R**oots 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**;

**and**

*A=-1, B=-3***, giving roots**

*D=10***and**

*Ra=-3.3***.**

*Rc=1.9*This example shows that the method is particularly effective with roots near turning points.

Where the roots are closer to theInflection Axis Yipit 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

**with the line**

*K=(-1.65, -12)***being on the Inflection Point at**

*y=-12*

*Xip=(-2, -12).*** Intercept Rb1 **of the quadratic and

**approximates**

*X Axis Flipped y=-24***after rotation.**

*Root Rb*Solving for ** Root Rb**:

Hence:** Root Rb=-3.08** compared with actual

**.**

*Rb=-3*## M**anaging 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

**from the coefficient of**

*m***where**

*x²***—**

*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

**to gap**

*-0.35***and moves intercept**

*Xip-Intercept Ei=-2+1.87=-0.13***from**

*Rb1***to**

*0.92***.**

*-1.04*The ‘flattened’ quadratic ** Yb=(6–1.414)x²-x-30** is shown dashed red and component

**in dashed green.**

*Ya=X³+1.414*Hence:

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

**.**

*Root Rb=-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

**it is recommended this be the norm when using the method.**

*B*,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!