# How does one compute $\cos((\pi/4)(k-1 ))$?

How to compute $\cos \left( \frac{\pi}{4}(k-1) \right)$ ?

-

## 2 Answers

Think about it; $\pi/4$ is $45°$. With each different value of $k$ you're summing up $45°$. Since $\pi/4$ divides $2\pi$, you'll eventually get a cycle of values for $\cos(k(\pi/4))$, and then you can use this to derive an answer.

-

It's probably worthwhile pointing out that we're assuming that $k$ is an integer.  This wasn't stated in the original post, but it isn't a very meaningful question otherwise. – cch May 27 '11 at 20:04

As a more difficult extension of fmartin's answer, we might consider by using the angle difference formula for cos: $\cos(\alpha \pm \beta) = \cos (\alpha ) \cos (\beta ) \mp \sin (\alpha ) \sin (\beta )$, which can be derived using complex numbers or matrices very quickly.

Then we consider $\cos (k \pi /4 - \pi /4) = \cos (k \pi/4) /\sqrt2 + \sin (k \pi /4)/\sqrt2$. Of course, we would then proceed by fmartin's answer, noting the cyclic nature for different integer values of k.

And if k is not an integer, then this question is just sort of asking how to evaluate cos(x)? With a Taylor series, I suppose.

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 12, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9410015344619751, "perplexity_flag": "head"}