# How to determine the function of this "black-box"?

Imagine a black box which accepts a digital input signal which is a pure sine wave and outputs the area between this input signal and some constant data set over a sample window.

Given the input and output signals, is it possible to determine the sample data set?

Edit: Here is how the box calculates area between two data points...

    private double areaBetween(double a, double b)
{
if (Math.Sign(a) == Math.Sign(b))
{
if (Math.Abs(a) > Math.Abs(b))
return a - b;
else
return b - a;
}
else
{
return a + b;
}
}

• It appears you are outputting the signed area. In the figure, it looks like the areas above and below the green curve are equal and the output is zero. Is that correct? Also, am I given the length of the sample window? Mar 7, 2013 at 21:32
• If it is possible to determine without knowing the window length, this would be preferable. Mar 7, 2013 at 21:38
• Area which lies above the x-axis is considered positive, and negative if it lies below. Mar 8, 2013 at 1:33

The blue integral is constant, and is the only way the sample signal influences your output. So all you can learn about the blue signal from observing the black-box relation between the green and red signals is what the average value of the blue signal is -- that is, in this case, $0$.