Differentiation is one idea, applied piece by piece

Differentiating a complicated function does not take a complicated formula: it takes recognising what the function is made of. A sum goes term by term, a product has its rule, a quotient has its own, and wherever one function encloses another the chain rule applies. The work is in the decomposition, not the arithmetic — nearly every mistake comes from treating a composition as a product, or the other way round.

That is why this calculator lists the rules it used rather than only the answer. If it reports “product, chain, trigonometric” for your function and your working never applied the chain rule, you know where to look without comparing two expressions character by character. It is how a computed answer can teach something instead of replacing the reasoning.

The result comes back simplified, but not necessarily in the form you reached. Factoring, expanding or putting terms over a common denominator does not change the function, and two spellings remain the same derivative. When in doubt the quickest check is numeric: evaluate both at a couple of points and compare.

Common mistakes

  • Dropping the chain rule's factor. The derivative of sin(2x) is 2·cos(2x), not cos(2x): the 2 comes from inside.
  • Differentiating a product by multiplying the two derivatives. The rule is f′g + fg′, not f′g′.
  • Using the power rule when the exponent contains the variable. x^x and 2^x need logarithms.
  • Treating as constant something that depends on the variable, or the reverse. Any letter other than the one you differentiate by is treated as a constant, so check you named the right variable.

Frequently asked questions

When is the chain rule needed?

Every time one function sits inside another: in sin(x²) the sine is applied to x², not to x. You differentiate the outer function leaving the argument alone, then multiply by the derivative of what is inside. Forgetting that factor is the single commonest mistake there is.

Why does the power rule not work for x^x?

Because that rule holds when the exponent is constant, and here x appears in the base and the exponent both. You go through logarithms: write x^x = e^(x·ln x) and differentiate that. It is called logarithmic differentiation, and the calculator says when it used it.

What is the second derivative for?

It says how the slope itself is changing: where it is positive the curve is concave up, where negative concave down, and where it crosses zero there is a point of inflection. It is the part you need after finding the maxima and minima.

My answer looks different — did I get it wrong?

Not necessarily. The same derivative can be written in several forms, factored or expanded. Compare the two numerically at a couple of points: if the values agree, the two ways of writing it are the same function.

What notation does it take for powers and roots?

You can write x^2 or x², sqrt(x) or x^(1/2): it treats them alike and prints whichever reads better. For the natural logarithm both ln(x) and log(x) are accepted.

How this calculation works

Sum: (f + g)′ = f′ + g′. Product: (f·g)′ = f′g + fg′. Quotient: (f/g)′ = (f′g − fg′)/g². Chain: [f(g(x))]′ = f′(g(x))·g′(x). Power with a constant exponent: (xⁿ)′ = n·xⁿ⁻¹. Exponential: (e^u)′ = e^u·u′ and (a^u)′ = a^u·ln(a)·u′. Logarithm: (ln u)′ = u′/u. Trigonometric: (sin u)′ = cos(u)·u′, (cos u)′ = −sin(u)·u′, (tan u)′ = u′/cos²(u). Inverse: (arctan u)′ = u′/(1+u²), (arcsin u)′ = u′/√(1−u²). Root: (√u)′ = u′/(2√u). Where the variable appears in both the base and the exponent, logarithmic differentiation applies: f^g = e^(g·ln f), so (f^g)′ = f^g·(g·ln f)′.