# Equalities using FullSimplify?

How can I know if $(-2 + a (1 + i))/(a - 1), a=(-2 i (z - 1))/((z - i) (1 + i))$ is equal to $(1+i)(1-z)$?

I tried FullSimplify$[(-2 + a (1 + i))/(a - 1)]$ and I got $-(2 (1 + i) (i (-2 + z) + z))/(i (3 + i - 3 z) - z)$

• a=(-2 I(z-1))/((z-I)(1+I)); Plot[{Re[(-2+a(1+I))/(a-1)], Re[(1+I)(1-z)]}, {z,-4,4}]
– Bill
Aug 5 '18 at 6:26

Well, they are not equal. As @Bill pointed out, you can work out it visually in this case, but I'd rather choose other methods.

Does the equality hold for all complex values of $z$:

With[{a = (-2 I (z - 1))/((z - I) (1 + I))},
With[{eqns = {(-2 + a (1 + I))/(a - 1), (1 + I) (1 - z)}},
Resolve[ForAll[z, Equal @@ eqns], Complexes]]]


False

Find an instance where equality doesn't hold:

With[{a = (-2 I (z - 1))/((z - I) (1 + I))},
With[{eqns = {(-2 + a (1 + I))/(a - 1), (1 + I) (1 - z)}},
{z, eqns} /. FindInstance[! Equal @@ eqns, z, Complexes]]]


{0, {${\frac{8}{5}+\frac{4 i}{5}, 1+i }$}}

If you are wondering what Equal @@ eqns means, it is basically same as (-2 + a (1 + I))/(a - 1) == (1 + I) (1 - z).

Solutions do exist, though:

With[{a = (-2 I (z - 1))/((z - I) (1 + I))},
With[{eqns = {(-2 + a (1 + I))/(a - 1), (1 + I) (1 - z)}},
Resolve[Exists[z, Equal @@ eqns], Complexes]]]


True

And solutions are...

With[{a = (-2 I (z - 1))/((z - I) (1 + I))},
With[{eqns = {(-2 + a (1 + I))/(a - 1), (1 + I) (1 - z)}},
FullSimplify@Solve[Equal @@ eqns, z, Complexes]]]


$\left\{\left\{z\to \left(-\frac{3}{10}-\frac{i }{10}\right) \left(\sqrt{5}+(-2-i)\right )\right\},\left\{z\to \left(\frac{3}{10}+\frac{i} {10}\right) \left(\sqrt{5}+(2+i)\right) \right\}\right\}$