Sagemath logarithm simplification

552 Views Asked by At

Sagemath doesn't simplify the following term$$\sqrt{x}\,\exp\biggl(\ln(x)\cdot\biggl(-\frac{1}{2}\biggr)\biggr)\qquad\text{with } x>0$$ to $1$:

In [1]:
assume(x>0)
In [2]:
D=sqrt(x)*exp(ln(x)*(-1/2))
In [3]:
D.full_simplify()
Out[3]:
sqrt(x)*e^(-1/2*log(x))

Actually, Sagemath passes such simplification tasks to Maxima.

So is there any way to simplify terms as the one above with Sagemath/Maxima?

1

There are 1 best solutions below

0
On BEST ANSWER

One can use canonicalize_radical for that:

sage: D = sqrt(x)*exp(ln(x)*(-1/2))
sage: D
sqrt(x)*e^(-1/2*log(x))
sage: D.canonicalize_radical()
1