How can the following expression be simplified:

  Sqrt[ (m/(2*Pi*k*T)^3) *4*Pi*v^2 ] * Exp[ -(m*v^2 / (2*k*T)) ]

I would like to get the result:

Log[ Sqrt[ (m/(2*Pi*k*T)^3) *4*Pi*v^2 ] ]  - (m*v^2 / (2*k*T))
  • $\begingroup$ expr /. Log[a_ E^b_] :> b + Log[a] $\endgroup$ – Bob Hanlon Sep 29 '16 at 23:11

Assuming all variables are positive:


1/2 (-((m v^2)/(k T))+Log[(m v^2)/(2 k^3 \[Pi]^2 T^3)])

Is this better? Yours to decide.


Okay since you explained it in detail you just want to use the rule

$$\log\left(\exp \left(x\right)\cdot y\right)=x+\log\left(y\right)$$

So we implement this single rule as PatternMatching:


-((m v^2)/(2 k T)) + Log[Sqrt[(m v^2)/(k^3 T^3)]/(Sqrt[2] \\[Pi])]
  • $\begingroup$ Nearly what I wanted: Since Log[Exp[x] * y] = x + Log[y], it would be nice keep the expression in x and y as they are originally. $\endgroup$ – mrz Sep 29 '16 at 22:48
  • $\begingroup$ Look into the newest edit. $\endgroup$ – Julien Kluge Sep 29 '16 at 23:00
  • 1
    $\begingroup$ This is great ... thanks $\endgroup$ – mrz Sep 29 '16 at 23:15

Maybe PowerExpand is what you're looking for. Not simpler, but expanded.

  • $\begingroup$ This is interesting but expanding everything ... $\endgroup$ – mrz Sep 29 '16 at 22:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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