0
$\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
    $\begingroup$ Try D[f[x1, x2], {x1, 2}] /. Derivative[k_Integer?Positive, _][f][__] :> 0 and report back. $\endgroup$ – J. M. will be back soon May 19 '16 at 3:47
  • $\begingroup$ This works exactly as I would like. Thank you. $\endgroup$ – Jeremy Upsal May 20 '16 at 21:59
2
$\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, privacy policy and cookie policy

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