Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Leer Introductions to Derivatives | Mathematical Analysis
Mathematics for Data Science

bookIntroductions to Derivatives

Derivatives help us understand how a function changes as its input changes. They measure the rate of change and are crucial in fields like physics, economics, and machine learning. By understanding derivatives, we can analyze trends, optimize processes, and predict behavior.

The Limit Definition of a Derivative

The derivative of a function f(x)f(x) at a specific point x=ax = a is given by:

limh0f(x+h)f(x)h\lim_{h \rarr 0} \frac{f(x + h) - f(x)}{h}

This formula tells us how much f(x)f(x) changes when we make a tiny step hh along the x-axis. The smaller hh becomes, the closer we get to the instantaneous rate of change.

Basic Derivative Rules

Power Rule

If a function is a power of xx, the derivative follows:

ddxxn=nxn1\frac{d}{dx}x^n=nx^{n-1}

This means that when differentiating , we bring the exponent down and reduce it by one:

ddxx3=3x2\frac{d}{dx}x^3=3x^2

Constant Rule

The derivative of any constant is zero:

ddxC=0\frac{d}{dx}C=0

For example, if f(x)=5f(x) = 5, then:

ddx5=0\frac{d}{dx}5=0

Sum & Difference Rule

The derivative of a sum or difference of functions follows:

ddx[f(x)±g(x)]=f(x)±g(x)\frac{d}{dx} \left[ f(x) \pm g(x) \right] = f'(x) \pm g'(x)

For example, differentiating separately:

ddx(x3+2x)=3x2+2\frac{d}{dx}(x^3 + 2x) = 3x^2 + 2

Product & Quotient Rules

Product Rule

If two functions are multiplied, the derivative is found as follows:

ddx[f(x)g(x)]=f(x)g(x)+f(x)g(x)\frac{d}{dx}[f(x)g(x)] = f'(x)g(x) + f(x)g'(x)

This means we differentiate each function separately and then sum their products. If f(x)=x2f(x)=x^2 and g(x)=exg(x) = e^x, then:

ddx[x2ex]=2xex+x3ex\frac{d}{dx}[x^2e^x] = 2xe^x + x^3e^x

Quotient Rule

When dividing functions, use:

ddx[f(x)g(x)]=f(x)g(x)f(x)g(x)g(x)2\frac{d}{dx} \left[ \frac{f(x)}{g(x)} \right] = \frac{f'(x)g(x) - f(x)g'(x)}{g(x)^2}

If f(x)=x2f(x)=x^2 and g(x)=x+1g(x)=x+1, then:

ddx[x2x+1]=2x(x+1)x2(1)(x+1)2\frac{d}{dx} \left[ \frac{x^2}{x + 1} \right] = \frac{2x(x+1) - x^2(1)}{(x+1)^2}

Chain Rule: Differentiating Composite Functions

When differentiating nested functions, use:

ddxf(g(x))=f(g(x))g(x)\frac{d}{dx} f(g(x)) = f'(g(x)) \cdot g'(x)

For example, if y=(3x+2)5y = (3x + 2)^5, then:

ddx(3x+2)5=5(3x+2)43=15(3x+2)4\frac{d}{dx}(3x+2)^5 = 5(3x+2)^4 \cdot 3 = 15(3x+2)^4

This rule is essential in neural networks and machine learning algorithms.

Exponential Chain Rule Example:

When you're differentiating something like:

y=e2x2y =e^{2x^2}

You're dealing with a composite function:

  • Outer function: eue^u
  • Inner function: u=2x2u = 2x^2

Apply the chain rule step-by-step:

ddx2x2=4x\frac{d}{dx}2x^2=4x

Then multiply by the original exponential:

ddx(e2x2)=4xe2x2\frac{d}{dx}\left( e^{2x^2} \right) = 4x \cdot e^{2x^2}
Note
Study More

In machine learning and neural nets, this shows up when working with exponential activations or loss functions.

Logarithmic Chain Rule Example:

Let's differentiate ln(2x)\ln(2x). Again, it's a composite function — log on the outside, linear on the inside.

Differentiate the inner part:

ddx(2x)=2\frac{d}{dx}(2x)=2

Now apply the chain rule to the log:

ddxln(2x)=12x2\frac{d}{dx}\ln(2x) = \frac{1}{2x} \cdot 2

Which simplifies to:

ddxln(2x)=22x=1x\frac{d}{dx}\ln(2x) = \frac{2}{2x} = \frac{1}{x}
Note
Note

Even if you’re differentiating ln(kx)ln(kx), the result is always 1/x1/x because the constants cancel out.

Special Case: Derivative of the Sigmoid Function

The sigmoid function is commonly used in machine learning:

σ(x)=11+xx\sigma(x) = \frac{1}{1+x^{-x}}

Its derivative plays a key role in optimization:

σ(x)=σ(x)(1σ(x))\sigma'(x) = \sigma(x)(1 - \sigma(x))

If f(x)=11+exf(x) = \frac{1}{1 + e^{-x}}, then:

f(x)=ex(1+ex)2f'(x) = \frac{e^{-x}}{(1 + e^{-x})^2}

This formula ensures that gradients remain smooth during training.

1. Which of the following correctly represents the derivative of x4x^4?

2. The derivative of a constant is always:

3. What is the derivative of x5x^5?

4. Given the following sigmoid function:

g(x)=21+exg(x) = \frac{2}{1+e^{-x}}

What is its derivative g(x)g'(x)?

question mark

Which of the following correctly represents the derivative of x4x^4?

Select the correct answer

question mark

The derivative of a constant is always:

Select the correct answer

question mark

What is the derivative of x5x^5?

Select the correct answer

question mark

Given the following sigmoid function:

g(x)=21+exg(x) = \frac{2}{1+e^{-x}}

What is its derivative g(x)g'(x)?

Select the correct answer

Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 3. Hoofdstuk 3

Vraag AI

expand

Vraag AI

ChatGPT

Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.

Suggested prompts:

Can you explain the limit definition of a derivative with a simple example?

What are some common mistakes to avoid when applying derivative rules?

Could you show how to use the chain rule with a more complex function?

Awesome!

Completion rate improved to 1.89

bookIntroductions to Derivatives

Veeg om het menu te tonen

Derivatives help us understand how a function changes as its input changes. They measure the rate of change and are crucial in fields like physics, economics, and machine learning. By understanding derivatives, we can analyze trends, optimize processes, and predict behavior.

The Limit Definition of a Derivative

The derivative of a function f(x)f(x) at a specific point x=ax = a is given by:

limh0f(x+h)f(x)h\lim_{h \rarr 0} \frac{f(x + h) - f(x)}{h}

This formula tells us how much f(x)f(x) changes when we make a tiny step hh along the x-axis. The smaller hh becomes, the closer we get to the instantaneous rate of change.

Basic Derivative Rules

Power Rule

If a function is a power of xx, the derivative follows:

ddxxn=nxn1\frac{d}{dx}x^n=nx^{n-1}

This means that when differentiating , we bring the exponent down and reduce it by one:

ddxx3=3x2\frac{d}{dx}x^3=3x^2

Constant Rule

The derivative of any constant is zero:

ddxC=0\frac{d}{dx}C=0

For example, if f(x)=5f(x) = 5, then:

ddx5=0\frac{d}{dx}5=0

Sum & Difference Rule

The derivative of a sum or difference of functions follows:

ddx[f(x)±g(x)]=f(x)±g(x)\frac{d}{dx} \left[ f(x) \pm g(x) \right] = f'(x) \pm g'(x)

For example, differentiating separately:

ddx(x3+2x)=3x2+2\frac{d}{dx}(x^3 + 2x) = 3x^2 + 2

Product & Quotient Rules

Product Rule

If two functions are multiplied, the derivative is found as follows:

ddx[f(x)g(x)]=f(x)g(x)+f(x)g(x)\frac{d}{dx}[f(x)g(x)] = f'(x)g(x) + f(x)g'(x)

This means we differentiate each function separately and then sum their products. If f(x)=x2f(x)=x^2 and g(x)=exg(x) = e^x, then:

ddx[x2ex]=2xex+x3ex\frac{d}{dx}[x^2e^x] = 2xe^x + x^3e^x

Quotient Rule

When dividing functions, use:

ddx[f(x)g(x)]=f(x)g(x)f(x)g(x)g(x)2\frac{d}{dx} \left[ \frac{f(x)}{g(x)} \right] = \frac{f'(x)g(x) - f(x)g'(x)}{g(x)^2}

If f(x)=x2f(x)=x^2 and g(x)=x+1g(x)=x+1, then:

ddx[x2x+1]=2x(x+1)x2(1)(x+1)2\frac{d}{dx} \left[ \frac{x^2}{x + 1} \right] = \frac{2x(x+1) - x^2(1)}{(x+1)^2}

Chain Rule: Differentiating Composite Functions

When differentiating nested functions, use:

ddxf(g(x))=f(g(x))g(x)\frac{d}{dx} f(g(x)) = f'(g(x)) \cdot g'(x)

For example, if y=(3x+2)5y = (3x + 2)^5, then:

ddx(3x+2)5=5(3x+2)43=15(3x+2)4\frac{d}{dx}(3x+2)^5 = 5(3x+2)^4 \cdot 3 = 15(3x+2)^4

This rule is essential in neural networks and machine learning algorithms.

Exponential Chain Rule Example:

When you're differentiating something like:

y=e2x2y =e^{2x^2}

You're dealing with a composite function:

  • Outer function: eue^u
  • Inner function: u=2x2u = 2x^2

Apply the chain rule step-by-step:

ddx2x2=4x\frac{d}{dx}2x^2=4x

Then multiply by the original exponential:

ddx(e2x2)=4xe2x2\frac{d}{dx}\left( e^{2x^2} \right) = 4x \cdot e^{2x^2}
Note
Study More

In machine learning and neural nets, this shows up when working with exponential activations or loss functions.

Logarithmic Chain Rule Example:

Let's differentiate ln(2x)\ln(2x). Again, it's a composite function — log on the outside, linear on the inside.

Differentiate the inner part:

ddx(2x)=2\frac{d}{dx}(2x)=2

Now apply the chain rule to the log:

ddxln(2x)=12x2\frac{d}{dx}\ln(2x) = \frac{1}{2x} \cdot 2

Which simplifies to:

ddxln(2x)=22x=1x\frac{d}{dx}\ln(2x) = \frac{2}{2x} = \frac{1}{x}
Note
Note

Even if you’re differentiating ln(kx)ln(kx), the result is always 1/x1/x because the constants cancel out.

Special Case: Derivative of the Sigmoid Function

The sigmoid function is commonly used in machine learning:

σ(x)=11+xx\sigma(x) = \frac{1}{1+x^{-x}}

Its derivative plays a key role in optimization:

σ(x)=σ(x)(1σ(x))\sigma'(x) = \sigma(x)(1 - \sigma(x))

If f(x)=11+exf(x) = \frac{1}{1 + e^{-x}}, then:

f(x)=ex(1+ex)2f'(x) = \frac{e^{-x}}{(1 + e^{-x})^2}

This formula ensures that gradients remain smooth during training.

1. Which of the following correctly represents the derivative of x4x^4?

2. The derivative of a constant is always:

3. What is the derivative of x5x^5?

4. Given the following sigmoid function:

g(x)=21+exg(x) = \frac{2}{1+e^{-x}}

What is its derivative g(x)g'(x)?

question mark

Which of the following correctly represents the derivative of x4x^4?

Select the correct answer

question mark

The derivative of a constant is always:

Select the correct answer

question mark

What is the derivative of x5x^5?

Select the correct answer

question mark

Given the following sigmoid function:

g(x)=21+exg(x) = \frac{2}{1+e^{-x}}

What is its derivative g(x)g'(x)?

Select the correct answer

Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 3. Hoofdstuk 3
some-alt