Derivative calculator with steps

Enter your values. The answer and the full worked solution update as you type.

Result

f(x)x2·sin(3x) + ln(x)/x + e−x2
f′(x)2x·sin(3x) + 3x2·cos(3x) + (1 − ln(x))/x2 − 2x·e−x2
f(1)0.509
f′(1)−2.423
Tangent liney = −2.423x + 2.932

Differentiate a function of x and see how each rule is applied. The calculator handles polynomials, powers and roots, exponentials, logarithms, trigonometric and inverse trigonometric functions, and combines them with the sum, product, quotient and chain rules, simplifying the result as it goes. It can also find the second and third derivative and evaluate the derivative and the tangent line at a point.

Step-by-step solution

Read the function

f(x) = x2·sin(3x) + ln(x)/x + e−x2

Sum rule: differentiate term by term

d/dx[x2·sin(3x)] = 2x·sin(3x) + 3x2·cos(3x)
d/dx[ln(x)/x] = (1 − ln(x))/x2
d/dx[e−x2] = −2x·e−x2
f′(x) = 2x·sin(3x) + 3x2·cos(3x) + (1 − ln(x))/x2 − 2x·e−x2

Product rule

(uv)′ = u′v + uv′
u = x2, u′ = 2x
v = sin(3x), v′ = 3cos(3x)
d/dx[x2·sin(3x)] = 2x·sin(3x) + x2·(3cos(3x)) = 2x·sin(3x) + 3x2·cos(3x)

Chain rule

d/dx[f(u)] = f′(u)·u′
u = 3x, u′ = 3
d/dx[sin(3x)] = cos(3x)·3 = 3cos(3x)

Quotient rule

(u/v)′ = (u′v − uv′)/v²
u = ln(x), u′ = 1/x
v = x, v′ = 1
d/dx[ln(x)/x] = ((1/x)·x − ln(x)·1)/x2 = (1 − ln(x))/x2

Chain rule

d/dx[eu] = eu·u′
u = −x2, u′ = −2x
d/dx[e−x2] = e−x2·(−2x) = −2x·e−x2

Derivative rules used

d/dx[f + g] = f′ + g′
d/dx[c·f] = c·f′
d/dx[xn] = n·xn−1
(uv)′ = u′v + uv′
(u/v)′ = (u′v − uv′)/v²
d/dx[f(u)] = f′(u)·u′
d/dx[ex] = ex
sin(u) → cos(u)
ln(u) → 1/u

Result

f′(x) = 2x·sin(3x) + 3x2·cos(3x) + (1 − ln(x))/x2 − 2x·e−x2

Evaluate at the point

f(1) = 0.509
f′(1) = −2.423
tangent line: y = f(x₀) + f′(x₀)·(x − x₀) = 0.509 + (−2.423)·(x − 1)

Key formulas

Power rule
(xⁿ)′ = n·xⁿ⁻¹
Product rule
(uv)′ = u′v + uv′
Quotient rule
(u/v)′ = (u′v − uv′)/v²
Chain rule
f(g(x))′ = f′(g(x))·g′(x)
Common derivatives
(eˣ)′ = eˣ, (ln x)′ = 1/x, (sin x)′ = cos x, (cos x)′ = −sin x

How to find a derivative step by step

  1. Split a sum into its terms and differentiate each one separately (sum rule). Constant factors stay in front (constant multiple rule).
  2. For powers use the power rule, d/dx[xⁿ] = n·xⁿ⁻¹. It also works for roots and reciprocals: √x = x^(1/2) and 1/x² = x⁻².
  3. For a product u·v use the product rule (uv)′ = u′v + uv′; for a quotient u/v use the quotient rule (u/v)′ = (u′v − uv′)/v².
  4. For a function of another function, such as sin(3x) or e^(x²), use the chain rule: differentiate the outer function, keep the inside, and multiply by the derivative of the inside.
  5. Simplify: collect like terms and cancel common factors between a numerator and a denominator.

Questions and answers

How do I type the function?

Use ^ for powers and brackets for function arguments: x^3 - 2x, sin(3x), e^(2x), ln(x)/x, sqrt(x^2 + 1). Multiplication signs can be left out: 3x^2 sin(x) means 3x²·sin(x). Write e^(2x) with brackets; e^2x is read as e²·x.

Which functions are supported?

sin, cos, tan, sec, csc, cot, arcsin, arccos, arctan, exp, ln, log (base 10) and sqrt, with any combination of +, −, ·, / and powers, including powers such as x^x where both base and exponent contain x.

What is the difference between ln and log?

ln is the natural logarithm, base e, with d/dx[ln x] = 1/x. In this calculator log means the base-10 logarithm, whose derivative is 1/(x·ln 10).

How does the calculator find the tangent line?

Enter a point x₀. The tangent line is y = f(x₀) + f′(x₀)·(x − x₀): it passes through the point on the curve and has the derivative as its slope.

Is the answer always in the simplest form?

The result is simplified by collecting like terms, merging powers and cancelling common factors, but it may be written differently from your textbook, for example cos(x)/sin(x) instead of cot(x). Both forms are equal.

Practise it yourself

Practise Derivatives

A calculator gives the answer. In the exam you need the method: practise it with new problems, hints and worked solutions.

</> Embed

Free for teachers and schools: paste this code into your course page, LMS or website. Students can use the calculator and its worked solution without an account.

More calculators