Solve the equation to obtain such a result form;
Reduce[a x1 + x1^2 - a x2 - x2^2 - Log[x1] + Log[x2] == 0,
a] // Simplify
(*a\[Equal](-x1^2+x2^2+Log[x1]-Log[x2])/(x1-x2)||x1\[Equal]x2*)
How to obtain this form, that is, if a part can be omitted, it can be omitted
a == -x1 - x2 + (Log[x1] - Log[x2])/(x1 - x2)
want to get this result as following picture
Solve
deletes full-dimension components, since it's less rigorous, as shown in current answers.Or@@And@@@Apply[Equal,Solve[{x^2+y^2==4,x==y}],{2}]
converts toReduce
form. $\endgroup$