Tutorials › AP Calculus › Exponential and Logarithmic Terms in Implicit Equations

Implicit Differentiation · Tutorial 188 of 999

Exponential and Logarithmic Terms in Implicit Equations

Use the chain rule to differentiate exponential and logarithmic terms involving \(y\), while checking domains and the conditions needed to isolate \(dy/dx\).

Intermediate 9 min read

What You'll Learn

  • Differentiate \(e^{y}\) and other exponential expressions when \(y\) depends on \(x\)
  • Apply the chain rule to logarithms whose arguments involve both \(x\) and \(y\)
  • Check that logarithm arguments are positive before differentiating
  • Collect terms involving \(dy/dx\) and solve when their coefficient is nonzero
  • Verify an implicit derivative by substituting it into the differentiated equation

Why These Terms Need Care

When an equation relates \(x\) and \(y\), implicit differentiation treats \(y\) as a quantity that may change with \(x\). The chain rule therefore matters whenever an exponential or logarithmic expression contains \(y\). For example, the derivative of \(e^y\) is not simply \(e^y\): it is \(e^y\frac{dy}{dx}\).

Logarithms require an additional check. A real logarithm is defined only when its argument is positive, so a relation containing \(\ln(y)\) is restricted to points where \(y>0\). After checking the domain, differentiate both sides, keep the chain-rule factors, and collect all terms involving \(\frac{dy}{dx}\).

Key idea: If \(y\) depends differentiably on \(x\), then \(\frac{d}{dx}e^y=e^y\frac{dy}{dx}\), and, wherever \(y>0\), \(\frac{d}{dx}\ln(y)=\frac{1}{y}\frac{dy}{dx}\). More complicated arguments require the chain rule as well.

Rules for Exponential and Logarithmic Terms

For a differentiable function \(u=u(x)\), the chain rule gives \(\frac{d}{dx}e^{u}=e^{u}u'\). If \(u(x)>0\), then \(\frac{d}{dx}\ln(u)=\frac{u'}{u}\). In an implicit equation, the inner expression \(u\) can involve both \(x\) and \(y\), so its derivative may contain a \(\frac{dy}{dx}\) term.

For instance, if \(u=x+y\), then \(u'=1+\frac{dy}{dx}\). If \(u=xy\), the product rule gives \(u'=y+x\frac{dy}{dx}\). Those inner derivatives must remain attached to the outer exponential or logarithmic derivative.

Domain condition: A real-valued term \(\ln(u)\) is defined only where \(u>0\). Check that condition for every logarithm in the original relation before differentiating. Exponential expressions such as \(e^u\) are defined for every real \(u\).

The derivative equation may contain several terms with \(\frac{dy}{dx}\). One can solve for that derivative if its total coefficient is nonzero. If the coefficient is zero, the rearrangement does not give a derivative formula at that point; dividing by zero is not valid.

Why the Chain-Rule Factors Appear

Assume \(y=y(x)\) is differentiable on an interval. The expression \(e^{y(x)}\) is a composition: the outer function is the exponential function, and the inner function is \(y(x)\). The chain rule says the derivative of an outer function evaluated at an inner function is the outer derivative evaluated there, multiplied by the inner derivative.

$$ \frac{d}{dx}e^{y(x)} = \left.\frac{d}{du}e^u\right|_{u=y(x)}\frac{dy}{dx} = e^y\frac{dy}{dx}. $$

For the logarithm, the same reasoning applies on an interval where \(y(x)>0\). The derivative of \(\ln u\) is \(1/u\), so substituting \(u=y(x)\) and multiplying by the inner derivative gives:

$$ \frac{d}{dx}\ln(y(x)) = \left.\frac{1}{u}\right|_{u=y(x)}\frac{dy}{dx} = \frac{1}{y}\frac{dy}{dx}. $$

These are not special rules that treat \(y\) as a constant. They are direct applications of the chain rule to functions of \(x\).

Worked Examples

Worked Example: An Exponential Term in \(y\)

Find \(\frac{dy}{dx}\) from \(e^y+x^2=3x\), assuming \(y\) is differentiable as a function of \(x\).

There is no logarithm, so the relation has no logarithm-domain restriction. Differentiate both sides with respect to \(x\). The chain rule applies to \(e^y\), and the power rule applies to \(x^2\):

$$ \frac{d}{dx}(e^y)+\frac{d}{dx}(x^2)=\frac{d}{dx}(3x) $$
$$ e^y\frac{dy}{dx}+2x=3. $$

Move \(2x\) to the right, then divide by \(e^y\). Since \(e^y>0\) for every real \(y\), this division is valid:

$$ e^y\frac{dy}{dx}=3-2x, \qquad \frac{dy}{dx}=\frac{3-2x}{e^y}. $$

Check by substituting this expression into the differentiated equation:

$$ e^y\left(\frac{3-2x}{e^y}\right)+2x = 3-2x+2x = 3. $$

This recovers the derivative of the right-hand side, so the result satisfies the differentiated relation.

Worked Example: A Logarithm of \(y\) and a Product

Find \(\frac{dy}{dx}\) from \(\ln(y)+xy=x^2\). The logarithm requires \(y>0\), and that condition must hold wherever this real-valued relation is considered.

Differentiate each term. The chain rule gives \(\frac{1}{y}\frac{dy}{dx}\) for \(\ln(y)\). The product rule gives \(y+x\frac{dy}{dx}\) for \(xy\):

$$ \frac{1}{y}\frac{dy}{dx}+y+x\frac{dy}{dx}=2x. $$

Group the derivative terms and move the remaining \(y\) to the other side:

$$ \left(\frac{1}{y}+x\right)\frac{dy}{dx}=2x-y. $$

When \(x+\frac{1}{y}\ne 0\), divide by that coefficient:

$$ \frac{dy}{dx} = \frac{2x-y}{x+\frac{1}{y}}. $$

The condition \(y>0\) comes from the original logarithm. The additional condition \(x+\frac{1}{y}\ne0\) is required for this algebraic formula. Check the result in the differentiated equation:

$$ \left(\frac{1}{y}+x\right) \left(\frac{2x-y}{x+\frac{1}{y}}\right)+y = 2x-y+y = 2x. $$

Thus the expression satisfies the differentiated equation whenever its denominator is nonzero and the original logarithm is defined.

Worked Example: A Logarithm and an Exponential with the Same Inner Expression

Find \(\frac{dy}{dx}\) from \(\ln(x+y)=e^y\). The logarithm requires \(x+y>0\). The exponential imposes no additional real-domain restriction.

For the logarithm, the inner expression \(x+y\) has derivative \(1+\frac{dy}{dx}\). For the exponential, the inner expression \(y\) has derivative \(\frac{dy}{dx}\). Therefore:

$$ \frac{1+\frac{dy}{dx}}{x+y} = e^y\frac{dy}{dx}. $$

Multiply both sides by \(x+y\), which is positive on the logarithm's domain:

$$ 1+\frac{dy}{dx} = (x+y)e^y\frac{dy}{dx}. $$

Move the derivative term on the left to the right, then factor out \(\frac{dy}{dx}\):

$$ 1 = \left((x+y)e^y-1\right)\frac{dy}{dx}. $$

If \((x+y)e^y-1\ne0\), division gives:

$$ \frac{dy}{dx} = \frac{1}{(x+y)e^y-1}. $$

To check, substitute into the equation obtained after multiplying by \(x+y\):

$$ 1+\frac{1}{(x+y)e^y-1} = \frac{(x+y)e^y}{(x+y)e^y-1} = (x+y)e^y\left(\frac{1}{(x+y)e^y-1}\right). $$

Both sides agree. The domain condition \(x+y>0\) and the nonzero coefficient condition are distinct: the first makes the original logarithm meaningful, while the second permits solving for the derivative.

Worked Example: A Product Inside an Exponential and a Logarithmic Difference

Find \(\frac{dy}{dx}\) from \(e^{xy}+\ln(y-x)=4\). The logarithm requires \(y-x>0\). The product \(xy\) is the inner expression of the exponential.

Differentiate \(xy\) using the product rule: its derivative is \(y+x\frac{dy}{dx}\). The inner expression \(y-x\) has derivative \(\frac{dy}{dx}-1\). Applying the chain rule to both outer functions gives:

$$ e^{xy}\left(y+x\frac{dy}{dx}\right) + \frac{\frac{dy}{dx}-1}{y-x} = 0. $$

Expand and collect terms containing \(\frac{dy}{dx}\):

$$ ye^{xy}+xe^{xy}\frac{dy}{dx} +\frac{1}{y-x}\frac{dy}{dx} -\frac{1}{y-x} = 0, $$
$$ \left(xe^{xy}+\frac{1}{y-x}\right)\frac{dy}{dx} = \frac{1}{y-x}-ye^{xy}. $$

Provided \(xe^{xy}+\frac{1}{y-x}\ne0\), divide to obtain:

$$ \frac{dy}{dx} = \frac{\frac{1}{y-x}-ye^{xy}} {xe^{xy}+\frac{1}{y-x}}. $$

Check by substituting this expression into the collected equation. The left-hand side becomes:

$$ \left(xe^{xy}+\frac{1}{y-x}\right) \frac{\frac{1}{y-x}-ye^{xy}} {xe^{xy}+\frac{1}{y-x}} = \frac{1}{y-x}-ye^{xy}, $$

which is exactly its right-hand side. The check confirms the algebra, while \(y-x>0\) ensures the original logarithm is defined.

A Reliable Differentiation Process

These examples use the same sequence of decisions. Keeping domain checks and algebra separate helps prevent errors.

1
Check the original relation's domain.
For every real logarithm \(\ln(u)\), require \(u>0\).
2
Differentiate each side with respect to \(x\).
Treat \(y\) as depending on \(x\), and apply the chain rule to every exponential or logarithmic composition.
3
Collect all derivative terms.
Move terms so that every term containing \(\frac{dy}{dx}\) is on one side.
4
Check the coefficient before dividing.
Divide by that coefficient only when it is nonzero.
5
Verify the result.
Substitute the proposed derivative into the differentiated equation and check that both sides agree.

Common Mistake: Dropping the Inner Derivative

A frequent error is to differentiate \(e^y\) as though \(y\) were a constant, writing \(\frac{d}{dx}(e^y)=e^y\). That omits the chain-rule factor and generally changes the answer.

For the relation \(e^y+x^2=3x\), the incorrect calculation would be:

$$ e^y+2x=3 \quad\Longrightarrow\quad e^y=3-2x. $$

This is not the differentiated equation because \(y\) depends on \(x\). The correct calculation is:

$$ e^y\frac{dy}{dx}+2x=3, \qquad \frac{dy}{dx}=\frac{3-2x}{e^y}. $$

A related logarithm error is to differentiate \(\ln(x+y)\) as \(\frac{1}{x+y}\) without differentiating its inner expression. The correct derivative is \(\frac{1+\frac{dy}{dx}}{x+y}\). The factor \(1+\frac{dy}{dx}\) is essential.

Why Domain and Coefficient Checks Matter

There are two different checks in these problems. First, the original equation must make sense as a real equation. A logarithm such as \(\ln(y-x)\) requires \(y-x>0\). Second, after differentiation, the coefficient of \(\frac{dy}{dx}\) must be nonzero if the goal is to isolate that derivative by division.

These conditions should not be confused. A point can satisfy the logarithm's domain condition while making the coefficient zero. In that case the differentiated equation may not allow the usual solved formula there. Conversely, a formal derivative expression does not make a logarithm valid where its argument is nonpositive.

Implicit equations can combine several compositions, products, and logarithms. The reliable approach is to identify each inner expression, differentiate it accurately, keep every chain-rule factor, and only then simplify. This produces a derivative formula whose algebra and domain conditions can both be checked.

Check Your Understanding

For each question, keep the original relation's domain separate from any condition needed to divide by a coefficient.

  1. Differentiate \(e^{2y}+x=5\) implicitly and state the condition needed to solve for \(\frac{dy}{dx}\).
  2. For \(\ln(x-y)=x\), state the logarithm's domain condition and write the differentiated equation.
  3. Differentiate \(\ln(y)+e^x=xy\), stating the domain restriction.
  4. In \(\ln(x+y)=e^y\), identify the inner derivative for each composed expression before solving for \(\frac{dy}{dx}\).
  5. Explain why a zero coefficient of \(\frac{dy}{dx}\) does not permit division when rearranging an implicit derivative equation.

Test yourself: AP Calculus practice exams

Ready to check what you know? Work an AP-style practice exam, then open the full solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers all of AP Calculus AB & BC: full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon
Clinical Biostats