I am using root function to solve a function for different variables (variables are vectors) but some of these values don’t converge as there is no solution. How can I skip these values that don’t converge and make a table for those values and solve the rest? I have attached the MathCAD zip file.
As we can see the approach using “root” by providing the interval 0s to 0.15s does not always give us the first of all zeros (see n=1).
If you intended to calculate the first occurrence you might be better off with using the “root” function by providing a guess value (here I used t=0s as a guess. As we don’t k now the algorithm used by “root” there is no guarantee that doing so will always give us the first positive root, but in case of your function this seems to be the case and we even also get a solution for n=4 (which is way above the 0.1s you had chosen for the upper limit in your plot.