← Back to learning objective

Evaluate the indefinite integral of tan(x) using substitution

Recall that tan⁡(x)=sin⁡(x)cos⁡(x)\tan(x) = \dfrac{\sin(x)}{\cos(x)}.

Evaluate the indefinite integral ∫tan⁡(x) dx\int \tan(x)\, dx by first rewriting it as ∫sin⁡(x)cos⁡(x) dx\int \frac{\sin(x)}{\cos(x)}\, dx and then using an appropriate substitution. Write your final answer in terms of xx, including the constant of integration CC.

Hint

Let u=cos⁡(x)u = \cos(x). Then find dudu in terms of sin⁡(x) dx\sin(x)\,dx, and rewrite the integral entirely in terms of uu before integrating.

Step-by-step solution

Let u=cos⁡(x)u = \cos(x), so du=−sin⁡(x) dxdu = -\sin(x)\,dx, which means sin⁡(x) dx=−du\sin(x)\,dx = -du. Substituting into the integral gives ∫sin⁡(x)cos⁡(x) dx=∫−duu=−∫1u du.\int \frac{\sin(x)}{\cos(x)}\,dx = \int \frac{-du}{u} = -\int \frac{1}{u}\,du.

Integrating gives −∫1u du=−ln⁡∣u∣+C-\int \frac{1}{u}\,du = -\ln|u| + C. Substituting back u=cos⁡(x)u = \cos(x) yields the final answer ∫tan⁡(x) dx=−ln⁡∣cos⁡(x)∣+C.\int \tan(x)\,dx = -\ln|\cos(x)| + C.

Identifying the substitution variable in the tangent integral

Hint
Step-by-step solution

The substitution used was u equals cosine of x. This choice was made because the derivative of cosine is negative sine, which matched the sine term already present in the numerator. That allowed the entire integral to be rewritten purely in terms of u before integrating. The answer is cosine.

Related problems

Practice similar Calculus problems interactively.

Start Closing the Gap