Skip to main content
added 243 characters in body
Source Link
BlacKow
  • 6.5k
  • 20
  • 33

Will Assumptions work?

Log[z^2] // FullSimplify (* Log[z^2] *) Log[z^2] // FullSimplify[#, z > 0] & (* 2 Log[z] *) 

Edit: Naive implementation of rules.

LSimpl[f_] := f //. Log[x_*y_] -> Log[x] + Log[y] //. Log[x_^n_Integer] -> n*Log[x]; LSimpl[x Log[a/b] + y Log[b/a]] (* x (Log[a] - Log[b]) + y (-Log[a] + Log[b]) *) 

Will Assumptions work?

Log[z^2] // FullSimplify (* Log[z^2] *) Log[z^2] // FullSimplify[#, z > 0] & (* 2 Log[z] *) 

Will Assumptions work?

Log[z^2] // FullSimplify (* Log[z^2] *) Log[z^2] // FullSimplify[#, z > 0] & (* 2 Log[z] *) 

Edit: Naive implementation of rules.

LSimpl[f_] := f //. Log[x_*y_] -> Log[x] + Log[y] //. Log[x_^n_Integer] -> n*Log[x]; LSimpl[x Log[a/b] + y Log[b/a]] (* x (Log[a] - Log[b]) + y (-Log[a] + Log[b]) *) 
Source Link
BlacKow
  • 6.5k
  • 20
  • 33

Will Assumptions work?

Log[z^2] // FullSimplify (* Log[z^2] *) Log[z^2] // FullSimplify[#, z > 0] & (* 2 Log[z] *)