What is the partial derivative of f?
Type a function such as x^2 - 3x y + 2y^2 and the letter to differentiate by. Type two letters, such as xy, for a second-order or mixed partial derivative.
- Partial derivative
- 2x - 3y - 4
The partial derivative of x^2 - 3x y + 2y^2 - 4x + 5y - 12 with respect to x is 2x - 3y - 4.
Partial derivative: 2x - 3y - 4. The partial derivative of x^2 - 3x y + 2y^2 - 4x + 5y - 12 with respect to x is 2x - 3y - 4.
How to calculate
Finds partial derivatives, checked numerically.
Example with the default inputs (Function f(x, y, …) x^2 - 3x y + 2y^2 - 4x + 5y - 12, With respect to x): The partial derivative of x^2 - 3x y + 2y^2 - 4x + 5y - 12 with respect to x is 2x - 3y - 4.
Method: Each step is a CAS derivative checked at 15 points.
- Radians.
Worked examples
Each example is checked against the calculator on every build.
- Function f(x, y, …) x^2 - 3x y + 2y^2 - 4x + 5y - 12, With respect to y, Value at (optional) 1, 2 gives Partial derivative -3x + 4y + 5, Value at the point 10.Source: OpenStax Calculus Vol. 3 (Strang and Herman, 2016), 4.3, Ex. 4.15
- Function f(x, y, …) x e^(-3y) + sin(2x - 5y), With respect to xy gives Partial derivative 10 sin(2x - 5y) - 3/e^(3y).Source: OpenStax Calculus Vol. 3 (Strang and Herman, 2016), 4.3, Ex. 4.19
How it works
The partial derivative calculator finds a partial derivative of the function f you type. You name the letters to differentiate by, in order: x gives ∂f/∂x; xy gives f_xy = ∂/∂y (∂f/∂x); yy gives ∂²f/∂y². Up to 4 letters.
For each letter in turn, a computer algebra system (nerdamer, open source) differentiates with respect to that letter while every other letter is held constant. The algebra runs after you start typing, in the background.
Every step is checked before it is shown. At 15 fixed test points in all the letters (values such as 0.21, −0.37, 0.57, 1.33, −0.91, 2.63 and up to ±8.93), the slope of the function in that letter is measured numerically with a five-point central difference, with steps h = 0.001 × max(1, |value|) and h/2. Where the two steps agree, the formula must match the measured slope to 10⁻⁶ × max(1, |slope|) (plus a rounding allowance of 10⁻¹¹ × |f| / h). Points where f is not a real number, or where the two steps disagree (a corner or pole nearby), are skipped. At least 3 points must agree and none may disagree. A failed check, no formula found, or more than 3 seconds of work gives "No verified answer" instead of a formula.
Value at a point. Type a point as x = 1, y = 2, or as 1, 2. A number without a name goes with the letter at its place in the alphabetical list of the letters (so x = 1, 2 gives x = 1, y = 2); numbers past the last letter are ignored. Every letter of f and of the differentiation letters needs a value. The value is the formula at that point, to 10 significant figures. It is shown only when it is a real number and a bound on its rounding error is at most 10⁻¹¹ × |value|. The bound gives each number, coordinate and operation result an error of 2.3 × 10⁻¹⁶ × its size (a part with no letters and a whole-number value, such as an exponent 2, has error 0), and adds to each operation the errors of its inputs, each times how fast the operation changes with that input (measured by moving the input by 10⁻⁷ × its size, or by 10⁻⁷ when it is 0). So a value 0 is shown only when its bound is 0 (y at y = 0). When terms cancel, the bound is large and no value is shown: e^x − x − 1 at x = 0.00001 keeps only about 5 of its 16 digits, and cos(π/2) is 6.1 × 10⁻¹⁷ in the computer’s arithmetic.
What you can type
- Letters. Any lowercase letters except e (Euler’s number) are variables; pi (or π) is π.
- Numbers can have decimals (2.5) and powers of ten (1e-3).
- Operations: + − * / and ^ for powers. Brackets group. Numbers and letters side by side multiply: 2x, xy and x y all mean products. Letters that spell a function or constant are read as that name first (sin, ln, pi), so write x y rather than a run of letters when in doubt.
- Functions: sqrt, cbrt, ln (and log, the same natural logarithm), log10, exp, abs (or |x|), sin, cos, tan, sec, csc, cot, asin, acos, atan (arcsin, arccos, arctan also work), sinh, cosh, tanh and their inverses. Angles are in radians.
How answers are written
The answer uses the syntax you type: ^ for powers, sqrt(u), π for pi, ln for the natural logarithm, a space for multiplication. Terms that are products of numbers and powers of letters come first, highest total degree first, then by the powers of the letters in alphabetical order (x²y before xy² before y²); other terms follow in the order the algebra gave them; a constant term comes last. In a product, the sign comes in front, then numbers and constants, then powers of letters in alphabetical order (a letter that appears twice is one power: v v is v^2), then the other factors. The same order applies inside brackets and function arguments, except that the first term with a plus sign is moved to the front: 2/(2z − x^2 − y + 3) and x/sqrt(1 − x^2 y^2). e^(−u) may be written as 1/e^u. The answer is not factored or expanded further. The written text is read back and must equal the checked formula at the 15 test points (both real and within 10⁻⁹ × max(1, |value|), or neither real). An answer whose text holds a decimal point or a whole number of 9 or more digits (a number the algebra rounded) is not shown. The page shows it as MathML; Copy answer gives this text.
Assumptions
- Letters other than the one being differentiated are constants.
- Angles are in radians; ln and log are the natural logarithm.
- An answer that fails its check, finds no formula, or takes over 3 seconds is not shown ("No verified answer").
Worked examples by hand
f(x, y) = x² − 3xy + 2y² − 4x + 5y − 12 (OpenStax Calculus Volume 3, section 4.3, Example 4.15). Holding x constant, the derivatives of x², −4x and −12 are 0, −3xy gives −3x, 2y² gives 4y and 5y gives 5, so ∂f/∂y = −3x + 4y + 5. At (1, 2): −3 + 8 + 5 = 10.
g(x, y) = sin(x²y − 2x + 4) (Example 4.15). By the chain rule with y constant, ∂g/∂x = (2xy − 2) cos(x²y − 2x + 4).
f(x, y) = xe^(−3y) + sin(2x − 5y) (Example 4.19). First ∂f/∂x = e^(−3y) + 2 cos(2x − 5y). Then with respect to y: −3e^(−3y) + 2 · 5 sin(2x − 5y), so f_xy = 10 sin(2x − 5y) − 3e^(−3y), the same as the book’s −3e^(−3y) + 10 sin(2x − 5y).
Other questions people ask
What is a partial derivative?
A partial derivative of a function of several variables is its rate of change in one variable while the others stay fixed. For f(x, y) = x²y, the partial derivative with respect to x treats y as a constant: ∂f/∂x = 2xy. With respect to y it treats x as a constant: ∂f/∂y = x².
How do I get a second or mixed partial derivative?
Type the letters in the order you differentiate. xx gives ∂²f/∂x², the derivative with respect to x twice. xy gives f_xy: first with respect to x, then with respect to y, which is ∂²f/∂y∂x. For most functions (when the second partials are continuous) f_xy and f_yx are equal, by Clairaut’s theorem.
Which letters can I use?
Any lowercase letters except e, which is Euler’s number: x, y, z, t, u and so on. Letters you do not differentiate by are treated as constants. A letter that does not appear in f gives a partial derivative of 0.
How is the answer checked?
At 15 fixed points in all the letters, the page measures the slope of f numerically, with a difference quotient taken just before and after each point, and compares it with the formula. They must agree to about 1 part in a million. If they do not, the page says "No verified answer" instead of showing a formula.
How do I evaluate the partial derivative at a point?
Type the point in "Value at", either as x = 1, y = 2 or as 1, 2 (the numbers go with the letters in alphabetical order). For f(x, y) = x² − 3xy + 2y² − 4x + 5y − 12, ∂f/∂y = −3x + 4y + 5, which is 10 at (1, 2).
Why does my answer look different from the book’s?
The same partial derivative can be written in several ways: −3e^(−3y) and −3/e^(3y) are equal, and so are (2xy − 2)cos(u) and 2(xy − 1)cos(u). The page writes powers of the letters first, highest degree first, but it does not factor or expand the answer.