Hi, guys. How can I completely simplify the result of “PiecewiseExpand” in the picture? Because the first line of the result obviously does not exist. What I want to derive is that it disappears automatically if this result does not exist. In addition, do we have any code to realize the exact conditions of “true” ? Thank you very much!
[1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=123456.jpg&userId=178384
Clear["`"];(G[GreaterEqual]B)PiecewiseExpand[
1/(B - 1)[Alpha](B - Min[Max[((p2 - (p1 - H))/H), 1], B]) +
1/(B - 1)(1 - [Alpha])(B - Min[Max[((p2 - (p1 - L))/L), 1], B]),
p1 - p2 < 0 && H > L > 0 && 0 < [Alpha] < 1 && g >= B > 1 &&
p1 <= L && p1 <= p2 <= gp1]
PiecewiseExpand[\[Alpha]*
Integrate[1/(
B - 1), {x, Min[Max[(p2 - (p1 - H))/H, 1], B],
B}] + (1 + \[Alpha])*
Integrate[1/(B - 1), {x, Min[Max[(p2 - (p1 - L))/L, 1], B], B}],
p1 - p2 < 0 && H > L > 0 && 0 < \[Alpha] < 1 && g >= B > 1,
Method -> {"ValueSimplifier" -> Simplify,
"ExpandSpecialPiecewise" -> {If, UnitStep}}]
(* (\[Alpha] (B - Min[B, (H - p1 + p2)/H]))/(-1 + B) + ((1 + \[Alpha]) (B - Min[B, (L - p1 + p2)/L]))/(-1 + B)*)
Thank you for your help, but this is not what I want. I want the similar result (piecewise function) as that of my picture, but it does not include the first line, because the first line is wrong or it should not exist considering the conditions, i.e., p1 - p2 < 0 && H > L > 0 && 0 < \[Alpha] < 1 && g >= B > 1 && p1 <= L && p1 <= p2 <= g*p1.
A correction. See my last answer.
Thank you, but I want to derive the result of a piecewise function, instead of Max or Min, just like the function in the picture. I just want to simplify the result, the first line of the result should not exist.
