I want to determine the relationship that must exist between the $x_i$ and $y_i$ such that
$$ \frac{\partial}{\partial\theta} \prod_{i=1}^n \frac{f(x_i,\theta)}{f(y_i,\theta)} = 0, $$
where
$$ f(x,\theta) = \frac{e^{-(\theta - x)}}{(1+e^{-(\theta - x)})^2}, \;\; \forall x \in {\mathbb R}, \theta \in {\mathbb R} $$
Clarification: what I'm trying to find is a condition on the $x_i$ and $y_i$ such that the derivative above (viewed as a function of $\theta$) is zero for all $\theta$ only if this condition holds. Clearly, this derivative is zero for all $\theta$ if, $\forall i\in\{1,\dots,n\}$, the condition $x_i = y_i$ holds, since then the product in the derivative expression above is identically 1. But this condition is not necessary: the derivative will be identically zero also if there is an $n$-permutation $\sigma$ such that $\forall i,\,x_i = y_{\sigma(i)}$. My problem is to prove that the derivative is identically zero (i.e. it is zero for all $\theta$) only if such a $\sigma$ exists, for given $x_i$ and $y_i$.
So, hoping to have a look at the derivative above, I input this into Mathematica:
Block[{f, θ, x, y, i, n},
f[x_][θ_] := E^(-x + θ)/(1 + E^(-x + θ))^2;
D[Product[f[x[i]][θ]/f[y[i]][θ], {i, n}], θ]
]
...but Mathematically basically spits back the last formula (after replacing the various expressions in f
):
D[Product[(E^(-x[i] + y[i])*(1 + E^(θ - y[i]))^2)/(1 + E^(θ - x[i]))^2, {i, n}], θ]
If instead of using a symbolic product (with an unspecified number of terms) I attempt the same thing with a product of three terms, namely
(f[x1][θ]/f[y1][θ]) (f[x2][θ]/f[y2][θ]) (f[x3][θ]/f[y3][θ])
...Mathematica does compute the derivative (though the resulting expression is hairy, and I can't extract any insight from it). So my first question is
How can I get Mathematica to produce the expression for the derivative for the general case?
(After all, the derivative of an $n$-term product has a form that Mathematica should be able to express relatively easily.)
In any case, the results I got for a three-term product were not encouraging. Of course, I really don't care for the derivative per se, but rather, what I'm after are the conditions on the $x_i$ and $y_i$ that make this derivative vanish.
Is there a way that Mathematica can show me the relationship between the $x_i$ and $y_i$ when this derivative is 0?