Can I get a general function f(m,n)

  • Context: Undergrad 
  • Thread starter Thread starter Emilijo
  • Start date Start date
  • Tags Tags
    Function General
Click For Summary

Discussion Overview

The discussion revolves around finding a general function f(m,n) that can represent various sequences of 1s and 0s, with m representing the period and n indicating the nth number within that period. The examples provided illustrate different patterns of sequences, and participants explore potential mathematical formulations using elementary functions, Fourier series, and other mathematical constructs.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant seeks a function f(m,n) that generates sequences of 1s and 0s based on the period m and position n.
  • Another participant suggests that Fourier series might be applicable, questioning whether they qualify as elementary functions.
  • A different approach is proposed using the function g(m) = (1/2)(1 + (-1)^m), with discussions on its relation to Fourier series and Euler's formula.
  • Several participants discuss the use of the Dirac delta function and the sinc function to construct a periodic function that meets the criteria for generating the desired sequences.
  • One participant presents a piecewise function definition for f(m,n) that outputs 0 for multiples of m and 1 otherwise, raising questions about the classification of mod and floor operators as elementary functions.
  • There are ongoing discussions about the properties of the proposed functions, including their behavior at integer values and whether they satisfy the conditions set by the original problem.

Areas of Agreement / Disagreement

Participants express various viewpoints and approaches to defining the function f(m,n), with no consensus reached on a single solution or the classification of certain functions as elementary. Multiple competing models and ideas remain under consideration.

Contextual Notes

Some participants express uncertainty about the classification of certain mathematical constructs as elementary functions, particularly regarding the use of mod and floor operators, as well as the applicability of Fourier series and the sinc function in this context.

Emilijo
Messages
35
Reaction score
0
How can I get a general function f(m,n) that represents a series of 1 and 0, for example :
1,0,1,0,1,0,1,0...; but also
1,1,0,1,1,0,1,1,0...;
1,1,1,0,1,1,1,0,1...

where m is period and n nth number in certain period. In example two:
m=3 (...1,1,0...) f(3,4)=1

The function must be composed only by elementary function
 
Physics news on Phys.org


This might be a little desperate, but Fourier series should do the trick. I do not know if there is any other elementary function that would do the same, and I do not know if you consider Fourier series to be elementary (despite it involving only sine and cosine, which are both considered elementary.)
 


Millennial said:
This might be a little desperate, but Fourier series should do the trick. I do not know if there is any other elementary function that would do the same, ...

oh c'mon.

consider

[tex]g(m) = \frac{1}{2} \left( 1 + (-1)^m \right)[/tex]

for integer [itex]m[/itex]

sure, find a Fourier series that, when sampled at integer values, gives you the values you want. but instead of sines and cosines, use the exponential version derived from Euler's formula:

[tex]e^{i \theta} \ = \ \cos(\theta) \ + \ i \sin(\theta)[/tex]

and

[tex]-1 = e^{i \pi}[/tex]

and

[tex]g(x) = \sum_{n=-\infty}^{+\infty} c_n \ e^{i \ n (2 \pi/P) x }[/tex]

where [itex]P[/itex] is the period of the periodic function

[tex]g(x + P) = g(x)[/tex]

for all [itex]x[/itex], and [itex]c_n[/itex] are the Fourier coefficients.

but you can start with the simple equation with [itex](-1)^m[/itex] and imagine how you might put it together to get the gating functions you're looking for.
 
Last edited:


Emilijo said:
How can I get a general function f(m,n) that represents a series of 1 and 0, for example :
1,0,1,0,1,0,1,0...; but also
1,1,0,1,1,0,1,1,0...;
1,1,1,0,1,1,1,0,1...

where m is period and n nth number in certain period. In example two:
m=3 (...1,1,0...) f(3,4)=1

The function must be composed only by elementary function

$$f(m,n)=\left\{ \begin{array}{rl}
0&n=0\mod m\\
1&\hbox{otherwise}
\end{array}\right.$$
 


LCKurtz said:
$$f(m,n)=\left\{ \begin{array}{rl}
0&n=0\mod m\\
1&\hbox{otherwise}
\end{array}\right.$$
does that count as an "elementary function"? do the mod or floor operators count as elementary functions?
 


LCKurtz said:
$$f(m,n)=\left\{ \begin{array}{rl}
0&n=0\mod m\\
1&\hbox{otherwise}
\end{array}\right.$$

rbj said:
does that count as an "elementary function"? do the mod or floor operators count as elementary functions?

You will have to check with the Elementary Function Arbitration Committee to get a definitive answer.
 


good answer.
 


i think i figured out a possible answer, but it involves the dirac delta function (or more precisely, the dirac comb). the dirac comb is a periodic sequence of equally space delta functions and can be represented as an infinite series. maybe we can construction this thing with the sinc() function:

[tex]\ \operatorname{sinc}(x) \ = \ \frac{\sin(\pi x)}{\pi x}[/tex]

and it has a removable singularity at zero so that

[tex]\ \operatorname{sinc}(0) \ = \ \lim_{x \rightarrow 0} \frac{\sin(\pi x)}{\pi x} \ = \ 1[/tex]

it's also true that the sinc() function is 0 for all non-zero integers. does that count as an "elementary function"? does an infinite sum of these sinc() functions count as an "elementary function"?

if yes, i can assemble a general function. actually, this periodic sinc() function (the infinite sum) can be represented as a Fourier series with a finite number of terms, so i think that's where the answer is.
 


okay, so first we define

[tex]\ \operatorname{sinc}(x) \ = \ \frac{\sin(\pi x)}{\pi x}[/tex]

and then we define this periodic function:

[tex]g_m(x) = \sum_{k=-\infty}^{+\infty} \operatorname{sinc}(x - mk)[/tex]

where m is an integer (and so is k and so is mk). we know that for integer n that

[tex]g_m(n) =<br /> \begin{cases}<br /> 1 & \ \ \text{if }n = \text{ any multiple of }m \\<br /> 0 & \ \ \text{if }n = \text{ is any other integer}<br /> \end{cases}[/tex]

now, i am pretty sure that this is the case:

[tex]g_m(x) = \frac{1}{m} \sum_{k=1}^{m} \cos\left( 2 \pi \frac{k x}{m} \right)[/tex]

even if it isn't, i think that this function has the property we need for when x is an integer n. it is zero for any integer n except when n is a multiple of m. since this is a harmonic series, you can get a closed form expression for it (someone else want to do it)? then subtract this from 1.
 
  • #10


[tex]\begin{align}<br /> g_m(x) \ &= \ \frac{1}{m} \sum_{k=1}^{m} \cos\left( 2 \pi \frac{k x}{m} \right) \\<br /> &= \ \frac{1}{2m} \sum_{k=1}^{m} e^{ i 2 \pi k x / m} \ + \ \frac{1}{2m} \sum_{k=1}^{m} e^{ -i 2 \pi k x / m} \\<br /> &= \ \frac{e^{ i 2 \pi x / m}}{2m} \sum_{k=0}^{m-1} e^{ i 2 \pi k x / m} \ + \ \frac{e^{ -i 2 \pi x / m}}{2m} \sum_{k=0}^{m-1} e^{ -i 2 \pi k x / m} \\<br /> &= \ \frac{e^{ i 2 \pi x / m}}{2m} \frac{ e^{ i 2 \pi m x / m} - 1}{e^{ i 2 \pi x / m} - 1} \ + \frac{e^{ -i 2 \pi x / m}}{2m} \frac{ e^{ -i 2 \pi m x / m} - 1}{e^{ -i 2 \pi x / m} - 1} \\<br /> &= \ \frac{1}{2m} \frac{ e^{ i 2 \pi x} - 1}{1 - e^{ -i 2 \pi x / m}} \ + \frac{1}{2m} \frac{ e^{ -i 2 \pi x } - 1}{1 - e^{ i 2 \pi x / m}} \\<br /> \end{align}[/tex]

i'm getting tired, can someone else finish this?
 
  • #11


[tex]\begin{align}<br /> g_m(x) \ &= \ \frac{1}{2m} \frac{ e^{ i 2 \pi x} - 1}{1 - e^{ -i 2 \pi x / m}} \ + \ \frac{1}{2m} \frac{ e^{ -i 2 \pi x } - 1}{1 - e^{ i 2 \pi x / m}} \\<br /> &= \ \frac{e^{ i \pi x} \ e^{ i \pi x / m}}{2m} \frac{ e^{ i \pi x} - e^{ -i \pi x}}{e^{ i \pi x / m} - e^{ -i \pi x / m}} \ + \ \frac{e^{ -i \pi x} \ e^{ -i \pi x / m}}{2m} \frac{ e^{ -i \pi x} - e^{ i \pi x}}{e^{ -i \pi x / m} - e^{ i \pi x / m}} \\<br /> &= \ \frac{e^{ i \pi (m+1) x / m}}{2m} \frac{ e^{ i \pi x} - e^{ -i \pi x}}{e^{ i \pi x / m} - e^{ -i \pi x / m}} \ + \ \frac{ e^{ -i \pi x (m+1) / m}}{2m} \frac{ e^{ i \pi x} - e^{ -i \pi x}}{e^{ i \pi x / m} - e^{ -i \pi x / m}} \\<br /> &= \ \frac{ e^{ i \pi x} - e^{ -i \pi x}}{e^{ i \pi x / m} - e^{ -i \pi x / m}} \ \left( \frac{e^{ i \pi (m+1) x / m}}{2m} + \ \frac{ e^{ -i \pi x (m+1) / m}}{2m} \right) \\<br /> &= \ \frac{ \sin(\pi x) }{m \sin(\pi x / m)} \ \cos\left(\pi (m+1) x / m \right) \\<br /> &= \ \frac{ \sin(\pi x) }{m \sin(\pi x / m)} \ \cos(\pi x + \pi x / m) \\<br /> &= \ \frac{ \sin(\pi x) }{m \sin(\pi x / m)} \ \left( \cos(\pi x) \cos(\pi x / m) - \sin(\pi x) \sin(\pi x / m) \right) \\<br /> &= \ \frac{ \sin(\pi x) }{m} \ \left( \frac{\cos(\pi x)}{\tan(\pi x / m)} - \sin(\pi x) \right) \\<br /> \end{align}[/tex]
 
Last edited:
  • #12


i see it's that Dirichlet kernel on the left. can someone check out to see that this is 1 for n being a multiple of m and 0 for all other integers?

maybe the bottom two or three equalities does not help us.
 
Last edited:

Similar threads

  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 25 ·
Replies
25
Views
4K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 28 ·
Replies
28
Views
8K