0
$\begingroup$

The best way to show what I want is by giving an example:

How to go from

Exp[-a[x, y]] (g[x, y]*Derivative[1, 0][f][x, y])/h[x, y] + 
Exp[-a[x, y]] (f[x, y]*Derivative[1, 0][g][x, y])/h[x, y] - 
Exp[-a[x, y]] (f[x, y]*g[x, y]*Derivative[1, 0][h][x, y])/h[x, y]^2

to

Exp[-a[x, y]] D[f[x, y]*g[x, y]/h[x, y], x]

If the Exp were not there, i.e. the expression is a full derivative, then integrating would work 1

expr = With[{anti = 
Integrate[(g[x, y]*Derivative[1, 0][f][x, y])/
h[x, y] + (f[x, y]*Derivative[1, 0][g][x, y])/
h[x, y] - (f[x, y]*g[x, y]*Derivative[1, 0][h][x, y])/h[x, y]^2,
x]}, HoldForm[D[anti, x]]]        
$\endgroup$
1
  • $\begingroup$ DSolve[Exp[-a[x, y]] (g[x, y]*Derivative[1, 0][f][x, y])/h[x, y] + Exp[-a[x, y]] (f[x, y]*Derivative[1, 0][g][x, y])/h[x, y] - Exp[-a[x, y]] (f[x, y]*g[x, y]*Derivative[1, 0][h][x, y])/ h[x, y]^2 == Exp[-a[x, y]] Derivative[1, 0][z][x, y], z, {x, y}]. $\endgroup$ Mar 25, 2013 at 12:26

1 Answer 1

1
$\begingroup$

Extending my comment to @MichaelE2's answer, you could consider

 simp[exp_] := Simplify[exp, 
    TransformationFunctions -> {
(Block[{x}, Defer[D[#, x]] &[Integrate[#, x]]] &), Collect[#, _^_] &}]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.