# How to force Mathematica to "Together" a fraction under a Log and a Square Root

Consider the following code:

Assuming[2 > u > 0 && 2 > x > 0, FullSimplify[Log[x]/Sqrt[4 - x^2] /. x -> 2 Sqrt[(2 - u)/(2 + u)]]]


The following output is returned:

(the TeX'd equivalent, screenshots for Mathematica output make me uneasy)

$$\frac{1}{8}\sqrt{2+\frac{4}{u}} \text{Log}\left[-4+\frac{16}{2+u} \right]$$

How can I force Together on the arguments?

i.e. I would like it to look something closer to this:

$$\frac{1}{8}\sqrt{\frac{4+2u}{u}} \text{Log}\left[\frac{8-4u}{2+u}\right]$$

FullSimplify, Together, Simplify, etc. don't change the output by any significant margin.

• Try ExpandNumerator@*Together //@ % after evaluating your snippet. Mar 26 '19 at 23:47
• That worked, thanks :) +1 Mar 26 '19 at 23:48

Try this:

expr = Log[x]/Sqrt[4 - x^2] /. x -> 2 Sqrt[(2 - u)/(2 + u)]

(* Log[2 Sqrt[(2 - u)/(2 + u)]]/Sqrt[4 - (4 (2 - u))/(2 + u)] *)


Then:

Simplify[expr // FunctionExpand, 2 > u > 0]


yielding this: Have fun!

• Wow.... Where has this function been for the past 4 years of my life.... Mar 27 '19 at 9:44