Tag Info

Hot answers tagged

4

Often, it is desirable to apply Simplify or FullSimplify to parts of an expression and then recombine the parts. A particularly effective function for this purpose is Collect. For instance, Collect[expr, a^2 - b^2, Simplify] (* (4 a^2 - 3 b^2)/(a^2 - b^2)^2 - 8/(b^2 - c^2)^2 *) Although there is no need to use FullSimplifyin this case, it runs faster ...


4

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 ...



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