Tag Info

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


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}]



Top 50 recent answers are included