Find very small zeros of a polynomial

1 view (last 30 days)
Zero
Zero on 19 Jun 2021
Commented: Zero on 19 Jun 2021
I have to find the zeros of the derivative of this function :
V(r) = a_Constant*( (0.5/r)^12 - (0.5/r)^6);
Then I'd do diff(V(r),r). And finally, do a findzeros of this answer in a specific interval.
The problem is that the answer are so small, that matlab is returning zero for the roots of the derivative. Is there a way of doing this process and to be able to find all the zeros within a specific intervall.
  2 Comments
Jan
Jan on 19 Jun 2021
Edited: Jan on 19 Jun 2021
Please post your code. Currently it is not clear if you do this numerically or symbolically.
How many zeros do you expect? The equation is very simple, so you should finde the solkution with pencil and paper also.
Zero
Zero on 19 Jun 2021
Everything was fine. I was displaying the answers. That was the mistake, the display function do only print 4 decimals. Fortunatly, I decided to see our answer by using the terminal and without the use of a display command. And finally, our zeros were initially correct and not rounded.

Sign in to comment.

Accepted Answer

Matt J
Matt J on 19 Jun 2021
Edited: Matt J on 19 Jun 2021
It would be easier, both numerically and analytically, if you made the change of variables z=-(0.5/r)^6 and find the roots of the derivatives with respect to z instead. It is clear that V will have a zero-derivative point in r if and only if there is a zero-derivative point at the corresponding z. With respect to z, however, V becomes a simple quadratic function,
V(z)=a_Constant*(z^2+z)
and it is very easy to see that it's derivative is zero at z=-1/2. Knowing this, it is very simple to relate the location of the root back to r.

More Answers (0)

Categories

Find more on Chemistry in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!