6 ms·
Decomposing a function into its even and odd parts
- hellabites 10y agoThis can be rather difficult for general data where an explicit equation isn't obvious (even though it'll work quite often as pointed out by johncolanduoni below). [I think it's neat that] for sufficiently smooth and periodic data, a Fourier transform will do exactly this (decompose a function into its even and odd parts)!
- johncolanduoni 10y agoI'm confused. If you have a table of data where one of the columns varies from -A to A, what is the difficulty in calculating the odd and even parts by just adding (resp. subtracting) the values at x and -x and dividing by two? Even if you don't have a precisely symmetric span of x values you can use simple interpolation as long as your data points are reasonably dense. Fourier analysis seems to be overkill in this case, unless I'm missing something.
- hellabites 10y agoYour algorithm had a bit of a typo--you want to subtract (resp. add) to calculate the odd and even parts of a function. If you don't have a nearly symmetric span of x values, you may need to do extrapolation to obtain one, which may be difficult. I brought up Fourier analysis not as a means to replace the decomposition described in the blog, but to connect it. I think it's neat that Fourier transformations can be viewed as a parity decomposition.
- S4M 10y agoif your data are over [a,b], where a < 0 and b > 0, you can do the decomposition mentioned in the article over [-c,c], where c = min(|a|,|b|), so you don't need to extrapolate.
- kmm 10y agoNeat :) I had almost the same idea when I was trying to figure out whether every matrix is the sum of a symmetric and an asymmetric matrix. The decomposition being very similar: A = (A + A')/2 + (A - A')/2, with ' denoting the transpose.
- tamana 10y ago*antisymmetric The matrix problem is of course a special case of the same problem, where the domain is the matrix indices, labelled with (0,0) as the middle of the matrix.
- qmalzp 10y agoYou can think of the even and odd parts of a function as decomposing the function into its +/-1 eigencomponents with respect to the operator f(x) -> f(-x). You can think of the exponential Fourier series of a function as a way to decompose the function into its {..., -2, -1, 0, 1, 2, ...} eigencomponents with respect to the operator f(x) -> f'(x).
- YuriNiyazov 10y agoIs this covered in functional analysis?
- kmill 10y agoI like this from a representation theory perspective. The cyclic group of order two, C_2, is the set {1,x} with x^2=1 (it's reasonable to just use {1,-1} with the group operation being real-number multiplication). Let V be the set of continuous function R->R, and then let's define a linear representation where phi_1 is the identity operator on V and phi_x is the operator you describe, phi_x(f)(c)=f(-c). (The only two symmetries of a line which fix the origin are the identity and flipping, which is what this representation is representing.) The group C_2 is known to have exactly two irreducible representations (the positive and the negative representations), so V decomposes into (at most) two subrepresentations (that is, there are two subspaces of V which are closed under the group action). Using the characters of C_2, we get two projection operators: (\phi_1+\phi_x)/2 and (\phi_1-\phi_x)/2. Examining what these do, they decompose a function into the even and odd parts, respectively! This idea can be extended to the circle group for the Fourier transform. Representations are able to capture a bit more than eigencomponent. Where an eigencomponent requires that the action be strictly scaling, components from representation can have more complicated actions. For instance, if you have a representaiton of the dihedral group of symmetries of a triangle, then there will be projections which will give you 1) the +1 eigencomponent, 2) the -1 eigencomponent associated with flipping the triangle over, and 3) the 2-dimensional component which faithfully represents the symmetries of the triangle (i.e., the one already mentioned when describing the dihedral group).
- Xcelerate 10y ago
- apricot 10y agoThe odd and even functions summing to 1/(x+1) given in the article have an asymptote at x = 1. Is there a way to avoid this, and represent 1/(x+1) as the sum of an odd function and an even function which have no asymptote except for x = -1?
- panic 10y agoThe odd/even parts of a function are unique, so no. To see why they're unique, say you have two pairs of odd/even functions fo1/fe1 and fo2/fe2 that each sum to the same function. Subtract fo1 from both sides: fo1 + fe1 = fo2 + fe2 fe1 = fo2 - fo1 + fe2 Since fe1 is even, fo2 - fo1 + fe2 must also be even. The function fo2 - fo1 is the difference of two odd functions, so it is itself an odd function. And the only way the sum of an odd function (fo2 - fo1) and an even function (fe2) can be even is if the odd function is everywhere zero [1]. In other words, fo2 - fo1 = 0, which means fo2 = fo1. Substituting this into the overall equation, that means fe1 = fe2 as well. [1] the sum is even when odd(x) + even(x) = odd(-x) + even(-x) = -odd(x) + even(x) odd(x) = -odd(x) and the only number which is its own negative is zero.
- apricot 10y agoVery nice, thank you!
- mjd 10y agoI think it's a little simpler to observe that fo1 - fo2 = fe1 - fe2 The left side is an odd function and the right side is an even function, so the common value must be both odd and even. But only the zero function is both odd and even, QED.
- tamana 10y agoYour don't even need to posit fe3 and fo2: f(X) = e(X) + o(X) f(-X) = e(X) - o(X) From there you can explicitly solve the system of linear equations to get e(X) and o(X)
- 10y ago
- pash 10y agoIt's a bit odd (pardon the pun) that the words Taylor series [0] appear neither in the blog post nor so far in the comments, since that's the origin of the terms odd and even in this context [1]: the power series of odd functions have non-zero coefficients only on the odd powers of the variable, and those of even functions only on the even powers. And thus the Taylor-series representation of a function makes it immediately obvious that the function can be decomposed into odd and even sub-functions. But Taylor-series representations exist only for smooth functions, and generally converge only in parts of their domains, while the even-odd decomposition applies to all real-valued functions defined on all real inputs. It's this algebraic generality of the even-odd decomposition that's most remarkable. 0. https://en.wikipedia.org/wiki/Taylor_series https://en.wikipedia.org/wiki/Taylor_series 1. The Wikipedia article on odd and even functions points out the decomposition described in the submitted post: https://en.wikipedia.org/wiki/Even_and_odd_functions https://en.wikipedia.org/wiki/Even_and_odd_functions
- davidtgoldblatt 10y agoI got curious about the etymology of this, and it's not clear to me that wikipedia is right on this one. According to [1], the earliest use of "even" and "odd" for functions goes back to Euler [2]. It's been a long time since high school Latin, but it doesn't look like he has the Taylor series in mind here. He certainly calls out the functions f(x) = x^n for some n as even or odd, and notes that the sums work in the ways you'd expect, but he also talks about ratios of those functions, which he wouldn't need to do if he were assuming smoothness and could just expand out the Taylor series of the ratio. It's unclear, but it looks to me like he's using "even" and "odd" to draw an algebraic analogy. [1] http://jeff560.tripod.com/e.html http://jeff560.tripod.com/e.html [2] http://eulerarchive.maa.org/docs/originals/E005.pdf http://eulerarchive.maa.org/docs/originals/E005.pdf , section XVII.
- pash 10y agoI did not mean to imply that Wikipedia was my source for the etymology of even and odd as classifications of functions. (I hadn't really meant to make an etymological point at all, and I added the link only so that readers unfamiliar with the concept of Taylor series might be enticed to click through and learn something.) I don't have any references for you right now, but I would be surprised if the usage of the terms doesn't pre-date your citation of Euler by at least several decades. The basic technique for deriving Taylor series is known to date to at least 1671, to the correspondence between James Gregory and John Collins; it also shows up in letters from de Moivre to Johann Bernoulli in 1694 and from Leibniz to Bernoulli in 1708. Newton had a geometric means of deriving the coefficients of power series when he was writing the Principa (published in 1687), as demonstrated by the proof of his tenth proposition, and he included a description of the algebraic technique in an early draft of his Quadrature of Curves (but removed it before publication in 1706). So Taylor series were broadly known to Europe's prominent corresponding mathematicians in the first decades of the eighteenth century, and to some of them decades earlier. And the basic concept of power series, as well as the power-series representations of many common functions, were already widely known in the latter decades of the seventeenth century. Like I said, I don't have a reference for you at the moment, but I have always heard that the terms odd and even derive from the power-series representations of functions, and it's difficult to imagine that no one before Euler had noted that the power series of some functions involve only odd or only even powers—although one may more readily imagine that someone noted it while neglecting to name it. Anyway, Taylor series and the more basic concept of power series certainly were known to Euler when he wrote the paper you cited. Since the power series of polynomial functions are the polynomials themselves, you're right that Euler would not have had power series in mind in the context of this paper. (But, no, Euler would not have been thinking in terms of smoothness—mathematicians up until the analytic enlightenment of nineteenth century played fairly fast and loose with derivatives. The point you made about ratios of functions is off-base, I think: the paper is about reciprocal solutions to polynominal equations.) The question is simply whether your citation is evidence that Euler first coined the terms for the concept in the context of this paper (i.e., at that time and referring specifically to polynomials), or whether the concept and terminology already existed. If not, when was it generalized to refer to functions other than polynomials of finite order? I don't know. Perhaps nobody bothered to give the concept a name until Euler in 1727, and perhaps nobody even considered the concept with regard to a more general class of functions until even later. (I have a source book around here somewhere that might say something about the matter. ...) In any event, if you asked a sample of mathematicians today why functions are called odd or even, I'd bet that many of them would point to power-series representations. That's what I meant to point out in my earlier comment.
- tamana 10y agoTo visualize this, take the graph of f and mirror it across the y axis. The even function is the average of the two traces f(x) and f(-x), and the odd function is the distance from the average to the actual values.