In my opinion Mathematica should be able to further calculate and simplify the output of G1[...]
.
g[z_, A_, e_, b_] :=
Assuming[A > b/2 && z \[Element] Reals && A \[Element] Reals &&
b > 0 && e >= 0 && b \[Element] Reals && e \[Element] Reals &&
z > A - b/2 + e && z < A + b/2 + e,
PDF[UniformDistribution[{A + e - b/2, A + e + b/2}], z]]
G[z_, A_, e_, b_] :=
Assuming[A > b/2 && z \[Element] Reals && A \[Element] Reals &&
b > 0 && e >= 0 && b \[Element] Reals && e \[Element] Reals &&
z > A - b/2 + e && z < A + b/2 + e,
CDF[UniformDistribution[{A + e - b/2, A + e + b/2}], z]]
H10[A_, b_, y_, s_] :=
Assuming[A > b/2 && y ∈ Reals && A ∈ Reals &&
b > 0 && b ∈ Reals && y < A + 1 + b/2 &&
y > A - b/2 + 1 && s > A - b/2 && s < A + b/2,
G[s, A, 0, b]/G[y, A, 1, b]] // FullSimplify
H11[A_, b_, y_, s_] :=
Assuming[A > b/2 && y ∈ Reals && A ∈ Reals &&
b > 0 && b ∈ Reals && y > A + 1 - b/2 &&
y < A + 1 + b/2 && s > A + 1 - b/2 && s < A + 1 + b/2,
G[s, A, 1, b]/G[y, A, 1, b]] // FullSimplify
G1[A_, b_, y_, p0h_, p0l_, c1_] =
Assuming[A > b/2 && y ∈ Reals && A ∈ Reals &&
b > 0 && f ∈ Reals && e ∈ Reals &&
b ∈ Reals && y > A + 1 - b/2 && y < A + 1 + b/2,
Integrate[g[y, A, 1, b]*1/2 (
p0h*
Integrate[H10[A, b, y, s], {s, A + 0 - b/2, y}] + (1 - p0h)*
Integrate[H11[A, b, y, s], {s, A + 1 - b/2, y}] +
p0l*
Integrate[H10[A, b, y, s], {s, A + 0 - b/2, y}] + (1 - p0l)*
Integrate[H11[A, b, y, s], {s, A + 1 - b/2, y}]), {y,
A + 1 - b/2, A + 1 + b/2}] - c1] // FullSimplify
I think I clearly told Mathematica in G1[...]
that A<b/2 && b>0
, but somehow it did not use it in FullSimplify
.
In my opinion Mathematica should give me a closed form expression without any cases inside.
Did I misuse Assuming
or am I missing something else?
Assuming[a, e]
affects only the evaluation ofe
ife
contains a function that applies$Assumptions
. However,H10
,H11
, andG1
are of the formAssuming[a, e] // FullSimplify
, so the assumptionsa
will not be applied byFullSimplify
; the assumptions inH10
andH11
will be applied inG1
byIntegrate
andFullSimplify
(although the assumptions inG1
will be applied byIntegrate
only. It's not clear just from reading the question if this is what you want or not -- that is, which assumptions you think are being ignored.PiecewiseExpand
might help. $\endgroup$1/b
.PiecewiseExpand
will do this, if given the appropriate assumptions. $\endgroup$FullSimplify
outsideAssuming
! Doesn't that solves your problem? As you receive give back, vote and answer questions, keep the site useful, be kind, correct mistakes and share what you have learned. Why not choosing a meaningful username? $\endgroup$