You can include PowerExpand
in the list of TransformationFunctions
, and adjust the ComplexityFunction
so that the intermediate forms produced by PowerExpand
are not discarded as being too complex:
FullSimplify[
-Log[-I x] + Log[I x],
Assumptions -> x ∈ Reals && x != 0,
TransformationFunctions -> {Automatic, PowerExpand[#, Assumptions -> True]&},
ComplexityFunction -> (LeafCount[#]+10 Count[#, _Log, Infinity]&)
] //TeXForm
$\begin{cases}
-i \pi & x<0 \\
i \pi & \operatorname{True}
\end{cases}$
Note the inclusion of the options Assumptions->True
in the PowerExpand
call. With the default, PowerExpand
can produce incorrect results, while adding any option (except Automatic
) to PowerExpand
means the output will be correct. Also, I include the TeXForm
wrapper so that the output is a reasonable facsimile of what you would see in Mathematica.