The key is to rewrite the denominator cosx−sinx as a single sinusoidal function using the amplitude-phase form. Factor out 2 to get 2cos(x+π/4), which transforms the integral into a standard form solvable by the Weierstrass substitution t=tan(x/2). This substitution converts the trigonometric integral into a rational function that yields a logarithm with a specific argument.
Intuitive explanation
The key is to rewrite the denominator cosx−sinx as a single sinusoidal function using the amplitude-phase form. Factor out 2 to get 2cos(x+π/4), which transforms the integral into a standard form solvable by the Weierstrass substitution t=tan(x/2). This substitution converts the trigonometric integral into a rational function that yields a logarithm with a specific argument.