How to use it
- Type the function, for example
x^2*y + y^3*z. - Choose first or second partials.
- Optionally enter a point such as
1, 2, 3to get the values, the gradient and its length.
Only the variables that appear in the function get a row: for f(x, y) there is no ∂f/∂z.
How it works
The function is turned into an expression tree and differentiated with the usual rules (sum, product, quotient, power and chain rules), treating every variable except the one you differentiate by as a constant. The result is lightly simplified and printed as a formula you can paste back in. Second partials differentiate the first partial again: ∂²f/∂x∂y here means differentiate by x, then by y. Values at the point are computed from the formulas.
Worked example
f(x, y, z) = x²y + y³z.
- ∂f/∂x = 2xy, shown as
2 * x * y. - ∂f/∂y = x² + 3y²z, shown as
x^2 + 3 * y^2 * z. - ∂f/∂z = y³, shown as
y^3.
At (1, 2, 3): f = 1·2 + 8·3 = 26, ∂f/∂x = 4, ∂f/∂y = 1 + 3·4·3 = 37, ∂f/∂z = 8. The gradient is (4, 37, 8) and its length is √(16 + 1369 + 64) = √1449 = 38.06573262.
Tips and common mistakes
- Write
x*yorx y;xyis read as one unknown name. - Angles in sin, cos and tan are in radians.
- A value marked “not defined at this point” comes from a division by zero or a logarithm of a non-positive number at that point, such as ln(x) at x = 0.