Solutions of cubic Function

Solutions of the cubic Function

We have already discussed most of it in our polynomials discussion.

The following discussion takes care of all possible values of the solution when we are facing a problem involving the cubic function.

 

Given:

ax^{3}+bx^{2}+cx+d=0

Let’s depress the equation.

x=z-\frac{b}{3a}

We apply the substitution

a(z-\frac{b}{3a})^{3}+b(z-\frac{b}{3a})^{2}+c(z-\frac{b}{3a})+d=0

a(z^{3}-3z^{2}\frac{b}{3a}+3z(\frac{b}{3a})^{2}-(\frac{b}{3a})^{3})+b(z^{2}-2z\frac{b}{3a}+(\frac{b}{3a})^{2})+cz-\frac{bc}{3a}+d=0

az^{3}-3az^{2}\frac{b}{3a}+3az(\frac{b}{3a})^{2}-a(\frac{b}{3a})^{3}+bz^{2}-2bz\frac{b}{3a}+b(\frac{b}{3a})^{2})+cz-\frac{bc}{3a}+d=0

az^{3}-z^{2}\frac{3ab}{3a}+3az\frac{b^{2}}{9a^{2}}-a\frac{b^{3}}{27a^{3}}+bz^{2}-z\frac{2b^{2}}{3a}+b\frac{b^{2}}{9a^{2}}+cz-\frac{bc}{3a}+d=0

 

We simplify:

az^{3}-bz^{2}+z\frac{b^{2}}{3a}-\frac{b^{3}}{27a^{2}}+bz^{2}-z\frac{2b^{2}}{3a}+\frac{b^{3}}{9a^{2}}+cz-\frac{bc}{3a}+d=0

We factor like terms and eliminate cancelling terms:

az^{3}+(\frac{b^{2}}{3a}-\frac{2b^{2}}{3a}+c)z-\frac{b^{3}}{27a^{2}}+\frac{b^{3}}{9a^{2}}-\frac{bc}{3a}+d=0

az^{3}+(c-\frac{b^{2}}{3a})z+(d+\frac{2b^{3}}{27a^{2}}-\frac{bc}{3a})=0

Dividing by a we can let:

p=\frac{3ac-b^2}{3a^2}

and

q=\frac{27a^{2}d-9abc+2b^{3}}{27a^{3}}

We get the deprecated function.

z^{3}+pz+q=0

Please note that when q=0, we can simply deduct the 3 values of x from those of z.

This situation is ideal because the term in x^{2} has vanished.

Let:

z=s+t

We get

(s+t)^{3}+p(s+t)+q=0

s^{3}+3s^{2}t+3st^{2}+t^{3}+p(s+t)+q=0

s^{3}+t^{3}+3st(s+t)+p(s+t)+q=0

We can see that :

3st=-p and s^{3}+t^{3}=-q will make our equation 0.

\begin{cases}st=-\frac{p}{3}\\s^{3}+t^{3}=-q \end{cases}

Let’s cube the first line:

\begin{cases}s^{3}t^{3}=-\frac{p}{3}\\s^{3}+t^{3}=-q \end{cases}

Now let:

u=s^{3} and v=t^{3}

We get:

\begin{cases}uv=-\frac{p}{3}\\u+v=-q \end{cases}

To  solve this we’ll use:

\Delta=\frac{q^{2}}{4}+\frac{p^{3}}{27}

 

If \Delta>0 , the equation has one real root and 2 complex roots

If \Delta=0 , the equation has one root \frac{3q}{p} and a double root \frac{-3q}{2p}

If \Delta<0 , the equation has three real roots

Case p=0

z^{3}+q=0

We have complex roots:

z^{3}=-q

z^{3}=-q+0i

\theta=0+2k\pi=2k\pi with k=0,1,2

If z^{3}=-qe^{2k\pi i}

We get:

z=\sqrt[3]{-p}e^{\frac{2k\pi}{3}i}

x_1=\sqrt[3]{-p}-\frac{b}{3a}

x_2=\sqrt[3]{-p}\cos (\frac{2\pi}{3})-\frac{b}{3a}+\sqrt[3]{-p}\sin(\frac{2\pi}{3})i

x_3=\sqrt[3]{-p}\cos (\frac{4\pi}{3})-\frac{b}{3a}+\sqrt[3]{-p}\sin(\frac{4\pi}{3})i

 

Case q=0

z^{3}+pz=0

z(z^{2}+p)=0

z_{1}=0

if p>0

z_{2}=\sqrt{p}i

z_{3}=-\sqrt{p}i

 

x_{1}=-\frac{b}{3a}

x_{2}=-\frac{b}{3a}+\sqrt{p}i

x_{3}=-\frac{b}{3a}-\sqrt{p}i

 

if p<0

z_{2}=\sqrt{-p}

z_{3}=-\sqrt{-p}

 

x_{1}=-\frac{b}{3a}

x_{2}=-\frac{b}{3a}+\sqrt{-p}

x_{3}=-\frac{b}{3a}-\sqrt{-p}

 

 

Case \Delta=0

u=v=-\frac{q}{2}

This means:

\frac{p^{3}}{27}=-\frac{q^2}{4} Meaning p<0

We get the following solutions:

\begin{cases}z_{1}=\frac{3q}{p}\\z_{2}=z_{3}=-\frac{3q}{2p} \end{cases}

We use 

x=z-\frac{b}{3a} to get x

 

Case \Delta<0

We proceed as follows:

y=\sqrt{-\frac{4p}{3}}\cos \theta

When we replace z in our equation:

\left(\sqrt{-\frac{4p}{3}}\right)^{3}\cos^{3} \theta+p\sqrt{-\frac{4p}{3}}\cos \theta+q=0

\sqrt{16\frac{p^{2}}{9}(-\frac{4p}{3}})\cos^{3} \theta+p\sqrt{-\frac{4p}{3}}\cos \theta=-q

4\sqrt{-\frac{4p^{3}}{27}}\cos^{3} \theta+\sqrt{-\frac{4p^3}{3}}\cos \theta=-q

4\sqrt{-\frac{4p^{3}}{27}}\cos^{3} \theta+3\sqrt{-\frac{4p^2}{27}}\cos \theta=-q

By simple division we get:

4\cos^{3} \theta-3\cos \theta=-q\sqrt{-\frac{27}{4p^{3}}}

Let’s simplify the left side:

    <span class="ql-right-eqno">   </span><span class="ql-left-eqno">   </span><img src="https://www.mouctar.org/wp-content/ql-cache/quicklatex.com-8587d5a8b67e37eb7272673c07bea828_l3.png" height="329" width="385" class="ql-img-displayed-equation quicklatex-auto-format" alt="\begin{align*} 4\cos^{3} \theta-3\cos \theta &=\cos^{3} \theta+3\cos^{3} \theta-3\cos \theta\\&=\cos^{2} \theta \cos \theta+3\cos \theta(\cos^{2} \theta-1)\\&=\cos^{2} \theta \cos \theta-3\cos \theta(1-\cos^{2} \theta)\\&=\cos^{2} \theta \cos \theta-3\cos \theta \sin^{2} \theta\\&=\cos \theta (\cos^{2} \theta-3\sin^{2} \theta)\\&=\cos \theta (\cos^{2} \theta- \sin^{2} \theta-2\sin^{2} \theta)\\&=\cos \theta (\cos (2\theta)-2\sin^{2} \theta)\\&=\cos (2\theta) \cos \theta-2\sin^{2} \theta \cos \theta\\&=\cos (2\theta) \cos \theta-2\sin \theta \cos \theta \sin \theta\\&=\cos (2\theta) \cos \theta-\sin (2\theta) \sin \theta\\&=\cos (2\theta +\theta)\\&=\cos (3\theta)\end{align*}" title="Rendered by QuickLaTeX.com"/>

From this we get:

\cos^{3} \theta=\frac{1}{4}\cdot \cos 3\theta+\frac{3}{4}\cdot \cos \theta

If we let :

z=K\cdot \cos \theta

From our main equation:

K^{3}\cdot \cos^{3} \theta+ p\cdot K \cdot \cos \theta+q=0

Replacing from above

K^{3}(\frac{1}{4}\cdot \cos 3\theta+\frac{3}{4}\cdot \cos \theta)+p\cdot K \cdot \cos \theta+q=0

K(\frac{3}{4}K^{2}+p)\cos \theta+(\frac{K^{3}}{4}\cos 3\theta+q)=0

The same technic we used earlier helps us get

\begin{cases} \frac{3}{4}K^{2}+p=0\\ \frac{K^{3}}{4}\cos 3\theta+q \end{cases}

With p<0

K=\sqrt{-\frac{4p}{3}}=2\sqrt{-\frac{p}{3}}

\cos 3\theta=-\frac{4q}{K^{3}}

The simplified Equation is:

\cos (3\theta)=\frac{3q}{2p}\sqrt{-\frac{3}{p}} Remember p<0

3\theta=\phi+2k\pi \Rightarrow \theta=\frac{\phi+2k \pi}{3} with k=0,1,2

Our Solutions:

z_{1}=2\sqrt{-\frac{p}{3}}\cdot \cos (\frac{\phi}{3})

z_{2}=2\sqrt{-\frac{p}{3}}\cdot \cos (\frac{\phi+2\pi}{3})

z_{3}=2\sqrt{-\frac{p}{3}}\cdot \cos (\frac{\phi+4\pi}{3})

We can now find  x.

x_{1}=2\sqrt{-\frac{p}{3}}\cdot \cos (\frac{\phi}{3})-\frac{b}{3a}

x_{2}=2\sqrt{-\frac{p}{3}}\cdot \cos (\frac{\phi+2\pi}{3})-\frac{b}{3a}

x_{3}=2\sqrt{-\frac{p}{3}}\cdot \cos (\frac{\phi+4\pi}{3})-\frac{b}{3a}

 

Case \Delta>0

when p<0 

 Here we say:

z=\sqrt{-\frac{4p}{3}}\cosh \theta

The same transformations yield:

4\cosh^{3} \theta-3\cosh \theta=-q\sqrt{-\frac{27}{4p^{3}}}

And:

\cosh (3\theta)=-q\sqrt{-\frac{27}{4p^{3}}}

 

when p>0 

Here we say:

z=\sqrt{-\frac{4p}{3}}\sinh \theta

The same transformations yield:

4\sinh^{3} \theta+3\sinh \theta=-q\sqrt{-\frac{27}{4p^{3}}}

And:

\sinh (3\theta)=-q\sqrt{-\frac{27}{4p^{3}}}

 

General rule for all solutions including the complex conjugates:

From

 z^{3}+pz+q=0

 With:

x=z-\frac{b}{3a}

 

First case: when p<0

Let’s calculate \theta and \phi

\sin \theta=-\frac{2p}{3q}\sqrt{-\frac{p}{3}}

Now:

\tan \phi=\sqrt[3]{\tan (\frac{\theta}{2})}

The z values:

\begin{cases}z_{1}=-2\sqrt{-\frac{p}{3}}\frac{1}{\sin (2\phi)}\\z_{2}=\sqrt{-\frac{p}{3}}\frac{1}{\sin (2\phi)}-i\frac{\sqrt{-p}}{\tan (2\phi)}\\z_{3}=\sqrt{-\frac{p}{3}}\frac{1}{\sin (2\phi)}+i\frac{\sqrt{-p}}{\tan (2\phi)}\end{cases}

For x values we just apply x=z-\frac{b}{3a}

\begin{cases}x_{1}=-2\sqrt{-\frac{p}{3}}\frac{1}{\sin (2\phi)}-\frac{b}{3a}\\x_{2}=\sqrt{-\frac{p}{3}}\frac{1}{\sin (2\phi)}-\frac{b}{3a}-i\frac{\sqrt{-p}}{\tan (2\phi)}\\x_{3}=\sqrt{-\frac{p}{3}}\frac{1}{\sin (2\phi)}-\frac{b}{3a}+i\frac{\sqrt{-p}}{\tan (2\phi)}\end{cases}

Second case: when p>0

Let’s calculate \theta and \phi

\tan \theta=\frac{2p}{3q}\sqrt{\frac{p}{3}}

Now:

\tan \phi=\sqrt[3]{\tan (\frac{\theta}{2})}

The z values:

\begin{cases}z_{1}=-2\sqrt{\frac{p}{3}}\frac{1}{\tan (2\phi)}\\z_{2}=\sqrt{\frac{p}{3}}\frac{1}{\tan (2\phi)}-i\frac{\sqrt{p}}{\sin (2\phi)}\\z_{3}=\sqrt{\frac{p}{3}}\frac{1}{\tan (2\phi)}+i\frac{\sqrt{p}}{\sin (2\phi)}\end{cases}

For x values we just apply x=z-\frac{b}{3a}

\begin{cases}x_{1}=-2\sqrt{\frac{p}{3}}\frac{1}{\tan (2\phi)}-\frac{b}{3a}\\x_{2}=\sqrt{\frac{p}{3}}\frac{1}{\tan (2\phi)}-\frac{b}{3a}-i\frac{\sqrt{p}}{\sin (2\phi)}\\x_{3}=\sqrt{\frac{p}{3}}\frac{1}{\tan (2\phi)}-\frac{b}{3a}+i\frac{\sqrt{p}}{\sin (2\phi)}\end{cases}

 

Example 1:

Find the solutions of the following equation:

10x^{3}+37x^{2}-126x+72=0

 

Solution:

Instead of using multiple tries between 72 and 10 and their factors, we are going to use the methods learned here.

To avoid big numbers, let’s divide the function by 10.

We get

x^{3}+3.7x^{2}-12.6x+7.2=0

We have the following coefficients:

a=1

b=3.7

c=-12.6

d=7.2

Let’s calculate p and q

x=z-\frac{b}{3a}

x=z-\frac{3.7}{3}

 

p=\frac{3ac-b^2}{3a^2}

p=\frac{3\times 1 \times (-12.6)-3.7^{2}}{3\times 1}

p=-\frac{51.49}{3}

 

q=\frac{27a^{2}d-9abc+2b^{3}}{27a^{3}}

q=\frac{27\times 1 \times 7.2-9\times 1 \times 3.7 \times (-12.6)+2\times (3.7)^3}{27 \times 1}

q=\frac{715.286}{27}

Both values were left at their fractions forms to avoid accuracy loss.

Now:

\Delta=\frac{q^{2}}{4}+\frac{p^{3}}{27}

 \Delta=\frac{(\frac{715.286}{27})^{2}}{4}+\frac{(\frac{-51.49}{3})^{3}}{27}

\Delta \approx -11.8

We are in the case where \Delta<0

We call our method to get the 3 real roots:

\cos (3\theta)=\frac{3q}{2p}\sqrt{-\frac{3}{p}}

\cos (3\theta)=\frac{3\times 715.286\times 3}{-51.49\times 2\times 27}\sqrt{-\frac{3\times 3}{-51.49}}

\cos (3\theta)=-0.9679777787\Leftrightarrow (3\theta)=165.46111825 in degrees

\frac{\phi}{3}=55.15372749

\frac{\phi}{3}+120=175.15372749

\frac{\phi}{3}+240=295.15372749

The solutions:

x_{1}=2\sqrt{-\frac{p}{3}}\cdot \cos (\frac{\phi}{3})-\frac{b}{3a}

x_1=2\sqrt{-\frac{-51.49}{9}}\cos (55.15372749)-\frac{3.7}{3}

x_1=1.5

x_{2}=2\sqrt{-\frac{p}{3}}\cdot \cos (\frac{\phi+2\pi}{3})-\frac{b}{3a}

x_2=2\sqrt{-\frac{-51.49}{9}}\cos (175.15372749)-\frac{3.7}{3}

x_2=-6

x_{3}=2\sqrt{-\frac{p}{3}}\cdot \cos (\frac{\phi+4\pi}{3})-\frac{b}{3a}

x_3=2\sqrt{-\frac{-51.49}{9}}\cos (295.15372749)-\frac{3.7}{3}

x_3=0.8

 

Finally the solutions are:

Answer: \frac{3}{2}, -6 and \frac{4}{5}

 

 

Example 2:

Find the solutions of the following equation:

50x^{3}-15x^{2}-12x+4=0

 

Solution:

Instead of using multiple tries between 4 and 50 and their factors, we are going to use the methods learned here.

To avoid big numbers, let’s divide the function by 50.

In future exercises, we’ll use simplest methods.

We get:

x^{3}-0.3x^{2}-0.24x+0.08=0

We have the following coefficients:

a=1

b=-0.3

c=-0.24

d=0.08

Let’s calculate p and q

x=z-\frac{b}{3a}

x=z+\frac{0.3}{3}=z+0.1

We plug in:

x^{3}-0.3x^{2}-0.24x+0.08=0

(z+0.1)^{3}-0.3(z+0.1)^{2}-0.24(z+0.1)+0.08=0

z^{3}+0.3z^{2}+0.03z+0.001-0.3z^{2}-0.06z-0.003-0.24z-0.024+0.08=0

The exponent z^{2} vanishes

z^{3}+(0.03-0.06-0.24)z+0.001-0.003-0.024+0.08=0

z^{3}-0.27z+0.054=0

Here:

p=-0.27

q=0.054

Let’s check on \Delta

\Delta=\frac{q^{2}}{4}+\frac{p^{3}}{27}

 \Delta=\frac{(0.054)^{2}}{4}+\frac{(0.27)^{3}}{27}

\Delta =0.000729-0.00729=0

We are in the case where \Delta=0

We get the following solutions:

\begin{cases}z_{1}=\frac{3q}{p}\\z_{2}=z_{3}=-\frac{3q}{2p} \end{cases}

\begin{cases}z_{1}=\frac{3\times 0.054}{-0.27}\\z_{2}=z_{3}=-\frac{3\times 0.054}{2\times (-0.27)} \end{cases}

\begin{cases}z_{1}=-\frac{54}{90}\\z_{2}=z_{3}=\frac{3\times 0.027}{0.27} \end{cases}

\begin{cases}z_{1}=-\frac{6}{10} \Rightarrow x=-\frac{6}{10}+\frac{1}{10}\\z_{2}=z_{3}=\frac{3}{10} \Rightarrow x=\frac{3}{10}+\frac{1}{10}\end{cases}

\begin{cases}x_{1}=-\frac{5}{10}\\x_{2}=x_{3}=\frac{4}{10}\end{cases}

Finally the solutions are:

Answer: \{-\frac{1}{2}, \frac{2}{5} and \frac{2}{5}\}

 

Example 3:

Find the solutions of the following equation:

x^{3}+x^{2}-4x+6=0

Solution:

Instead of using multiple tries between 6 and 1 and their factors, we are going to use the methods learned here.

In future exercises, we’ll use simplest methods.

We have the following coefficients:

a=1

b=1

c=-4

d=6

Let’s calculate p and q

x=z-\frac{b}{3a}

x=z-\frac{1}{3}

We plug in:

x^{3}+x^{2}-4x+6=0

(z-\frac{1}{3})^{3}+(z-\frac{1}{3})^{2}-4(z-\frac{1}{3})+6=0

z^{3}-3z^{2}\cdot \frac{1}{3}+3z\cdot (\frac{1}{3})^{2}-(\frac{1}{3})^{3}+z^{2}-\frac{2z}{3}+(\frac{1}{3})^{2}-4z+\frac{4}{3}+6=0

z^{3}+(\frac{1}{3}-\frac{2}{3}-\frac{12}{3})z-\frac{1}{27}+\frac{1}{9}+\frac{22}{3}=0

z^{3}+(\frac{1}{3}-\frac{2}{3}-\frac{12}{3})z-\frac{1}{27}+\frac{3}{27}+\frac{192}{27}=0

z^{3}-\frac{13}{3}z+\frac{200}{27}=0

p=-\frac{13}{3}<0

q=\frac{200}{27}

\Delta=\frac{q^{2}}{4}+\frac{p^{3}}{27}

\Delta=(\frac{200}{27})^{2}\cdot \frac{1}{4}+(\frac{13}{3})^{3}\cdot \frac{1}{27}

\Delta \approx 10.7>0

If \Delta>0 , the equation has one real root and 2 complex roots

p=-\frac{13}{3}<0

Let’s calculate \theta and \phi

\sin \theta=-\frac{2p}{3q}\sqrt{-\frac{p}{3}}

\sin \theta=-\frac{2\times (-13) \times 27}{3 \times 3 \times 200}\sqrt{-\frac{(-13)}{3\times 3}}

\sin \theta=0.468721666 \Leftarrow \theta=27.95134905

Now:

\tan \phi=\sqrt[3]{\tan (\frac{\theta}{2})}

\tan \phi=\sqrt[3]{\tan(\frac{27.95134905}{2})}

\tan \phi=0.629015931 \Leftarrow \phi=32.17054686

The z values:

\begin{cases}z_{1}=-2\sqrt{-\frac{p}{3}}\frac{1}{\sin (2\phi)}\\z_{2}=\sqrt{-\frac{p}{3}}\frac{1}{\sin (2\phi)}-i\frac{\sqrt{-p}}{\tan (2\phi)}\\z_{3}=\sqrt{-\frac{p}{3}}\frac{1}{\sin (2\phi)}+i\frac{\sqrt{-p}}{\tan (2\phi)}\end{cases}

For the x values:

\begin{cases}x_{1}=-2\sqrt{-\frac{-13}{3\times 3}}\frac{1}{\sin (64.34109373)}-\frac{1}{3}\\x_{2}=\sqrt{-\frac{-13}{3\times 3}}\frac{1}{\sin (64.34109373)}-\frac{1}{3}-i\frac{\sqrt{-\frac{-13}{3}}}{\tan (64.34109373)}\\x_{3}=\sqrt{-\frac{-13}{3\times 3}}\frac{1}{\sin (64.34109373)}-\frac{1}{3}-i\frac{\sqrt{-\frac{-13}{3}}}{\tan (64.34109373)} \end{cases}

We get:

\begin{cases}x_{1}=-3\\x_{2}=1-i\\x_{3}=1+i \end{cases}

Finally the solutions are:

Answer: \{-3, 1-i and 1+i\}

 

 Atlernate methods using division

The following documents show how the division can get the factors, reducing the cubic function to a product that we normally solve:

 

Example 1:

Find the solutions of the following equation:

10x^{3}+37x^{2}-126x+72=0

Solution:

[accordion hideSpeed=”300″ showSpeed=”400″][accordion hideSpeed=”300″ showSpeed=”400″]

[item title=”Click here to see the solution of: 10x^{3}+37x^{2}-126x+72=0“]

{aridoc engine=”pdfjs” width=”100%” height=”800″}images/Alternate2.pdf{/aridoc}

[/item] [/accordion]

 

Example 2:

Find the solutions of the following equation:

50x^{3}-15x^{2}-12x+4=0

Solution:

[accordion hideSpeed=”300″ showSpeed=”400″][accordion hideSpeed=”300″ showSpeed=”400″]

[item title=”Click here to see the solution of:50x^{3}-15x^{2}-12x+4=0“]

{aridoc engine=”pdfjs” width=”100%” height=”800″}images/Alternate1.pdf{/aridoc}

[/item] [/accordion]

 

Example 3:

Find the solutions of the following equation:

x^{3}+x^{2}-4x+6=0

Solution:

[accordion hideSpeed=”300″ showSpeed=”400″][accordion hideSpeed=”300″ showSpeed=”400″]

[item title=”Click here to see the solution of:x^{3}+x^{2}-4x+6=0“]

{aridoc engine=”pdfjs” width=”100%” height=”800″}images/Alternate3.pdf{/aridoc}

[/item] [/accordion]

 

HELPER FUNCTION

Open this using the right box with pointing arrow and select ‘OPEN WITH GOOGLE SHEETS’ to solve more cubic equations.

 ax^{3}+bx^{2}+cx+d=0

{aridoc engine=”google” width=”100%” height=”800″}images/cubic1.xlsx{/aridoc}

Be the first to comment

Leave a Reply

Your email address will not be published.


*