# Numerical method to find the roots of the derivative of $y = (x^3 - 4x) \cdot \frac{\sqrt{13+4x^2}}{2}$ (Newton's Method)

I am working on an Optimization problem and I would like to suggest finding the solution (i.e. the extrema) of the function below using two methods: the first one being calculating the derivative and making it equal to zero and the second one using a numerical method.

The equation of the model is shown below:

\begin{align*} y = (x^3 - 4x) \cdot \frac{\sqrt{13+4x^2}}{2} \end{align*}

(the derivative being the following)

\begin{align*} y' = \frac{16x^4 +7x^2 - 52}{2 \sqrt{13+4x^2}} \end{align*}

I have two questions about using it:

• Based on some research, I found it is possible to use Newton's Method on functions that are not polynomials. Is that correct?
• Is the Newton's Method the most adequate in this case?
• Have you got the first derivative? – Dr. Sonnhard Graubner Oct 31 '18 at 10:28
• @Dr.SonnhardGraubner yes, that was calculated algebraically (regular product + chain rules) – bru1987 Oct 31 '18 at 10:29
• Then Show us your derivative, i'm not sure that you will Need Newton – Dr. Sonnhard Graubner Oct 31 '18 at 10:30
• @Dr.SonnhardGraubner there you go. One thing: I deliberately want to use a numerical method for this (even if making the derivative equal to zero was easy) – bru1987 Oct 31 '18 at 10:34
• Check your result – Dr. Sonnhard Graubner Oct 31 '18 at 10:35

We want to find the extrema of the function

\begin{align*} y(x) = (x^3 - 4x) \cdot \frac{\sqrt{13+4x^2}}{2} \end{align*}

One approach is to use Newton's Method on $$y'(x)$$, where

$$y'(x) = \frac{16 x^4+7 x^2-52}{2 \sqrt{4 x^2+13}}$$

We start by plotting $$y(x)$$ and see two extrema to try and find using Newton's

The iteration formula for Newton's Method is given by

$$x_{n+1} = x_n-\dfrac {f(x_n)}{f'(x_n)} = x_n - \dfrac{16x_n^4 + 7x_n^2 - 52}{2 \sqrt{4 x_n^2 + 13}\left( \dfrac{64 x_n^3 + 14 x_n}{2 \sqrt{4 x_n^2 +13}} - \dfrac{2 x_n (16 x_n^4 + 7 x_n^2 - 52)}{(4 x_n^2 + 13)^{3/2}}\right) }$$

This can be simplified to remove the square roots and nasty divisions as

$$x_{n+1} = x_n - \dfrac{\left(4 x^2+13\right) \left(16 x^4+7 x^2-52\right)}{2 x \left(96 x^4+430 x^2+195\right)}$$

If we initialize Newton's method using $$x_0 = -1.4$$, we arrive at $$x_4 = -1.26382$$ in $$4$$ steps.

If we initialize Newton's method using $$x_0 = 1.4$$, we arrive at $$x_4 = 1.26382$$ in $$4$$ steps.

Update

There is an easier approach to find where $$y'(x) = 0$$, we need only find the roots of the numerator of $$y'(x)$$, so the Newton iteration can be simplified to

$$x_{n + 1} = x_n - \dfrac{16 x_n^4 + 7 x_n^2 - 52}{64 x_n^3 + 14 x_n}$$

This gives the same results as before. Also, comparing this with the above iteration, the quadratic term $$(4 x^2 + 13)$$, leads to imaginary roots that we don't care about.

Lastly, it is worth noting that you can use a simple transform, $$t = x^2$$, on the iterations' numerator to get $$16 t^2 + 7 t - 52 = 0$$, and then solve a quadratic formula and eliminate Newton's Method altogether!

• NB: you can simplify the denominator of the equation so that you don't need to compute square roots. – Jam Oct 31 '18 at 13:20
• @Jam: Good point. I added your comment to the answer, but also added an easier approach using Newton's and a way to eliminate Newton's altogether. – Moo Oct 31 '18 at 17:36

Hint: I have got this here $$f'(x)={\frac {6\,{x}^{3}-16\,{x}^{2}+13\,x-26}{\sqrt {4\,{x}^{2}+13}}}$$

• I just fixed my derivative (double checked on Wolfram). Could you please help me with the questions posted? – bru1987 Oct 31 '18 at 11:02
• What want you to solve now? – Dr. Sonnhard Graubner Oct 31 '18 at 11:05
• $f' ( x ) = 0$ with newton method – Surb Oct 31 '18 at 11:06
• – Dr. Sonnhard Graubner Oct 31 '18 at 11:08