I specify a function in terms of an integral and then try to evaluate it with Simplify
. However, the answer is not really simplified to what it should be.
assumptions := {l > 0, Element[NN, Integers], NN > 0, b > 0, a > 0,
l > b, a > l, α > 0, β > 0};
Φ = Function[x,
If[x < l,
(NN*π*α*b^2 *(l^2 ArcCos[x/l] - x Sqrt[l^2 - x^2]))/(a^2 * β), 0]
];
Px = Function[x, If[0 <= x <= a, 1/a, 0]];
FΦ = Function[φ, Simplify[Integrate[If[Φ[x] <= φ, 1, 0] Px[x], {x, 0, a}],
assumptions]];
Simplify[FΦ[0], assumptions]
However, it is easy to see that it should be reduced as first
$\frac{1}{a} \int_0^a \text{If}\left[\text{If}\left[x<l,\frac{\text{NN} \pi \alpha b^2 \left(l^2 \text{ArcCos}\left[\frac{x}{l}\right]-x \sqrt{l^2-x^2}\right)}{a^2 \beta },0\right]\leq 0,1,0\right] \, dx$
and then $\frac{1}{a} \int_0^l \text{If}\left[\frac{\text{NN} \pi \alpha b^2 \left(l^2 \text{ArcCos}\left[\frac{x}{l}\right]-x \sqrt{l^2-x^2}\right)}{a^2 \beta }\leq 0,1,0\right] \, dx + \frac{1}{a} \int_l^a \text{If}\left[ 0 \leq 0,1,0\right] \, dx$
to $ \frac{1}{a} \int_0^l 0 \, dx + \frac{1}{a} \int_l^a 1 \, dx$ $=\frac{a-l}{a}$.
How can I get Mathematica to simplify it correctly?