ਸੰਖਿਆਤਮਕ ਅਵਕਲਜ ਕੈਲਕੁਲੇਟਰ

The first or second derivative of any function f(x) at a point, to about 20 significant digits by Richardson extrapolation, with the tangent line drawn.

ਅੱਪਡੇਟ ਕੀਤਾ ਜਾਂਚੀਆਂ ਉਦਾਹਰਨਾਂ: 6

Use x as the variable, e.g. x^3 - 2x, exp(x), ln(x). Trig functions use radians here.
ਹੋਰ ਚੋਣਾਂ
The chart shows x₀ ± this much
ਅਜ਼ਮਾਓ
ਅਵਕਲਜ
ਅਵਕਲਜ: 2.223244275484
ਵੱਧ ਤੋਂ ਵੱਧ ਦਸ਼ਮਲਵ ਥਾਵਾਂ: 12; ਸਭ ਤੋਂ ਨੇੜੇ; ਬਰਾਬਰ ਦੂਰੀ ਉੱਤੇ ਸਿਫ਼ਰ ਤੋਂ ਦੂਰ
f(x₀)
0.841470984808
Tangent line
y = 2.223244x − 1.381773
Estimated error
9.6 × 10⁻²³

At x = 1 the slope of f is 2.2232443: near that point, f rises by about 2.223 × h when x moves by a small step h.

f and its tangent at x = 1

024-10123xy(1, 0.841471)
f(x)Tangent line
Richardson table (central quotient and best estimate) ਕਤਾਰਾਂ: 6
hDifference quotientBest estimate so far
0.12.219330544382.21933054438
0.052.222266131452.22324466047
0.0252.222999757542.22324427552
0.01252.223183147132.22324427548
0.006252.223228993472.22324427548
0.0031252.223240454982.22324427548
ਗਣਨਾ ਕਿਵੇਂ ਹੁੰਦੀ ਹੈ S
  1. Central difference quotient

    D(h)=f(x0+h)−f(x0−h)2h,D(0.1)=2.21933054438038D(h) = \frac{f(x_0 + h) - f(x_0 - h)}{2h},\qquad D(0.1) = 2.21933054438038

    Its error has only even powers of h, which Richardson extrapolation removes one at a time.

  2. Richardson extrapolation

    Ti,j=4j Ti,j−1−Ti−1,j−14j−1,hi=h02i  ⇒  f′(1)≈2.223244275483932730705941T_{i,j} = \frac{4^{j}\,T_{i,j-1} - T_{i-1,j-1}}{4^{j} - 1},\quad h_i = \frac{h_0}{2^{i}} \;\Rightarrow\; f'(1) \approx 2.223244275483932730705941

    Halved h 5 times from h₀ = 0.1; the estimated error is 9.6 × 10⁻²³.

  3. Both sides agree

    left 2.22324427548393,right 2.22324427548393\text{left } 2.22324427548393,\quad \text{right } 2.22324427548393

    One-sided quotients from each side converge to the same value, so f is smooth enough here for the derivative to exist.

  4. Tangent line

    y=f(x0)+f′(x0)(x−x0)=0.841470984807897+2.22324427548393 (x−1)y = f(x_0) + f'(x_0)(x - x_0) = 0.841470984807897 + 2.22324427548393\,(x - 1)

    y = 2.223244x − 1.381773

ਸੰਖਿਆਤਮਕ ਅਵਕਲਜ ਕੈਲਕੁਲੇਟਰ ਬਾਰੇ

The derivative f′(x₀) is the slope of f at x₀, the limit of the central difference quotient [f(x₀ + h) − f(x₀ − h)]/2h as h shrinks to 0. The calculator evaluates that quotient for h = 0.1 × max(1, |x₀|) and repeated halvings, then combines the results by Richardson extrapolation (Ridders' method, Numerical Recipes §5.7), which cancels the h², h⁴, … error terms one at a time and reaches about 20 significant digits. The second derivative uses [f(x₀ + h) − 2f(x₀) + f(x₀ − h)]/h² the same way.

Use it to check a derivative worked out by hand, to find a rate of change where no formula is convenient, or to get a tangent line. The default, x² sin x at x = 1, has derivative 2 sin 1 + cos 1 ≈ 2.2232443 and tangent line y = 2.223244x − 1.381773.

Trig functions use radians. When the slopes from the left and right disagree, f has a corner there and the calculator reports that instead of a number.

ਹੱਲ ਕੀਤੀਆਂ ਉਦਾਹਰਨਾਂ

d/dx x³ at x = 2

Function f(x)
x^3
At x =
2
ਅਵਕਲਜ
First f′(x)
ਅਵਕਲਜ
12
f(x₀)
8
Tangent line
y = 12x − 16

ਜਾਂਚ ਦਾ ਸਰੋਤ: 3x² = 12 at x = 2; tangent 8 + 12(x − 2)

d/dx sin x at 0 (radians)

Function f(x)
sin(x)
At x =
0
ਅਵਕਲਜ
First f′(x)
ਅਵਕਲਜ
1

ਜਾਂਚ ਦਾ ਸਰੋਤ: cos 0 = 1

d/dx x²·sin x at 1

Function f(x)
x^2 * sin(x)
At x =
1
ਅਵਕਲਜ
First f′(x)
ਅਵਕਲਜ
2.223244275484

ਜਾਂਚ ਦਾ ਸਰੋਤ: 2 sin 1 + cos 1 with sin/cos by Taylor series in Python decimal at 70 digits (hp.py)

d/dx eˣ at 1

Function f(x)
exp(x)
At x =
1
ਅਵਕਲਜ
First f′(x)
ਅਵਕਲਜ
2.718281828459

ਜਾਂਚ ਦਾ ਸਰੋਤ: e (Python Decimal(1).exp())

ਸਵਾਲ

What is a derivative?

The derivative of f at x₀ is the slope of its graph there: the limit of [f(x₀ + h) − f(x₀)]/h as h approaches 0. For f(x) = x³ at x = 2 the slope is 3 × 2² = 12, so near x = 2 the function rises about 12 units for each unit of x. The line y = 12x − 16, which touches the curve at (2, 8), is the tangent there.

How do you find a derivative numerically?

Evaluate a difference quotient with a small step h. The central quotient [f(x + h) − f(x − h)]/2h beats the one-sided [f(x + h) − f(x)]/h because its error shrinks like h² rather than h: for sin x at 0 with h = 0.1 it gives 0.998334 against the exact 1. A tiny h eventually fails through rounding error, so this calculator extrapolates from moderate steps instead.

What does the second derivative tell you?

The second derivative f″(x) is the rate of change of the slope, so it measures curvature: positive where the graph bends upward, negative where it bends downward. For ln x, f″(x) = −1/x², so f″(2) = −0.25. Numerically it comes from [f(x + h) − 2f(x) + f(x − h)]/h². Where f″ changes sign the graph has an inflection point.

How do you find the equation of a tangent line?

Use y = f(x₀) + f′(x₀)(x − x₀). For f(x) = x³ at x₀ = 2, f(2) = 8 and f′(2) = 12, so y = 8 + 12(x − 2) = 12x − 16. The tangent is also the best straight-line approximation to f near x₀: it estimates 2.1³ as 8 + 12 × 0.1 = 9.2, against the exact 9.261.

Why does a function have no derivative at some points?

The slopes from the left and the right must agree. |x| at 0 has slope −1 from the left and +1 from the right, a corner, so it has no derivative there, even though the central quotient averages to 0. A jump, or a vertical tangent such as the cube root of x at 0, also rules one out. The calculator compares one-sided quotients and reports the corner.

“ਸੰਖਿਆਤਮਕ ਅਵਕਲਜ ਕੈਲਕੁਲੇਟਰ” ਕਿੰਨਾ ਸਟੀਕ ਹੈ?

ਸਟੀਕਤਾ ਤੁਹਾਡੇ ਇਨਪੁੱਟਾਂ ਅਤੇ ਵਿਧੀ ਦੀਆਂ ਧਾਰਨਾਵਾਂ ਉੱਤੇ ਨਿਰਭਰ ਕਰਦੀ ਹੈ। ਦਸ਼ਮਲਵ ਗਣਨਾ 50 ਮਹੱਤਵਪੂਰਨ ਅੰਕ ਵਰਤਦੀ ਹੈ, ਪਰ ਅਨੁਮਾਨ, ਅੰਕੀ ਵਿਧੀਆਂ ਅਤੇ ਸਰੋਤ ਡਾਟਾ ਘੱਟ ਸਟੀਕ ਹੋ ਸਕਦੇ ਹਨ; ਦਿਖਾਏ ਮੁੱਲਾਂ ਨੂੰ ਗੋਲ ਕਰਨ ਨਾਲ ਇਹ ਹੱਦਾਂ ਦੂਰ ਨਹੀਂ ਹੁੰਦੀਆਂ। ਸੁਤੰਤਰ ਸਰੋਤਾਂ ਦੀਆਂ ਹੱਲ ਕੀਤੀਆਂ ਉਦਾਹਰਨਾਂ ਨਾਲ ਜਾਂਚ: 6। ਉਦਾਹਰਨ ਲਈ, “d/dx x³ at x = 2” ਦੀ ਜਾਂਚ 3x² = 12 at x = 2; tangent 8 + 12(x − 2) ਨਾਲ ਕੀਤੀ ਜਾਂਦੀ ਹੈ।

ਇਸ ਵਿਧੀ ਦਾ ਸਰੋਤ ਕੀ ਹੈ?

Press et al., Numerical Recipes (3rd ed.) §5.7 — numerical derivatives (Ridders' method); Wolfram MathWorld — Richardson Extrapolation.

ਇਸ ਕੈਲਕੁਲੇਟਰ ਬਾਰੇ

f′(x)=lim⁡h→0f(x+h)−f(x−h)2hf′′(x)=lim⁡h→0δ2fh2δ2f=f(x+h)−2f(x)+f(x−h)\begin{gathered} f'(x) = \lim_{h \to 0}\frac{f(x+h) - f(x-h)}{2h} \\[10pt] f''(x) = \lim_{h \to 0}\frac{\delta^2 f}{h^2} \\[4pt] \delta^2 f = f(x+h) - 2f(x) + f(x-h) \end{gathered}

ਸਰੋਤ

  1. Press et al., Numerical Recipes (3rd ed.) §5.7 — numerical derivatives (Ridders' method)
  2. Wolfram MathWorld — Richardson Extrapolation

ਹਵਾਲਿਆਂ ਨਾਲ ਜਾਂਚੇ ਗਏ

ਇਸ ਕੈਲਕੁਲੇਟਰ ਵਿੱਚ ਸੁਤੰਤਰ ਸਰੋਤਾਂ ਦੇ ਜਵਾਬਾਂ ਵਾਲੀਆਂ 6 ਹੱਲ ਕੀਤੀਆਂ ਉਦਾਹਰਨਾਂ ਹਨ। ਇਹ ਟੈਸਟ ਸਮੂਹ ਵਿੱਚ ਚੱਲਦੀਆਂ ਹਨ ਅਤੇ ਤੁਸੀਂ ਇੱਥੇ ਵੀ ਚਲਾ ਸਕਦੇ ਹੋ।

ਸੰਬੰਧਿਤ ਕੈਲਕੁਲੇਟਰ