0
$\begingroup$

Suppose that I have a function:

$f(x,U) = x + \log(U)$

where $x$ and $U$ can be complex numbers. I take $f(x,U)$ and evaluate it a number of times for different $x$ and $U$.

Since $U$ can be complex, I take $\log(U)$ as the complex logarithm (Wikipedia Link). For example, $\log(-1) = 3.1416i$.

Now suppose that for all of my function evaluations, $x = 0$ so:

$f(x=0,U) =\log(U)$

But given only $f(x,U)$, and not knowing $x$ and $U$, is there a way to use curve-fitting or some other method to determine that $f(x,U) = \log(U)$ and $x = 0$?

Can numerical methods be used to distinguish between $f(x,U) = x + \log(U)$ and $f(x=0,U) =\log(U)$, and how would I deal with the real and complex parts?

I assume that $\log(U) \neq 0$ for all function evaluations, and that $x \neq \log(P)$, where $P$ is some complex number.

I've found a similar question on Stack Overflow (link), but I am uncertain as to whether something from that question can be used to solve this problem.

Is this problem less of an issue when considered with the complex set of numbers in lieu of the reals?

2 Answers 2

1

If you have a function evaluation where $f(x,U)=0$, then $x \neq 0$ since $log(U) \neq 0$ for all function evaluations.

Otherwise, you'll have to rely on statistical methods, and assume $U$ is randomly distributed. You can represent $U$ as $a+bi$, where $a$ and $b$ are normally distributed, if you have some idea what the means and variances of $a$ and $b$ could be.

But since that involves four parameters you might have to fudge (I'm assuming you know as little as possible about the distribution of $U$), representing $U$ in polar form ($r e^{i\theta}$) could be easier: assume $\theta$ is uniformly distributed between $0$ and $2\pi$, and $r$ follows an exponential distribution. Then you'll just need to come up with a guess for what the mean of $r$ could be (the $\lambda$ parameter).

Regardless of how you generate your $U$s, evaluate $f$ on them assuming $x=0$. Create a histogram of the results, and compare this to a histogram of the function evaluations for the unknown $U$s and $x$s.

  • 0
    Thank you very much for your answer! I don't know very much about the distribution of $U$. The idea of $r$ following an exponential distribution is very neat. Questions: (1) Do I generate an exponential distribution using pseudo-random numbers? (2) How might I guess the mean of $r$ using $f(x,U)$? (3) Is there a numerical method that I can use to compare the histograms, perhaps using a least-squares technique? (4) Is there a name for the branch of statistics or a reference book for similar techniques? (5) How do I assess accuracy of histogram comparison?2012-08-02
  • 0
    If $f(x,U) = 0$, then does this imply that $x = -\log(U)$ and that the real and complex parts of $f(x,U)$ are zero as well?2012-08-02
  • 1
    (1) Yes, psuedo-random should be good enough for this purpose; specifically, you can generate exponential random numbers with mean $\lambda$ by taking the log of a uniform random variable between $0$ and $e^{1-\lambda}$. (2) You could vary $r$ and go by whichever produces the closest histogram, but other than that, I can't think of anything. (3, 5) Use [a chi square test](http://help.ixellence.com/dataplore/dp_manual226.html); note, the histogram will be 2-dimensional because the values are complex. (4) Don't know.2012-08-02
  • 1
    For the second comment, yes to both parts.2012-08-02
  • 0
    Thank you! I will try this and then come back to this question. I am also wondering: Why do you choose $\theta$ as being uniformly distributed between $0$ and $2\pi$ and $r$ as an exponential distribution? Is there some theoretical reason why this would be a good choice?2012-08-02
  • 0
    Could I assume that the mean $\lambda$ of $r$ is the same as the mean of $f(x,U)$? What would make this a good assumption?2012-08-02
  • 1
    The uniform and exponential distributions are the [maximum entropy distributions](http://en.wikipedia.org/wiki/Maximum_entropy_probability_distribution#Examples_of_maximum_entropy_distributions) for their support: $\theta$ is bounded by $0$ and $2\pi$ since it's an angle, and $r$ is positive, as per [polar form](http://en.wikipedia.org/wiki/Polar_form#Polar_form). So in the absence of any information other than their support, those are the distributions that have least amount of structure.2012-08-02
  • 1
    As for assuming the mean to be the same as $f(x,U)$s, that'll most likely be wrong. Other than being a complex number, when $r$ must be a positive real, applying an arbitrary function to a random variable doesn't preserve the mean. For example, take $x \in [0,1]$. $x$ has a mean of $0.5$, but $log(x)$ has a mean of $1$.2012-08-02
  • 0
    Thanks, valtron. That's very insightful. If I obtain a number of values of $U$, how could I choose alternate values for $r$ and $\theta$? In my application, $U$ can be determined experimentally. So if I have a sequence (such as a time series) of $U$, what could I do to choose more appropriate values?2012-08-02
  • 0
    Maybe I'm misunderstanding your question, but originally you said that the values of the function were known, but the arguments were not. Is this a different problem?2012-08-02
  • 0
    Oh, I'm sorry for the confusion. The original question holds: the values of the function are known, but the arguments are not. The comment above should read "might be determined experimentally." If and only if I understand something about the distribution (which I do not at this time), how would I choose $r$ and $\theta$? I apologize for any confusion, and I'm trying to understand the problem in a number of different ways.2012-08-02
  • 1
    There is no single $r$ or $\theta$ that you would choose. They're two numbers used in the polar representation of a _particular_ $U$, not the entire distribution. You need only estimate $\lambda$ from a set of experimentally-determined $U_1,U_2,...$, which you can do by converting the $U$s to polar form, $r_{1}e^{\theta_1 i}, r_{2}e^{\theta_2 i},...$, and averaging $r_{1},r_{2},...$.2012-08-02
  • 0
    Thank you so much for all of your comments; I have learned a lot from you. And even more, thank you very much for your patience, and for the wonderful solution.2012-08-02
1

Let's first deal with the reals. The range of $\log U$ as $U$ goes through the positive reals is the entire real line. The range of $x+\log U$ for real $x$ and positive real $U$ is the entire real line. It follows that if you are given the outputs and no information about the inputs you can't tell $\log U$ from $x+\log U$.

Now if $U$ can be a complex number, then first you have to tell me what you mean by $\log U$.

EDIT: I take it from your update that you are using the principal branch of the complex logarithm, so the imaginary part of $\log U$ lies between $-\pi$ (exclusive) and $\pi$ (inclusive). That means that if you get an output with an imaginary part outside those bounds, then you know you're getting $x+\log U$ for some $x\ne0$, and you even have some bounds on the imaginary part of $x$. The more outputs you get (with different imaginary parts), the tighter the bounds you get on the imaginary part of $x$.

On the other hand, if every output has imaginary part consistent with being $\log U$ for some $U$ and the principal branch, then you can make no conclusion as to whether or not $x=0$. All you can do is bound the imaginary part of any possible $x$, and you can't say anything about the real part.

  • 0
    Thank you very much for pointing me in the right direction. I've now updated my question above to indicate what I mean by the complex logarithm.2012-08-02
  • 0
    It's interesting to look at the function as bounded on the imaginary part of $x$. Thanks for the edit, Gerry.2012-08-03