Results 1 to 9 of 9

Math Help - function finding

  1. #1
    Newbie
    Joined
    Jun 2012
    From
    Croatia
    Posts
    15

    function finding

    How to find function that have values:
    f(0)=0, f(1)=0, f(2)=0, f(3)=0,... for period T=1
    f(0)=0, f(1)=1, f(2)=0, f(3)=1,... for period T=2
    f(0)=0, f(1)=1, f(2)=1, f(3)=0, f(4)=1, f(5)=1, f(6)=0,... for period T=3
    f(0)=0, f(1)=1, f(2)=1, f(3)=1, f(4)=0, f(5)=1, f(6)=1, f(7)=1, f(8)=0,... for T=4
    f(0)=0, f(1)=1, f(2)=1,..., f(n-1)=1, f(n)=0, f(n+1)=1,...,f(2n)=0,f(2n+1)=1,... T=n

    or shortly:
    0000000000000 T=1
    0101010101010 T=2
    0110110110110 T=3
    0111011101110 T=4
    ...

    So, I need function in two variables f(n,T)
    The function must NOT have MOD, CEILING or FLOOR function.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    Prove It's Avatar
    Joined
    Aug 2008
    Posts
    11,547
    Thanks
    1418

    Re: function finding

    Quote Originally Posted by Emilijo View Post
    How to find function that have values:
    f(0)=0, f(1)=0, f(2)=0, f(3)=0,... for period T=1
    f(0)=0, f(1)=1, f(2)=0, f(3)=1,... for period T=2
    f(0)=0, f(1)=1, f(2)=1, f(3)=0, f(4)=1, f(5)=1, f(6)=0,... for period T=3
    f(0)=0, f(1)=1, f(2)=1, f(3)=1, f(4)=0, f(5)=1, f(6)=1, f(7)=1, f(8)=0,... for T=4
    f(0)=0, f(1)=1, f(2)=1,..., f(n-1)=1, f(n)=0, f(n+1)=1,...,f(2n)=0,f(2n+1)=1,... T=n

    or shortly:
    0000000000000 T=1
    0101010101010 T=2
    0110110110110 T=3
    0111011101110 T=4
    ...

    So, I need function in two variables f(n,T)
    The function must NOT have MOD, CEILING or FLOOR function.
    Why not try transforming a sine function?
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Jun 2012
    From
    Croatia
    Posts
    15

    Re: function finding

    Quote Originally Posted by Prove It View Post
    Why not try transforming a sine function?
    How? It is possible? Can you give me more details? (or example)
    Follow Math Help Forum on Facebook and Google+

  4. #4
    MHF Contributor
    Prove It's Avatar
    Joined
    Aug 2008
    Posts
    11,547
    Thanks
    1418

    Re: function finding

    A function of the form \displaystyle \begin{align*} y = a \sin{\left[b\left(x - c\right)\right]} + d \end{align*} has a mean value of \displaystyle \begin{align*} d \end{align*}, which also corresponds to the vertical translation, an amplitude of \displaystyle \begin{align*} |a| \end{align*}, a horizontal translation of \displaystyle \begin{align*} c \end{align*}, and a period of \displaystyle \begin{align*} \frac{2\pi}{b} \end{align*}.

    In your first example, you want the period to be 1, so \displaystyle \begin{align*} \frac{2\pi}{b} = 1 \implies b = 2\pi \end{align*}, and it would be appropriate to have \displaystyle \begin{align*} c = d = 0 \end{align*}, because it is unnecessary to translate the function at all. You can have \displaystyle \begin{align*} a \end{align*} be whatever you like.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Newbie
    Joined
    Jun 2012
    From
    Croatia
    Posts
    15

    Re: function finding

    But try with period T=3 or T=4
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Senior Member
    Joined
    Jan 2008
    From
    UK
    Posts
    484
    Thanks
    65

    Re: function finding

    For t=3 you can use a \sin^2(bx).
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Newbie
    Joined
    Jun 2012
    From
    Croatia
    Posts
    15

    Re: function finding

    Quote Originally Posted by a tutor View Post
    For t=3 you can use a \sin^2(bx).
    No, I must have a general function for all periods.
    Last edited by Emilijo; June 28th 2012 at 05:25 AM.
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Newbie
    Joined
    Jun 2012
    From
    Croatia
    Posts
    15

    Re: function finding

    Quote Originally Posted by Prove It View Post
    A function of the form \displaystyle \begin{align*} y = a \sin{\left[b\left(x - c\right)\right]} + d \end{align*} has a mean value of \displaystyle \begin{align*} d \end{align*}, which also corresponds to the vertical translation, an amplitude of \displaystyle \begin{align*} |a| \end{align*}, a horizontal translation of \displaystyle \begin{align*} c \end{align*}, and a period of \displaystyle \begin{align*} \frac{2\pi}{b} \end{align*}.

    In your first example, you want the period to be 1, so \displaystyle \begin{align*} \frac{2\pi}{b} = 1 \implies b = 2\pi \end{align*}, and it would be appropriate to have \displaystyle \begin{align*} c = d = 0 \end{align*}, because it is unnecessary to translate the function at all. You can have \displaystyle \begin{align*} a \end{align*} be whatever you like.

    Can you check your formula? I think it does not work for T=3 or bigger period. Can you give me example with your formula for T=3 ? Thanks
    Have you another idea?
    Last edited by Emilijo; June 28th 2012 at 07:30 AM.
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Super Member
    Joined
    Jun 2012
    From
    AZ
    Posts
    616
    Thanks
    97

    Re: function finding

    I don't really know how to do piecewise functions in LaTeX, but


    f(n) = 0, n \equiv 0 (\mod T) and f(n) = 1, n \not\equiv 0 (\mod T) easily works.


    Too bad you can't use mod...
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Finding a Cumulative Distribution Function and Density Function
    Posted in the Advanced Statistics Forum
    Replies: 3
    Last Post: November 17th 2011, 09:41 AM
  2. Replies: 14
    Last Post: October 7th 2011, 09:45 PM
  3. Finding probability function of moment generating function
    Posted in the Advanced Statistics Forum
    Replies: 6
    Last Post: July 4th 2011, 04:03 PM
  4. Finding function such that
    Posted in the Calculus Forum
    Replies: 1
    Last Post: February 23rd 2011, 04:11 AM
  5. Help finding this function?
    Posted in the Calculus Forum
    Replies: 7
    Last Post: December 10th 2009, 03:03 PM

Search Tags


/mathhelpforum @mathhelpforum