Find the indefinite integral of 1-tanx/1+tanx

Dont know how to really approach this question. Should i use identities, or is there a power series i can use?

There are standard formulae for integrals of rational functions of trigonometric formulae. In this case, you can simplify things as follows.

Let's use the abbreviation:

t = tan(x)

s = sin(x)

c = cos(x)

We can write:

(1-t)/(1+t) =

(c-s)/(c+s) =

(c - s)^2/(c^2 - s^2) =

(c^2 + s^2 - 2cs)/(c^2 - s^2)

Then use the trigonometric identities:

c^2 + s^2 = 1

2 cs = sin(2x)

c^2 - s^2 = cos(2x)

to obtain:

(1-t)/(1+t) =

1/(cos(2x)) - tan(2x)

Integrating tan(2x) is trivial. You can integrate 1/cos(2x) e.g. by putting
x = (pi/4 - u), so that cos(2x) =
sin(2u. Then

1/sin(2u) =

[cos^2(u) + sin^2(u)]/[2 sin(u)cos(u)] =

1/2 [cot(u) + tan(u)]

which is trivial to integrate.

how did you get from (c-s)/(c+s) to

(c - s)^2/(c^2 - s^2)?

Multiply numerator and denominator by (c-s).

thanks

To find the indefinite integral of 1 - tan(x) / (1 + tan(x)), we can simplify the expression using trigonometric identities before integrating.

First, let's use the identity tan(x) = sin(x) / cos(x) to rewrite the integrand:
1 - tan(x) / (1 + tan(x))
= 1 - (sin(x) / cos(x)) / (1 + sin(x) / cos(x))
= 1 - (sin(x) / cos(x)) / ((cos(x) + sin(x)) / cos(x))
= 1 - sin(x) / (cos(x) + sin(x))
= (cos(x) + sin(x) - sin(x)) / (cos(x) + sin(x))
= cos(x) / (cos(x) + sin(x))

Now, we can proceed with integrating cos(x) / (cos(x) + sin(x)). One way to go about this is to use a substitution.

Let u = cos(x) + sin(x). Then, differentiate both sides with respect to x:
du/dx = -sin(x) + cos(x)

Rearranging the equation, we have:
du = (-sin(x) + cos(x)) dx

Now, we can substitute these variables in the integral:
∫ (cos(x) / (cos(x) + sin(x))) dx
= ∫ (1/u) du

After making the substitution, the integral becomes much simpler:
∫ (1/u) du = ln|u| + C

Substituting back u = cos(x) + sin(x):
∫ (1 - tan(x) / (1 + tan(x))) dx = ln|cos(x) + sin(x)| + C

So, the indefinite integral of 1 - tan(x) / (1 + tan(x)) is ln|cos(x) + sin(x)| + C, where C is the constant of integration.