Tutorials › AP Calculus › Trigonometric Terms in Implicit Equations

Implicit Differentiation · Tutorial 187 of 999

Trigonometric Terms in Implicit Equations

Use the chain rule to differentiate trigonometric expressions in an implicit relation, then isolate dy/dx while checking the conditions that make the calculation valid.

Intermediate 9 min read

What You'll Learn

  • Differentiate sine, cosine, and tangent terms when their inputs depend on x and y
  • Apply the chain rule to expressions such as sin(xy) and tan(x + y)
  • Collect all terms containing dy/dx and solve the resulting linear equation
  • Identify where tangent terms are undefined and where the implicit slope formula has a zero denominator
  • Check a proposed derivative by substituting it into the differentiated relation

Why Trigonometric Terms Need Care in Implicit Differentiation

When an equation relates \(x\) and \(y\), differentiating with respect to \(x\) means that \(y\) is treated as a function of \(x\). This matters especially when a trigonometric expression contains \(y\): its input changes as \(x\) changes, so the chain rule introduces a factor of \(\frac{dy}{dx}\).

The same idea applies when the input combines both variables. For example, the derivative of \(\sin(xy)\) involves the derivative of the entire input \(xy\), not just the derivative of the sine function. After differentiating every term, the result is usually a linear equation in \(\frac{dy}{dx}\). The goal is to collect those terms and solve for the slope.

Key idea: Differentiate each trigonometric function using the chain rule, treating \(y\) as dependent on \(x\). Then gather every term containing \(\frac{dy}{dx}\) before solving.

The Chain Rule for Trigonometric Terms

For a differentiable input \(u=u(x)\), the familiar derivatives are \(\frac{d}{dx}\sin u=\cos u\cdot\frac{du}{dx}\), \(\frac{d}{dx}\cos u=-\sin u\cdot\frac{du}{dx}\), and \(\frac{d}{dx}\tan u=\sec^2u\cdot\frac{du}{dx}\). The tangent formula applies where \(\cos u\ne 0\), so that \(\tan u\) is defined.

In implicit differentiation, an input may depend on \(x\) both directly and through \(y\). If \(u=u(x,y)\) and \(y=y(x)\), the multivariable chain rule gives \(\frac{du}{dx}=u_x+u_y\frac{dy}{dx}\), where \(u_x\) and \(u_y\) are the partial derivatives of \(u\) with respect to its indicated variables. Consequently, the derivative of \(\sin(u(x,y))\) is \(\cos(u)(u_x+u_y\frac{dy}{dx})\). The corresponding cosine and tangent derivatives use \(-\sin(u)\) and \(\sec^2(u)\) in place of \(\cos(u)\).

$$ \begin{aligned} \frac{d}{dx}\sin(u(x,y))&=\cos(u)\left(u_x+u_y\frac{dy}{dx}\right),\\ \frac{d}{dx}\cos(u(x,y))&=-\sin(u)\left(u_x+u_y\frac{dy}{dx}\right),\\ \frac{d}{dx}\tan(u(x,y))&=\sec^2(u)\left(u_x+u_y\frac{dy}{dx}\right). \end{aligned} $$

These formulas are applications of the ordinary chain rule: first regard \(u(x,y(x))\) as a single function of \(x\), differentiate that input, and multiply by the derivative of the outer trigonometric function. They explain why an input involving \(y\) contributes a \(\frac{dy}{dx}\) factor.

Condition: Every trigonometric term must be defined at the point under consideration. In particular, a tangent term \(\tan(u)\) requires \(\cos(u)\ne 0\). To solve the differentiated equation for \(\frac{dy}{dx}\), its coefficient must also be nonzero.

A Reliable Differentiation Process

The procedure is the same whether the trigonometric input is \(y\), \(xy\), or a longer expression in both variables. Differentiate both sides with respect to \(x\), applying the chain rule to each trigonometric term. Then move all terms involving \(\frac{dy}{dx}\) to one side and all other terms to the other side. Finally, divide by the coefficient of \(\frac{dy}{dx}\), provided that coefficient is not zero.

1
Differentiate each term.
For a trig term, differentiate the outer sine, cosine, or tangent and multiply by the derivative of its full input.
2
Keep track of dependence on \(y\).
Whenever differentiating an input produces a term involving \(\frac{dy}{dx}\), retain it explicitly.
3
Collect and solve.
Gather all \(\frac{dy}{dx}\) terms, factor, and divide only when the resulting coefficient is nonzero.

Worked Examples

Worked Example: A Sine Term in x and a Cosine Term in y

Find \(\frac{dy}{dx}\) from the relation \(\sin x+\cos y=0\), assuming \(y\) is differentiable as a function of \(x\).

Differentiate each term. The derivative of \(\sin x\) is \(\cos x\). For \(\cos y\), the outer derivative is \(-\sin y\), and the derivative of its input \(y\) is \(\frac{dy}{dx}\):

$$\cos x-\sin y\frac{dy}{dx}=0.$$

Move the non-\(\frac{dy}{dx}\) term to the other side and divide by \(\sin y\), provided \(\sin y\ne 0\):

$$-\sin y\frac{dy}{dx}=-\cos x,\qquad \frac{dy}{dx}=\frac{\cos x}{\sin y}.$$

Check by substituting this expression into the differentiated relation:

$$\cos x-\sin y\left(\frac{\cos x}{\sin y}\right)=\cos x-\cos x=0.$$

Thus the expression satisfies the differentiated equation wherever \(\sin y\ne 0\). If \(\sin y=0\), this division is not valid, and the differentiated equation does not determine \(\frac{dy}{dx}\) by this step.

Worked Example: Sine of a Product and Cosine of y

Find \(\frac{dy}{dx}\) from \(\sin(xy)+\cos y=0\), assuming \(y\) is differentiable and the coefficient needed for division is nonzero.

The input of the sine is \(xy\). By the product rule, \(\frac{d}{dx}(xy)=y+x\frac{dy}{dx}\). The cosine term contributes \(-\sin y\frac{dy}{dx}\). Therefore, differentiation gives

$$\cos(xy)\left(y+x\frac{dy}{dx}\right)-\sin y\frac{dy}{dx}=0.$$

Distribute \(\cos(xy)\), then collect the terms containing \(\frac{dy}{dx}\):

$$y\cos(xy)+x\cos(xy)\frac{dy}{dx}-\sin y\frac{dy}{dx}=0,$$
$$\left(x\cos(xy)-\sin y\right)\frac{dy}{dx}=-y\cos(xy).$$

When \(x\cos(xy)-\sin y\ne 0\), division yields

$$\frac{dy}{dx}=\frac{-y\cos(xy)}{x\cos(xy)-\sin y}.$$

Check the result in the differentiated equation after collecting terms. Writing \(A=x\cos(xy)-\sin y\), the substituted left side is

$$y\cos(xy)+A\left(\frac{-y\cos(xy)}{A}\right)=y\cos(xy)-y\cos(xy)=0.$$

This verifies the algebra for \(A\ne 0\), the condition required for the division.

Worked Example: A Tangent Term with x and y

Find \(\frac{dy}{dx}\) from \(\tan(x+y)+y=x\), at points where the tangent is defined.

The input of the tangent is \(x+y\), whose derivative is \(1+\frac{dy}{dx}\). Differentiating the equation gives

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

Distribute the factor \(\sec^2(x+y)\) and collect the derivative terms:

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

Since \(\sec^2(x+y)+1>0\) wherever the tangent is defined, the coefficient is nonzero. Hence

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

For a check, substitute into the differentiated equation. Its left side becomes

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

which equals the right side. The original relation requires \(\cos(x+y)\ne 0\), as does the tangent derivative.

Why Collecting the Derivative Terms Works

After differentiation, each occurrence of \(\frac{dy}{dx}\) appears multiplied by a factor that may depend on \(x\) and \(y\). No product of two \(\frac{dy}{dx}\) terms is introduced by differentiating a relation once: the chain rule differentiates each input once, and the product rule differentiates one factor at a time. Thus, after simplifying, the equation has the form \(A(x,y)\frac{dy}{dx}=B(x,y)\), where \(A\) and \(B\) are expressions in the variables.

If \(A(x,y)\ne 0\), division gives \(\frac{dy}{dx}=\frac{B(x,y)}{A(x,y)}\). This is why collecting the derivative terms is not just a bookkeeping preference: it exposes the coefficient that must be nonzero to determine the slope in this way. If that coefficient vanishes, the rearranged equation cannot be divided by it; one must not use the resulting quotient at that point.

Takeaway: The chain rule gives the derivative of each trigonometric composition. Collecting \(\frac{dy}{dx}\) then produces a linear equation; its coefficient must be nonzero wherever you divide to obtain an implicit derivative formula.

Common Mistake: Forgetting the Derivative of the Input

A frequent error is to differentiate \(\cos y\) as though its input were \(x\). The incorrect calculation is

$$\frac{d}{dx}\cos y=-\sin y.$$

This omits the derivative of \(y\) with respect to \(x\). Since \(y\) depends on \(x\), the chain rule gives the correct calculation:

$$\frac{d}{dx}\cos y=-\sin y\frac{dy}{dx}.$$

The same check is useful for an input involving both variables. For example, \(\frac{d}{dx}\tan(x+y)\) is not just \(\sec^2(x+y)\); the derivative of the input must also be included:

$$\frac{d}{dx}\tan(x+y)=\sec^2(x+y)\left(1+\frac{dy}{dx}\right).$$

Whenever differentiating a trigonometric term, identify its entire input first. Then differentiate that input before moving on to collect derivative terms.

Check Your Understanding

For each question, keep the full trigonometric input visible while differentiating.

  1. Differentiate \(\sin y+\cos x=0\) with respect to \(x\), and solve for \(\frac{dy}{dx}\) when the coefficient permits division.
  2. What factor must accompany \(-\sin(xy)\) when differentiating \(\cos(xy)\) with respect to \(x\)?
  3. Differentiate \(\tan(2x-y)\), expressing the result in terms of \(x\), \(y\), and \(\frac{dy}{dx}\).
  4. In an equation whose differentiated form is \(A(x,y)\frac{dy}{dx}=B(x,y)\), what condition permits division to solve for \(\frac{dy}{dx}\)?
  5. Why is \(\frac{d}{dx}\sin y=\cos y\) generally incomplete when \(y\) depends on \(x\)?

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