So I want to calculate a distribution function from a density function.
The density function is as follows:
f(w,z)=\frac{2w}{z}\text{ if 0<wz<1, 0<w<z}
To find the distribution, I tried integrating using the following expression:
Assuming[0 < y && 0 < w < 1 && 0<z, Integrate[(2 y/x) Boole[0< y < x < 1/y], {y, 0, w}, {x, 0, z}]]
A friend of mine with the same assignment told me he was getting a different result, so I tried tweaking the expression.
To my surprise, an expression which I think is equivalent gives me a very different result. This is the expression in question:
That’s basic Mathematica syntax. If I write “xy”, without space, this is interpreted as one single symbol, not as the implicit product of two distinct symbols “x” and “y”. It is a very common pitfall for beginners, and occasionally for expert users too.
Mathematica is a language implementation and, as such, follows certain rules regarding parsing of symbols (which can be multiletter). If you had prior experience with Wolfram|Alpha, that uses various heuristics to decide when to regard an entity such as ‘xy’ as a single thing, or as “x times y”. That is to say, it’s more of a mind reader.