Tag Info

Hot answers tagged

8

For Simplify there is the option ExcludedForms: expr = Sqrt[x^4] Log[x^2] + Log[x^4]; Simplify[expr, Assumptions -> {x > 0}, ExcludedForms -> {_Log}] (* x^2 Log[x^2] + Log[x^4] *) For Refine, you can wrap the heads to be excluded with Hold: Refine[expr /. Log -> Hold[Log], x > 0] // ReleaseHold (* x^2 Log[x^2] + Log[x^4] *) or use ...


5

With V10 we can write expr = Sqrt[x^4] Log[x^2] + Log[x^4] /. x_Log :> Inactivate[x]; Refine[expr, x > 0] // Activate EDIT Thanks to Chip Hurst's comment the above should, of course, be written as expr = Inactivate[Sqrt[x^4] Log[x^2] + Log[x^4], Log] One of the advantages of Inactivate is that we can selectively Activate: expr = ...



Only top voted, non community-wiki answers of a minimum length are eligible