Second Partial Derivatives

This is a simple demonstration of using Mathematica for computing second order partial derivatives.
    
Author:  Lt Col Steve Hadfield, US Air Force Academy, CO 
File Name:  secondpartial.nb

Second Order Partial Derivatives

There are two principal ways to compute second order partial derivatives.  The first uses the standard D[] functional format and the second uses the fancier "nabla" notation that was introduced in Mathematica 3.0 via the BasicInput palette.  Here we show both means.
      Line 1 - Clears the function name (f) and the variables (x, y) that we will be using.
      Line 2 - Defines the function f(x,y) = 5  (x^3) (y^2) - 4  (x^2) (y^3).
      Line 3 - Uses the conventional D[] format where the first argument is the function to differentiate ("f[x,y]") and the second is a list ("{x,2}") showing the variable to differentiate with respect to and how many times to differentiate (twice in this case).
      Line 4 - Uses the new notation via the \(TraditionalForm\`∂\_\(□, □\)□\) button on the BasicInput palette.  If this palette is not showing, you can have it displayed via the main menu bar with File|Palette|BasicInput.  Once the \(TraditionalForm\`∂\_\(□, □\)□\) template is available, you simply fill in the three boxes provided with the first two as the variable to differentiate with respect to and the third being the function to differentiate.  You can move between the three boxes via point-and-click or using the tab key.
      CAUTION:  With the new \(TraditionalForm\`∂\_\(□, □\)□\) notation, you need to take care with how you specify the function as it only differentiates the first term unless you put parantheses around the entire expression.  For example, (∂_(x, x))(x^2) + 
        (y^3) is interpretted as ((∂_(x, x))(x^2)) + (y^3)and produces 2 + (y^3).  To differentiate the entire expression use (∂_(x, x))((x^2) + 
              (y^3))  to get the desired answer of 2. 
      Execute the cell below to see an example.

Clear[f, x, y];
f[x_, y_] = 
      5  (x^3) (y^2) - 4  (x^2) (y^3)
D[f[x, y], {x, 2}]                  
(∂_(x, x))f[x, 
        y]

The cell below shows how to take the second partial with respect to y using the new format.

(∂_(y, y))f[x, y]

Below we see the two mixed partials computed with the new format.

(∂_(x, y))f[x, y]
(∂_(y, x))f[x, y]

Here's how to compute a mixed partial derivative using the standard notation.

D[f[x, y], x, y]

Finally, we need to be able to compute the derivative at a particular point.  We can do this easily with the substitution operation (/.) and the substitution string ("{x->1,y->2}") where we're replacing x with 1 and y with 2.

(∂_(x, x))f[x, y] /. {x -> 1, y -> 2}