# Extending a function to become odd or even?

"Suppose we have a function defined on an interval [0,K], then we extend it as an even or odd function of period K so as to produce a Fourier cosine or sine series."

(1): What exactly is extending a function?

(2): How do you extend a function to become odd or even?

-

What you write is not possible. You need period $2K$ (at least) in order to have sufficient freedom to make the function even or odd as well as periodic. And even then, making it odd only works if already $f(0)=0$. – Marc van Leeuwen Jun 2 '12 at 15:50

## 1 Answer

The idea is to force the function to be even or odd on the interval $[-K, K]$. E.g. if you want to extend it as an odd function define $g$ on $[-K, K]$ by $g(x) = -f(-x)$ for $-K \leq x < 0$ and $g(x) = f(x)$ for $0 \leq x \leq K$.

This function is then odd as $g(-x) = -g(x)$.

Similarly you can extend it to an even function, i.e. $g(-x) = g(x)$ for $x\in [-K, K]$.

edit: this is of period $2K$ which is what I assume you meant.

-
{"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": 13, "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.9254747629165649, "perplexity_flag": "head"}