Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to be able to expand $\log(x^n e^x) = n \log(x) +x$:

FullSimplify[Log[x^n Exp[x]], x > 0 && Element[n, Integers] && n > 1]


Log[E^x x^n]


-1 +FullSimplify[Log[x^n Exp[x]] + 1,  x > 0 && Element[n, Integers] && n > 1]


x + n Log[x]

what gives? Maybe it recognizes that I want to do arithmetic outside the log, so it then simplifies the expression; if that's the case, how can I force it to do that without hacking it by adding and subtracting 1?


share|improve this question
Can use PowerExpand with assumptions. The use of assumptions, while not really needed in your example, is good practice for cases where branch cuts might otherwise inadvertently be crossed. PowerExpand[Log[x^n Exp[x]], Assumptions -> x > 0 && Element[n, Integers] && n > 1] Out[1]= x + n Log[x] – Daniel Lichtblau Feb 24 '13 at 21:16
up vote 8 down vote accepted


FullSimplify[PowerExpand@Log[x^n Exp[x]], 
 x > 0 && Element[n, Integers] && n > 1]
x + n Log[x]
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.