How do I solve for k in an equation with integrals?

#\int_0^k \frac{sec^2(x)}{1 + tan(x)} = ln(2)#

I need to solve the above equation for k. This is what I did:

#[ln|1+tan(x)|]_0^k = ln(2)#
#ln|1 + tan(k)| - ln|1 + tan(0)| = ln(2)#
#ln|1 + tan(k)| = ln(2)#
#|1 + tan(k)| = 2#
#1 + tan(k) =+-2 #
#tan(k) = -1+-2#

This gives us:

# k = pi/4 + npi# where n is any integer

and

#k = tan^-1(-3) + npi# where n is any integer

My problem is that the only value of k that actually works in the original equation is # k = pi/4#.

Why do the other ones not work (for example #k = (5pi)/4#)?

1 Answer
Aug 15, 2017

If you try to integrate past an asymptote, the integral does not converge.

Explanation:

The integrand is not defined where #tanx = -1#. Nor at #x = pi/2+pik# for integer #k#.

And the improper integral past such a point does not converge.