The conversation between human and AI assistant.
Cos nπ value?
Oh, I see. How is this formula derived?
It is derived from the unit circle in trigonometry, where cosine is the x-coordinate of a point on the circle and sine is the y-coordinate. When the angle is a multiple of π, the point will be on the x-axis, which corresponds to a cosine of either 1 or -1. The (-1)^n term comes from the fact that cosine is positive for even multiples of π and negative for odd multiples.