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'm searching for roots of complex function $$ 2\imath q \ln(-2\imath k)+\imath\pi-2\imath \Im(\ln(\Gamma(1+2\imath q)))+\ln(\frac{\Gamma(1+\imath q-\imath q x/k)}{\Gamma(1-\imath q-\imath q x/k)})+\ln(\frac{\sqrt{-x+1}-\sqrt{-x-1}}{\sqrt{-x+1}+\sqrt{-x-1}}) $$ where $k=\sqrt{(-x+1)(-x-1)}$; $x$ is complex number with $\Re(x)<-1$ and $\Im(x)>0$ and $q$ is real and positive parameter. If a change a little bit starting values of $x$ in FindRoot function, result changes extremely. Please, can you tell me how to fix the result and what is the better way to find complex roots of such equations.

Code:

2 I*q*Log[-2*I*Sqrt[(-x + 1) (-x - 1)]] + I*\[Pi] -  2*I*Arg[
Gamma[1 + 2*I*q]] + Log[Gamma[1 + I*q - I*q*x/Sqrt[(-x + 1) (-x - 1)]]] - 
Log[Gamma[1 - I*q - I*q*x/Sqrt[(-x + 1) (-x - 1)]]] + Log[Sqrt[-x + 1] - 
Sqrt[-x - 1]] - Log[Sqrt[-x + 1] + Sqrt[-x - 1]]
share|improve this question
6  
Could you post some code? The function and the FindRoot? –  Öskå May 31 '13 at 9:10
    
Find the code above –  Valeriy May 31 '13 at 19:16
    
What's the actual value of q? –  Simon Woods May 31 '13 at 20:21
    
You seem to have a highly oscillatory function near x == -1, for q == 0.1, 1., 10.. Try plotting it (ContourPlot[Abs[fn[x]],...]). –  Michael E2 May 31 '13 at 20:32
2  
You are aware that LogGamma[] is built-in? –  J. M. Jun 1 '13 at 4:09

1 Answer 1

one of the best way to finding the roots of complex functions is Davidenko's Method of Complex Root Search in this way you can find the exact root of complex functions by changing your equation into a differential equation. Here is a sample of this method you can use this way.

(*Davidenko's Method of Complex Root Search*)
Clear[\[Gamma]]
Pm = D[P, \[Gamma]];
Intv = .0045 + .0041 I;
\[Gamma] = a[t] + I *b[t];
g = Re[P];
h = Im[P];
gb = Re[Pm];
ga = -Im[Pm];
Pg = (gb)^2 + (ga)^2;
tf = 20
sol = NDSolve[{a'[t] == ((-gb*g + ga*h)/Pg), 
   b'[t] == ((-ga*g + gb*h)/Pg), a[0] == Re[Intv], 
   b[0] == Im[Intv]}, {b, a}, {t, 0, tf}]
Print[Plot[Evaluate[{b[t], a[t]} /. sol], {t, 0, tf}]]
a[tf] /. sol
b[tf] /. sol

In this method P is your equation that should be equal to zero and Gamma is the variable of your equation and Intv is the initial value that you want to find the root near.

share|improve this answer
    
I note that you split the equation into real and imaginary parts and solve separately. Mathematica can solve complex differential equations and thus this aspect of your approach may be unnecessary. I keep the equation complex. Are there advantages in splitting the solution procedure? –  Hugh Mar 4 at 10:10
1  
Can you give a good reference for this method where I can find its description? –  bcp Apr 3 at 11:21

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.