Question:

$\int\frac{\tan x+\cot x}{1+\tan^{2}x}dx$ is equal to

Show Hint

Logic Tip: The identity $\tan x + \cot x = \frac{1}{\sin x \cos x}$ appears very frequently in integration problems. Memorizing this transformation will save you multiple algebraic steps during the exam.
Updated On: Apr 27, 2026
  • $\log|\sin x|+C$
  • $2\log|\sin x|+C$
  • $\log|\cos x|+C$
  • $\log|\tan x|+C$
  • $2\log|\tan x|+C$
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is A

Solution and Explanation

Concept:
Trigonometric integrals containing tangent and cotangent are often much easier to solve if first simplified by converting everything to fundamental sines and cosines or by utilizing Pythagorean identities.
Step 1: Simplify the denominator.
Using the Pythagorean identity $1 + \tan^2 x = \sec^2 x$: $$\int \frac{\tan x + \cot x}{\sec^2 x} dx$$
Step 2: Convert to sine and cosine.
Substitute $\tan x = \frac{\sin x}{\cos x}$, $\cot x = \frac{\cos x}{\sin x}$, and $\sec^2 x = \frac{1}{\cos^2 x}$: $$= \int \frac{\frac{\sin x}{\cos x} + \frac{\cos x}{\sin x}}{\frac{1}{\cos^2 x}} dx$$
Step 3: Find a common denominator for the numerator.
$$= \int \frac{\frac{\sin^2 x + \cos^2 x}{\sin x \cos x}}{\frac{1}{\cos^2 x}} dx$$ Since $\sin^2 x + \cos^2 x = 1$: $$= \int \frac{\frac{1}{\sin x \cos x}}{\frac{1}{\cos^2 x}} dx$$
Step 4: Simplify the complex fraction.
Multiply by the reciprocal of the denominator: $$= \int \frac{1}{\sin x \cos x} \cdot \cos^2 x \ dx$$ Cancel one $\cos x$: $$= \int \frac{\cos x}{\sin x} dx$$ $$= \int \cot x \ dx$$
Step 5: Integrate the standard function.
The integral of $\cot x$ is a standard formula: $$= \log|\sin x| + C$$
Was this answer helpful?
0
0