1
$\begingroup$

I have an unknown function f[x1,x2] whose partial with respect to x1 is identically zero. I would like to make sure that whenever D[f[x1,x2],{x1,2}] shows up, for instance, it is evaluated to zero. How might I do this? Right now I have

conds = { Derivative[1,_][f][x1,x2] -> 0 };
D[f[x1, x2], x1, x2] /. conds // Simplify (* which equals zero, as I would like *)
D[f[x1, x2], {x1, 2}] /. conds // Simplify (* which is nonzero *)
$\endgroup$
2
  • 2
    $\begingroup$ Try D[f[x1, x2], {x1, 2}] /. Derivative[k_Integer?Positive, _][f][__] :> 0 and report back. $\endgroup$ May 19, 2016 at 3:47
  • $\begingroup$ This works exactly as I would like. Thank you. $\endgroup$ May 20, 2016 at 21:59

1 Answer 1

4
$\begingroup$

According to J.M., this works:

D[f[x1, x2], {x1, 2}] /. Derivative[k_Integer?Positive, _][f][__] :> 0
$\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.