Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте Introductions to Derivatives | Section
Python Math Module Essentials: Trigonometry, Logarithms, and Constants - 1769704232288

Introductions to Derivatives

Свайпніть щоб показати меню

Note
Definition

A derivative is a measure of how a function changes as its input changes. It represents the rate of change of the function and is fundamental in analyzing trends, optimizing processes, and predicting behavior in fields such as physics, economics, and machine learning.

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+x2ex\frac{d}{dx}[x^2e^x] = 2xe^x + x^2e^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 1x\frac{\raisebox{1pt}{$1$}}{\raisebox{-1pt}{$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{\raisebox{1pt}{$1$}}{\raisebox{-3pt}{$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.

question mark

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

Виберіть правильну відповідь

Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 1. Розділ 19

Запитати АІ

expand

Запитати АІ

ChatGPT

Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат

Секція 1. Розділ 19
some-alt