Tag Info

New answers tagged


I think the following code will do the trick: Collect[expr, Derivative[_, _][g][_, _]] If you want Mathematica to try to simplify each "coefficient", you can use this version instead: Collect[expr, Derivative[_, _][g][_, _], Simplify] I can't claim full credit for this code — there's an example in the "Scope" section of the documentation for Collect ...


(-1)^(1/3) (-Log[x])^(2/3) + Log[x]^(2/3) // FullSimplify[#, x > 1] & 0 Alternatively, using the real-valued cube root of x CubeRoot[-1] CubeRoot[(-Log[x])^2] + CubeRoot[Log[x]^2] 0 CubeRoot[-1] CubeRoot[-Log[x]]^2 + CubeRoot[Log[x]]^2 0


I hadn't noticed @Histogram's comment, which was basically this solution: y[x_, a_] := Sin[x (1 + a x)]; Manipulate[Plot[y[x, a], {x, 0, 6}], {a, 0, 2}]


EDIT The CoefficientRules method given below won't work if one wants to collect by patterns like Log[_] or _Log (although it will work if the stuff inside the Log is explicitly given). In this case, my instinct is that Collect is then the way to go, and the method supplied by the OP will work pretty well as it is. CoefficientRules method Variables ...

Top 50 recent answers are included