Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I want to find the second root of this function

-(BesselJ[104, 31.0155 k]/HankelH1[104, 21.39 k] - (
 0.689655 (BesselJ[103, 31.0155 k] - BesselJ[105, 31.0155 k]))/(
 HankelH1[103, 21.39 k] - HankelH1[105, 21.39 k])) (HankelH1[104, 
 29. k]/BesselJ[104, 26.6 k] - (
0.917241 (HankelH1[103, 29. k] - HankelH1[105, 29. k]))/(
BesselJ[103, 26.6 k] - BesselJ[105, 26.6 k])) + (BesselJ[104, 
 29. k]/BesselJ[104, 26.6 k] - (
0.917241 (BesselJ[103, 29. k] - BesselJ[105, 29. k]))/(
BesselJ[103, 26.6 k] - BesselJ[105, 26.6 k])) (HankelH1[104, 
 31.0155 k]/HankelH1[104, 21.39 k] - (
0.689655 (HankelH1[103, 31.0155 k] - HankelH1[105, 31.0155 k]))/(
HankelH1[103, 21.39 k] - HankelH1[105, 21.39 k]))

and I use For loop for change one of the parameter in the equation when I solve the equation with FindRoot command and the starting point 4.084786794160497- 3.905972953981369*^-8 I

but findroot command find the root that is not near the starting point and the root is 3.65756 -4.02461*10^-14 I

please help me.

Thanks for your answers additional information

I have a program that I should find the root of a function in every loop and the step of change one of my parameter is very small the step before this step mathematica can find the right answer but after a special step mathematica can't find the answer and the algorithm of finding root is finding new root with using previous root as the starting point I think it is logical way to find root but mathematica can't find root. In which way I can find the root near the root that I want? after this root mathematica find the first root istead the second root.

thanks

share|improve this question
1  
Do you really need machine precission numbers instead of exact arguments? If so, why such parameters e.g. $31.0155, 21.39,\ldots$, what do they mean? Why is Mathematica the best since you don't know how to find that root. By the way Mathematica is my favourite software. I'd like to understand your reasoning. –  Artes Feb 1 at 19:32
1  
Also - what is the relationship between the parameter and FindRoot/the starting point ? Please, provide additional information. –  Sektor Feb 1 at 20:00
    
There doesn't appear to be a root near 4.08 (from plotting Abs[% /. k -> x + I y]). –  Michael E2 Feb 1 at 20:57
add comment

1 Answer

If the roots are either very small or very large, it's better to first normalize your equation. Otherwise the accuracy will be decreased.

share|improve this answer
    
Please, provide additional details about the specific problem; that's too vague; –  Sektor Feb 2 at 13:35
    
what is your mean? in which way I can normalize a function? –  Mathematica is the best Feb 2 at 16:38
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.