When the base of a logarithm contains the variable, change to base \(e\) and use the quotient rule.
\[\log_{a} b = \frac{\ln b}{\ln a}\]
What it says
The base-\(a\) rule assumes the base is a fixed number. If the base moves with \(x\) — as in \(\log_{x}2\) — that assumption fails, and there is no separate rule to learn.
Instead, apply the change-of-base identity to turn the expression into a ratio of natural logarithms. Both parts are then ordinary functions of \(x\), and the quotient rule finishes the job.
This is a rewriting step rather than a differentiation rule, which is why the calculator lists it as its own line in the working: it records the moment the expression changed form.
When it applies
The base of a logarithm contains the differentiation variable.
Expressions such as \(\log_{x}2\) or \(\log_{x}(x + 1)\).
Any time base-\(e\) form would be easier to work with.
Five worked examples
Every line is the step the calculator would show, in the order it applies them. Each graph
is live: hover it to read both curves and see the tangent whose slope is the derivative,
drag to pan, scroll to zoom.
The pole at \(x = 1\) splits the graph into two branches that both fall. On the right the curve sinks toward zero from above; on the left it approaches zero from below, and f′ dives sharply near the pole on either side.
Negative for \(x > 1\): as the base grows, \(\log_{x}2\) falls.
Derivative Calculator would like your consent to use your data
Store and read cookies and similar identifiers on your device
Measure how the site is used, and — only if you allow it — personalise advertising
Learn more
How can I change my choice?
Open Privacy settings at the bottom of any page. Your answer can be changed or withdrawn at any time, and takes effect straight away.
What if I do not consent?
Everything still works. The calculator, the graph and every rule page run entirely in your browser, so refusing costs you nothing but the optional cookies.
Do I have to consent to everything?
No. Manage options lets you allow one category and refuse another, and nothing optional is switched on until you switch it on.
Necessary cookies keep the site working and are always on. Anything else — measurement and advertising — runs only with your permission, and no profile is built about you before you give it. Read the privacy policy
Data preferences
Choose what you allow
Each category is described below. Your choice is stored on this device and applies the moment you save it.
Strictly necessary
Keeps the site working: your light or dark theme, your recent expressions and the record of this consent choice. Nothing here identifies you, and it cannot be switched off.
Preferences
Remembers optional settings across visits, such as your language and the way you like results laid out.
Measurement
Counts visits and which rules people look up, so we know what to improve. Aggregated — never used to build a profile about you.
Advertising
Lets advertising partners use cookies to select and measure ads, including personalised ones. Refuse this and any ads shown stay non-personalised.