Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Subtracting functions on specified domains

  1. Nov 28, 2014 #1
  2. jcsd
  3. Nov 28, 2014 #2


    User Avatar
    Science Advisor

    Edit: I think I misread.
    I need clarification. Do you mean f(x) is defined on more than [b,c], or f has domain [b,c]
  4. Nov 28, 2014 #3
    both f(x) and g(x) have values outside of the defined domains, but I want to only consider the values within their respective defined domains.

    I'll be using this in some software, so maybe it's best that I constrain the domains within the software instead of in the math, but I wanted to get all possible approaches before committing to a single answer.
  5. Nov 28, 2014 #4


    User Avatar
    Science Advisor

    Okay that part is easy.
    Define new functions F and G where
    ##F(x) = f(x)## if ##x \in [b,c]## and ##F(x) = 0## elsewhere.
    Do the same with G.

    Second question: do we know ##[b,c] \subset [a,d]##?
  6. Nov 28, 2014 #5
    Thank you very much! This is familiar.

    To your second question, the domains will vary according to circumstance. For this case we can use a = 1, b = 2, c = 3, d = 4. But they will change many, many times.
  7. Nov 28, 2014 #6
    Actually, I think the programming solution would be the same as the math solution. As you say, f(x) if x∈[b,c] and F(x)=0 elsewhere, and the same for g(x). This is normal if/then scenario.

    I know how I can do this! Thanks for helping me think through it.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Discussions: Subtracting functions on specified domains
  1. Domain of a function (Replies: 2)

  2. Domain of a function (Replies: 8)