Trigonometric equations and substitutions