Solveeit Logo

Question

Question: $\int \frac{2-\tan x}{3+\tan x} dx =$...

2tanx3+tanxdx=\int \frac{2-\tan x}{3+\tan x} dx =

Answer

12x+12ln3cosx+sinx+C\frac{1}{2}x + \frac{1}{2} \ln|3\cos x + \sin x| + C

Explanation

Solution

The problem asks us to evaluate the integral 2tanx3+tanxdx\int \frac{2-\tan x}{3+\tan x} dx.

1. Rewrite the integrand in terms of sine and cosine:

The first step is to express tanx\tan x as sinxcosx\frac{\sin x}{\cos x} in the integrand:

2tanx3+tanx=2sinxcosx3+sinxcosx=2cosxsinxcosx3cosx+sinxcosx=2cosxsinx3cosx+sinx\frac{2-\tan x}{3+\tan x} = \frac{2-\frac{\sin x}{\cos x}}{3+\frac{\sin x}{\cos x}} = \frac{\frac{2\cos x - \sin x}{\cos x}}{\frac{3\cos x + \sin x}{\cos x}} = \frac{2\cos x - \sin x}{3\cos x + \sin x}

So the integral becomes:

I=2cosxsinx3cosx+sinxdxI = \int \frac{2\cos x - \sin x}{3\cos x + \sin x} dx

2. Express the numerator as a linear combination of the denominator and its derivative:

This is a standard technique for integrals of the form Acosx+BsinxCcosx+Dsinxdx\int \frac{A\cos x + B\sin x}{C\cos x + D\sin x} dx. Let the numerator be N(x)=2cosxsinxN(x) = 2\cos x - \sin x and the denominator be D(x)=3cosx+sinxD(x) = 3\cos x + \sin x. The derivative of the denominator is D(x)=ddx(3cosx+sinx)=3sinx+cosxD'(x) = \frac{d}{dx}(3\cos x + \sin x) = -3\sin x + \cos x.

We want to find constants λ\lambda and μ\mu such that N(x)=λD(x)+μD(x)N(x) = \lambda D(x) + \mu D'(x).

2cosxsinx=λ(3cosx+sinx)+μ(cosx3sinx)2\cos x - \sin x = \lambda (3\cos x + \sin x) + \mu (\cos x - 3\sin x)

2cosxsinx=(3λ+μ)cosx+(λ3μ)sinx2\cos x - \sin x = (3\lambda + \mu)\cos x + (\lambda - 3\mu)\sin x

Comparing the coefficients of cosx\cos x and sinx\sin x on both sides:

For cosx\cos x: 3λ+μ=2(1)3\lambda + \mu = 2 \quad \cdots(1)

For sinx\sin x: λ3μ=1(2)\lambda - 3\mu = -1 \quad \cdots(2)

From equation (2), we can express λ=3μ1\lambda = 3\mu - 1. Substitute this into equation (1):

3(3μ1)+μ=23(3\mu - 1) + \mu = 2

9μ3+μ=29\mu - 3 + \mu = 2

10μ=510\mu = 5

μ=510=12\mu = \frac{5}{10} = \frac{1}{2}

Now substitute the value of μ\mu back into the expression for λ\lambda:

λ=3(12)1=321=12\lambda = 3\left(\frac{1}{2}\right) - 1 = \frac{3}{2} - 1 = \frac{1}{2}

So, the numerator can be written as:

2cosxsinx=12(3cosx+sinx)+12(cosx3sinx)2\cos x - \sin x = \frac{1}{2}(3\cos x + \sin x) + \frac{1}{2}(\cos x - 3\sin x)

3. Substitute back into the integral and integrate:

Now, substitute this expression for the numerator back into the integral:

I=12(3cosx+sinx)+12(cosx3sinx)3cosx+sinxdxI = \int \frac{\frac{1}{2}(3\cos x + \sin x) + \frac{1}{2}(\cos x - 3\sin x)}{3\cos x + \sin x} dx

I=(12+12cosx3sinx3cosx+sinx)dxI = \int \left( \frac{1}{2} + \frac{1}{2} \frac{\cos x - 3\sin x}{3\cos x + \sin x} \right) dx

We can split this into two simpler integrals:

I=121dx+12cosx3sinx3cosx+sinxdxI = \frac{1}{2} \int 1 \, dx + \frac{1}{2} \int \frac{\cos x - 3\sin x}{3\cos x + \sin x} dx

The first integral is straightforward: 121dx=12x\frac{1}{2} \int 1 \, dx = \frac{1}{2}x.

For the second integral, let u=3cosx+sinxu = 3\cos x + \sin x. Then, du=(3sinx+cosx)dx=(cosx3sinx)dxdu = (-3\sin x + \cos x) dx = (\cos x - 3\sin x) dx. So the second integral becomes:

121udu=12lnu+C=12ln3cosx+sinx+C\frac{1}{2} \int \frac{1}{u} du = \frac{1}{2} \ln|u| + C' = \frac{1}{2} \ln|3\cos x + \sin x| + C'

Combining both parts, the complete integral is:

I=12x+12ln3cosx+sinx+CI = \frac{1}{2}x + \frac{1}{2} \ln|3\cos x + \sin x| + C

where CC is the constant of integration.