Subtracting the overlap of functions

In summary: So you can do this with any two functions f and g.In summary, the speaker is seeking advice on how to subtract one function from another only in the overlapping region. They mention that they are not very familiar with higher level math and are looking for pointers on how to approach this problem. The solution is to define two new functions, f1 and g1, that are equal to the original functions in the overlapping region and 0 outside of it, thus allowing for a simple subtraction.
  • #1
2thumbsGuy
24
0
I have a fun project I'm trying to do and it's been a good number of years since I did any math higher than algebra. As such, I don't know how to approach this and would like some pointers.

I am trying to understand how I can subtract one function from another ONLY where the two functions overlap. The first part is easy enough (algebra), but the caveat is challenging to my grey matter. Can anyone advise me on how to approach this?

Thank you,

2thumbs
 
Physics news on Phys.org
  • #2
If two functions overlap in some region, it means they're both non-zero in that region. And in the regions where there is no overlap between them, it means at least one of them is zero in that region.So when you write [itex] f(x)-g(x) [/itex], it only changes the value of the functions in the regions that they have overlap and so you don't have to do anything special, just subtract them!
 
  • #3
I didn't think it would be that simple... let me just do that and see what I come up with. Thanks!
 
  • #4
2thumbsGuy said:
I didn't think it would be that simple... let me just do that and see what I come up with. Thanks!
Just one more point. If you write [itex] f(x)-g(x) [/itex], and then calculate it in a region where f(x)=0, although there is no overlap, g(x) will change because it gets multiplied by a minus sign. So a little modification to a simple subtraction is needed.
 
  • #5
OK, I find it to be desirable where f(x) >= 0 and g(x) >= 0, so how can I restrict the function to that range before performing the subtraction? Or is it specific to the function?

EDIT

Here are the graphs I came up with to evaluate your statement:

Graph 1 ( f(x) )
http://www.wolframalpha.com/input/?i=-x^4+3x

Graph 2 ( g(x) )
http://www.wolframalpha.com/input/?i=-x^2+4x

Graph 3 ( g(x) - f(x) )

You can see on graph 3 the function at the right goes happily off to infinity on the y axis. Obviously this is because f(x) goes off to negative infinity faster than g(x) goes to negative infinity, so when inverted, f(x) wins. But if I stop them at zero before the subtraction, then I get my tidy little graph... I think
 
Last edited:
  • #6
2thumbsGuy said:
I have a fun project I'm trying to do and it's been a good number of years since I did any math higher than algebra. As such, I don't know how to approach this and would like some pointers.

I am trying to understand how I can subtract one function from another ONLY where the two functions overlap. The first part is easy enough (algebra), but the caveat is challenging to my grey matter. Can anyone advise me on how to approach this?

Thank you,

2thumbs

It depends on what you are trying to do when they do not overlap. A sketch: Let A be the region where they overlap, define XA as 1 on A and 0 outside A. Then define f1 = f* XA and g1=g*XA. Now f1-g1 = f-g on A and 0 outside A.
 

FAQ: Subtracting the overlap of functions

What is "subtracting the overlap of functions"?

"Subtracting the overlap of functions" refers to the process of finding the difference between two functions that are overlapping in some areas. This is often done in mathematics and physics to analyze the behavior of two related functions.

Why is subtracting the overlap of functions important in scientific research?

Subtracting the overlap of functions allows scientists to better understand the interactions between two related functions. This can provide insights into complex systems and help in making predictions and solving problems.

What are some common methods for subtracting the overlap of functions?

There are several methods for subtracting the overlap of functions, including using integrals, graphing techniques, and numerical methods such as Simpson's rule or Monte Carlo simulation. The most appropriate method will depend on the specific functions and the desired level of accuracy.

What are some challenges or limitations of subtracting the overlap of functions?

One challenge of subtracting the overlap of functions is that it can be a complex and time-consuming process, especially for functions with multiple dimensions. Additionally, the accuracy of the results may be affected by the quality of the data and the chosen method of subtraction.

In what fields of science is subtracting the overlap of functions commonly used?

Subtracting the overlap of functions is commonly used in fields such as physics, chemistry, biology, and engineering. It can also be applied in economics, social sciences, and other areas where functions and their interactions play a significant role.

Similar threads

Replies
5
Views
1K
Replies
17
Views
2K
Replies
4
Views
1K
Replies
3
Views
3K
Replies
5
Views
2K
Replies
2
Views
1K
Back
Top