We need to plot the real and imaginary parts of a complex function $k(\omega)$, and cannot find a good way to do this without using "ad hoc tricks."


  • $k$ is a complex-valued function where both the real and the imaginary parts are functions of $\omega$ so that $k(\omega) = \beta(\omega) - i\alpha(\omega)$, where $i$ is the imaginary unit.
  • $\omega$ is a real-valued positive number.
  • $\alpha(\omega) = -Im(k)$ is a positive real-valued function of the real variable $\omega$.
  • $\beta(\omega) = Re(k)$ is a positive real-valued function of the real variable $\omega$.
  • $a$ is a real constant number, $0<a<1$
  • $A$ and $B$ are real constants.

The relation between $k$ and $\omega$

$[k(\omega)]^2 +A[k(\omega)]^{a+1} - B\omega^2 = 0$. $\qquad\quad$ (1)

So, what we really would appreciate help on is to find some water-proof method to plot $\beta = Re(k)$ and $\alpha = -Im(k)$ as functions of $\omega$ given the constants $a,A,B$ and the equation (1) above. Eq. (1) is a special kind of dispersion relation.

Any kind of help is greatly appreciated, we have spent too much time trying to figure this out already!

  • $\begingroup$ why not just solve this equation numerically and plot the real and imaginary parts of $k$ versus $\omega$? $\endgroup$ – Carlo Beenakker Sep 16 '13 at 14:33
  • $\begingroup$ Thanks for your input Carlo! Solving it numerically is fully acceptable for us also, and this is what we have tried however without full success so far. I think the problem that we have not been able to circument in our naïve approach using the "fminsearch" Matlab function to numerically solve (1) is that both $\alpha(\omega)$ and $\beta(\omega)$ need to be positive. In addition, taking the power $a+1$ of the complex variable $k$ (that is $k^{a+1}$), is a multi-valued operation. Maybe you have some specific hint regarding ready-built methods to solve such constrained numerical minimalizations? $\endgroup$ – Petern Sep 16 '13 at 14:52
  • 1
    $\begingroup$ Although I acknowledge that this specific question is not math-research level, I'd like to point out that the method (say, trick) I mention in my answer can apply to a wide range of equations, and may be easily overlooked even by professional mathematicians. $\endgroup$ – Loïc Teyssier Sep 16 '13 at 16:26

You can transform (1) into the equation of the flow of a 2-dimensional real vector field with time $\omega$ (just differentiate it with respect to $\omega$). Then you plug the resulting system into any solver of differential equation. If $\omega$ is to take complex values then matters can get harder, but as I understand your problem the method I suggest should work flawlessly.

EDIT: to take care of the problem of multivaluedness you mention, look for a vector field whose components are the modulus $\rho$ and the argument $\theta$ of $k$ so that you obtain a relation of the form

$\dot{\rho}+i\rho\dot{\theta}=\frac{2B\omega \exp(-2i\theta)}{2\rho+A(a+1)\rho^a\exp(i(a-1)\theta))}$

where you don't see the problem anymore. Then compute the real- and imaginary-part of the right-hand side of the equation. Finding an initial condition at $\omega=0$ is no problem.

  • $\begingroup$ Thank you Loïc for the suggestion! We will make an attempt to user your proposed method. $\endgroup$ – Petern Sep 17 '13 at 11:18
  • $\begingroup$ @Petern: if my answer was any help, you might consider voting it up and accepting it... $\endgroup$ – Loïc Teyssier Sep 24 '13 at 8:34

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