# Hot to determine which is greater

1. Jun 13, 2009

### ronaldor9

lets say we have to functions y(x) and g(x), how would I determine in which interval y(x) would be greater then g(x)? Would i simply subtract them and determine where the function is greater then zero (this seems to make the most sense)

But I also remember that if I subtract them and take the derivative, then determine where the derivative is positive and negative that also tells me something about which function is greater( something different then whether y(x) is greater then g(x).

can anyone help?

2. Jun 13, 2009

### BobbyBear

Yes, that sounds like a good idea: you could subtract them,

$$h(x) \equiv y(x)-g(x)$$

and then determine in which intervals the function h(x) is greater than zero and where it is less than zero. For that you need to determine the zeros of h:

$$x$$ such that $$h(x)=0$$

You could do this numerically, for example, using a fixed point iteration method such as Newton-Raphson:

initial guess:
$$x^0$$
REPEAT
$$x^{k+1}=x^{k}-\frac{h(x^{k})}{h'(x^{k})}$$
$$k=k+1$$

UNTIL $$|{x^{k+1}-x^{k}}| < Eps$$ ,
where Eps is a tolerance, Eps = 10^{-4} (for example)

In general choosing an adequate initial value sufficiently close to the zero, x0, so that the method converges is not an easy task, and neither is determining how many zeros a nonlinear function has :S

3. Jun 13, 2009

### ronaldor9

Yea, that method works well! thank you.

I am having troubles remembering what the use of taking the derivative of the subtraction of the two function would determine. I do not exactly remember but, can it be used to prove if the function is increasing or greater then the other. The details I cannot remember.

4. Jun 13, 2009

### Tibarn

The derivative doesn't tell you whether a function is positive or negative, only if it's increasing or decreasing. For example, $$e^{-x}$$ is always positive yet its derivative is always negative.

5. Jun 13, 2009

### ronaldor9

yes i know that but, the derivative of the subtraction of two function tells you something about the nature of how one function is in relation to another. I think it tells you that one function in increasing over another, wherever it is positive

6. Jun 13, 2009

### daviddoria

As Tibarn said, I don't believe the derivative is what you are looking for in this case. What's wrong with the subtraction method you recommended and BobbyBear made more concrete?

7. Jun 13, 2009

### ronaldor9

No there is nothing wrong about that. I was just trying to recall the use of the derivative in a related question i had done/read a while back. I know it does not help me answer the question about which function is greater, but I was trying to remember its use in a related question. Thats all.

8. Jun 14, 2009

### BobbyBear

ronaldor9: as far as I know (though I don't know very much at all lol), there is no immediate application of the derivative to root finding. Maybe for some special kind of functions you could reach some conclusions by analysing the derivate together with other considerations about the specific function in question . . . but in general all that the derivative tells you as far as I see, is what you and others have said: if h'(x) = f'(x)-g'(x) is positive, it means that f is growing faster than g (or decreasing less rapidly than g), and viceversa.

If you find any further results or remember what you were reading about let us know :)

9. Jun 14, 2009

### ronaldor9

Actually there is an immediate application of the derivative to root finding, its called newtons method! The method is outlined in the second post, check it out, its very useful.

But yes i will try to consult a book to determine what if there is any use in finding the derivative of the difference of the two functions

10. Jun 14, 2009

### BobbyBear

ROLF okay okay:P:P

mhm, you do that :) It's always nice to learn new things:)