I have a function

V[a_, h_, tau_] := (Sqrt[3]/2) h (Sqrt[3] a + h/3 tau)^2

now I want to check, whether its first derivative is zero in a given point. Say for the solution

{a -> 8.47344, h -> 1.67718, tau -> 12.9438}

I tried

Dt[V[a, h, t], a, h, tau] /. {a -> 8.47344, h -> 1.67718, tau -> 12.9438} 

Is this the proper way to show that? I use V in a system of equations, which I am trying to solve with Newton's method.

  • $\begingroup$ @rcollyer beat my by 5 seconds :) $\endgroup$ – tkott Mar 20 '12 at 19:16
  • $\begingroup$ @tkott, I win again. :P $\endgroup$ – rcollyer Mar 20 '12 at 19:17
  • $\begingroup$ @Martin are you sure you want Dt instead of D? If you want Dt, then you will need to specify all combinations of Dt[h, tau] through rules $\endgroup$ – tkott Mar 20 '12 at 19:18

You have three variables, so the "first derivative" is a little ambiguous. You can take a derivative with respect to one of these and feed the solution in directly, e.g.

D[V[a, h, tau], a] /. {a -> 8.47344, h -> 1.67718, tau -> 12.9438}

(Spoiler: none of them are zero)

When you take the total derivative Dt[V[a, h, t], a, h, tau], it gives you a result in terms of the relationship between the variables, such as Dt[a,h] or Dt[h,tau]. You have to specify what these are from you original problem. Substituting in numbers directly gives nonsensical expression such as Dt[8.47344, 1.67718]. You can't take the derivative of a number with respect to a number.

You could also ask Mathematica when one of the first derivatives is zero:

Solve[D[V[a, h, tau], a] == 0]
  • 7
    $\begingroup$ You don't have to calculate the derivatives one by one. To calculate all the first order partial derivatives at the specified point in one go you can do something like D[V[a, h, tau], {{a, h, tau}}] /. {a -> 8.47344, h -> 1.67718, tau -> 12.9438} $\endgroup$ – Heike Mar 20 '12 at 22:09

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.