1. Basic Derivative Calculator — Theory
This calculator computes the first derivative of a function and plots both
\(f(x)\) and \(f'(x)\). You can differentiate with respect to \(x\) (ordinary derivative)
or \(y,z\) (basic partial derivatives), treating the other variables as constants.
1) What the derivative means
The derivative measures the instantaneous rate of change of a function. Formally:
\[
f'(a)=\lim_{h\to 0}\frac{f(a+h)-f(a)}{h}
\]
Geometrically, \(f'(a)\) is the slope of the tangent line to the curve \(y=f(x)\) at \(x=a\).
2) Main differentiation rules used
- Constant rule: \(\dfrac{d}{dx}(c)=0\)
- Power rule: \(\dfrac{d}{dx}(x^n)=n x^{n-1}\)
- Sum rule: \(\dfrac{d}{dx}(u+v)=u'+v'\)
- Product rule: \((uv)'=u'v+uv'\)
- Quotient rule: \(\left(\dfrac{u}{v}\right)'=\dfrac{u'v-uv'}{v^2}\)
- Chain rule: \(\dfrac{d}{dx}f(g(x))=f'(g(x))\,g'(x)\)
3) Common function derivatives
\[
\frac{d}{dx}\sin(x)=\cos(x),\quad
\frac{d}{dx}\cos(x)=-\sin(x),\quad
\frac{d}{dx}\tan(x)=\sec^2(x)=\frac{1}{\cos^2(x)}
\]
\[
\frac{d}{dx}\ln(x)=\frac{1}{x},\quad
\frac{d}{dx}\log_{10}(x)=\frac{1}{x\ln 10},\quad
\frac{d}{dx}e^{x}=e^{x},\quad
\frac{d}{dx}\sqrt{x}=\frac{1}{2\sqrt{x}}
\]
4) Input syntax and the cos^2(2x) shorthand
You can type expressions using +, -, *, /, and ^, along with:
\(\sin,\cos,\tan,\ln,\log,\sqrt{\phantom{x}},\lvert\cdot\rvert,\exp\).
The calculator supports implicit multiplication: 2x, (x+1)(x-1), 2sin(x).
Additionally, it supports the common “power-of-function” shorthand:
\[
\cos^2(2x)\quad \text{is interpreted as}\quad (\cos(2x))^2
\]
The same applies to sin^3(x), tan^4(…), ln^2(…), etc.
(The exponent must be a plain integer and the function argument must be in parentheses.)
5) Graph controls
- Drag to pan.
- Mouse wheel / pinch to zoom.
- Auto fit centers the view and chooses a scale that fits both \(f\) and \(f'\).
This chapter’s derivative graph is designed to allow very large zoom-out, so you can inspect behavior over wide ranges.
6) Notes and limitations
-
If your function includes \(y\) or \(z\), the graph still uses \(x\) as the horizontal axis.
The values of \(y\) and \(z\) are treated as constants (you can set them in the UI).
-
\(\lvert u\rvert\) is not differentiable at points where \(u=0\). The tool uses \(\dfrac{u}{\lvert u\rvert}u'\) away from those points.
-
Functions may have discontinuities or vertical asymptotes; the plot will break the curve where values are not finite.