Both answers are correct. You can use double angle identity, as well as u sub for either \(\displaystyle{\sin{{x}}}\ \text{ or }\ {\cos{{x}}}\)

The key lies in the +c. All the 3 integrals are a family of functions just separated by a different "+c". In practice, double angle identity is often used as it's more intuitive and simpler in some sense. But the other methods are perfectly acceptable, and not "wrong."

The key lies in the +c. All the 3 integrals are a family of functions just separated by a different "+c". In practice, double angle identity is often used as it's more intuitive and simpler in some sense. But the other methods are perfectly acceptable, and not "wrong."