# How to show that two expressions are the symbolically the same

The following two expressions are the same when checked numerically.

fun1[x_, y_] =
1/4 (Sqrt[(1 - y)/(
4 + y (-4 + (1 - 2 x)^2 y))] (2 - y + Sqrt[
4 + y (-4 + (1 - 2 x)^2 y)]) -
2 ((-1 + 2 x) y + Sqrt[
4 + y (-4 + (1 - 2 x)^2 y)]) Sqrt[-(((-1 + y) (-2 + y + Sqrt[
4 + y (-4 + (1 - 2 x)^2 y)])^2)/(4 -
4 y + ((-1 + 2 x) y + Sqrt[
4 + y (-4 + (1 - 2 x)^2 y)])^2)^2)]);
fun2[x_, y_] = Sqrt[1 - y]/2;


However, Mathematica is not able to reduce fun1[x,y] to fun2[x,y], with Simplify or FullSimplify. Is there any way of doing this simplification? Also note that $$0\le x \le 1$$ and $$0\le y\le 1$$.

• Please write an informative title... one that actually deals with the nature of your problem. Sep 25 at 1:10

Here's one way to cajole Mathematica into showing you that they are the same:

FullSimplify[Expand[fun1[x, y]^2], Assumptions -> {0 < x < 1, 0 < y < 1}]


This gives (1-y)/4 and so the answer you desire is the square root of this, your function fun2[x,y].

Edit

These expressions are indeed symbolically the same. PowerExpand with the given asumptions shows it.

fun2[x, y] == fun1[x, y] //
PowerExpand[#,
Assumptions -> {0 <= x <= 1, 0 <= y <= 1}] & // Simplify

(*   True   *)


The zero results of

Simplify[D[fun1[x, y] - fun2[x, y], x]]


and

Simplify[D[fun1[x, y] - fun2[x, y], y]]


and

Simplify[fun1[x, y] - fun2[x, y] /. {x -> 1/2, y -> 1/2}]


imply that these functions are identical on the square {0 < x < 1, 0 < y < 1}.

• fun1[x, y] - fun1[x, y] is always zero. Typo. Sep 28 at 7:22
• @Akku14: Thank you. Fixed. Sep 28 at 8:18