I was solving this exercise, however it is proposed that there is a possible contradiction in the exercise but I cannot determine what it is.
The idea is to find the integral of $\int{\frac{1}{\sin(x)\cos(x)}dx}$ For this purpose, the following is expressed
$\int{\frac{1}{\sin(x)\cos(x)}dx}=\int{\frac{\cot(x)}{\cos^2(x)}dx}=\int{\cot(x)\tan'(x)dx}=\cot(x)\tan(x)-\int{\tan(x)\cot'(x)dx}=1+\int{\frac{\tan(x)}{\sin^2(x)}dx}=1+\int{\frac{1}{\sin(x)\cos(x)}dx}$
Where does the failure occur? thank you for your help.
There is no failure. You've shown that $$\int{\frac{1}{\sin(x)\cos(x)}dx}=1+\int{\frac{1}{\sin(x)\cos(x)}dx},$$ which is correct, even if unhelpful: recall that $\int f(x)\,dx$ denotes the set of all antiderivatives of $f(x)$, all of which are a constant apart from one another. This means that it is in general true that for any function $f(x)$ we have $\int f(x)\,dx = 1 + \int f(x)\,dx$. Your derivation is correct, but it does not lead to a solution of the integral.
(To actually solve the integral, you can use the Weierstrass half-angle substitution, i.e. $t=\tan(\frac{x}{2})$, and you may simplify beforehand using $\sin(2x)=2\sin(x)\cos(x)$.)