How to use it
- Type f(x). Multiplication can be written
2x,2*xor2 × x; functions need brackets, as insin(x). - Pick the order, from first to fourth.
- Optionally enter a point a to get f(a) and the derivative’s value there.
How it works
The text is parsed into an expression tree, which is differentiated node by node: (u + v)′ = u′ + v′, (uv)′ = u′v + uv′, (u / v)′ = (u′v − uv′) / v², and the chain rule multiplies by the derivative of the inside. The result is simplified a little and printed. Higher orders repeat the step. The point value is a plain numeric evaluation of the printed tree.
Worked example
f(x) = x^3 * sin(x). By the product rule f′(x) = 3x² sin x + x³ cos x, which the tool prints as 3 * x^2 * sin(x) + x^3 * cos(x). At x = 2 this is 12 sin 2 + 8 cos 2 ≈ 7.582395, while f(2) = 8 sin 2 ≈ 7.274379.
Tips
- Compare with a quick check: f(a + h) − f(a − h) over 2h for a small h should be close to f′(a).
- Use
ln(x)for natural logs;log(x)is base 10. - Only the variable x is supported.