1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Searching for a function

  1. Sep 18, 2013 #1
    is there any function h(x) that satisfies these conditions:
    h(x)=0 when x is even
    h(x)=1 when x is odd
    and is there there any function g(x) such that:
    g(x)=0 when x is odd
    g(x)=1 when x is even
    thank you.
  2. jcsd
  3. Sep 18, 2013 #2


    User Avatar
    Science Advisor
    Gold Member
    2017 Award

    What's the desired domain? If it's only [itex]\mathbb{Z}[/itex] think about the expression [itex](-1)^x[/itex]!
  4. Sep 18, 2013 #3
    Thank you for your quick reply g(x) can be (1+(-1)^x)/2 and h(x) (1-(-1)^x)/2
  5. Sep 18, 2013 #4

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    The trig functions are quite nice if the domain is ℝ. For example, look at cos2(pi*x) or cos(2*pi*x).
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted

Similar Discussions: Searching for a function
  1. Solution searchs about (Replies: 3)

  2. Functions ? (Replies: 18)