Find very small zeros of a polynomial
1 view (last 30 days)
Show older comments
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
Accepted Answer
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.
0 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!