exp(-x) vs 1 - x

Started by
8 comments, last by mystical49 13 years, 9 months ago
Can someone please explain to me the main mathematical difference between exp(-x) and 1 - x when 1>x>0? Visualizing the numbers on a graph they appear quite similar, essentially an inversion where the exp is more on a slow curve, but I'm wondering if I'm missing something. Also, I may be incorrect in this assumption but exp(-x) = 1.0 / pow( 2.71828, x ), no?

Just trying to understand the math behind exponents to better intuit their results. Thanks for any help!
"Artificial Intelligence: the art of making computers that behave like the ones in movies."www.CodeFortress.com
Advertisement
Quote:Can someone please explain to me the main mathematical difference between exp(-x) and 1 - x when 1>x>0?
The main mathematical difference is that they are different functions. cos(x*pi/2) and sigmoid(-x)*4-1 happen to look similar too, for that matter, but they're different things. Any function will look like any other function if you peer at it through a small enough lens.
They are similar because
exp(-x) = 1 - x + x^2/2 - x^3/6 + ...
See Wikipedia - Taylor series for more information.
Sneftel: I'm afraid you may have misunderstood. I was inquiring about the mathematical similarities between two seemingly related functions. Their similarities in output could have been incidental but intuitively it feels like they have meaning. Thank you for your input, though. :-)

Kambiz: That makes a lot of sense and was close to what I was thinking! Not quite a Eureka moment but I think I understand the relationship between these functions to each other better now. Essentially the linear function (1 - x) is just the first integral of the expansion that generates an analytic polynomial. Essentially the difference between a continuous but non-differential function and one that is. I just played around with those numbers on a graphing calculator and was surprised to see how fast they converge!

Thanks guys!
"Artificial Intelligence: the art of making computers that behave like the ones in movies."www.CodeFortress.com
Quote:Original post by Dirge
Essentially the linear function (1 - x) is just the first integral of the expansion that generates an analytic polynomial.

You probably understand the situation, but your language is off, and language is important in Math. (1 - x) is not a "linear function", I don't know what you mean by "the first integral", and when you say "an analytic polynomial" you probably mean "a power series".

One correct way of saying it is this: The function (1 - x) is the first-degree Taylor approximation of exp(-x) at 0.

Quote:Essentially the difference between a continuous but non-differential function and one that is.

That I didn't understand at all.

Seconding alvaro.
Also seconding that some part of his reply doesn't make any sense O_o
I'm likely using the wrong terms but am surprised I'm completely unintelligible to you smart gents. :-) I'll break it down and maybe you guys could correct me. Please don't misinterpret this reply as me getting defensive -- I really just want to make sure to get this stuff right.

Lets see, first, alvaro, your language pretty much sums up what started this chain of thought in the first place; in optimizing a bit of code I found that 1-x is close to exp(-x) but obviously faster, the loss in accuracy from the first order estimation being acceptable.

When I said 1-x is a linear function I meant more in regards to it's plot on a graph, but here is a definition from wikipedia to back that up:
"These functions are known as "linear" because they are precisely the functions whose graph in the Cartesian coordinate plane is a straight line."

If you don't believe me find a graphing calculator online and plot the function Kambiz described to the 3rd order or so and compare vs 1-x.

Furthermore:
"In analytic geometry, the term linear function is sometimes used to mean a first-degree polynomial function of one variable."

Hence what I meant by "analytic polynomial" (though I could definitely have worded that better).

mystical49:
Well lets start with this:
"a continuous function is a function for which, intuitively, small changes in the input result in small changes in the output. Otherwise, a function is said to be "discontinuous"" and "All polynomial functions are continuous". Given that, both 1-x and exp(-x) can be considered continuous, correct?

By "non-differential" I meant non-differentiable. A "Differentiable Function" is defined as "a function whose derivative exists at each point in its domain". As you add terms in the taylor series, the derivative at each point is used to move closer to the solution. exp(-x) has this trait while 1-x does not.

OK, school me. :-)
"Artificial Intelligence: the art of making computers that behave like the ones in movies."www.CodeFortress.com
e^(-x) has a derivative: -e^(-x).
Quote:Original post by Dirge
When I said 1-x is a linear function I meant more in regards to it's plot on a graph, but here is a definition from wikipedia to back that up:
"These functions are known as "linear" because they are precisely the functions whose graph in the Cartesian coordinate plane is a straight line."

I am going to play my "English is not my first language" card. :) I use "linear function" only in the second sense described at the top of the Wikipedia article: "a map between two vector spaces that preserves vector addition and scalar multiplication."

Quote:If you don't believe me find a graphing calculator online and plot the function Kambiz described to the 3rd order or so and compare vs 1-x.

That's not the point: of course their graph is straight. The issue is that in Spanish prople use "lineal" (linear) for mappings between vector spaces that preserve addition and scaling, and "afín" (affine) for things like "f(x) = m*x + b".

Mea culpa.

Quote:[...]

By "non-differential" I meant non-differentiable. A "Differentiable Function" is defined as "a function whose derivative exists at each point in its domain". As you add terms in the taylor series, the derivative at each point is used to move closer to the solution. exp(-x) has this trait while 1-x does not.

That's not right. Both exp(-x) and (1-x) are differentiable. The derivative of (1-x) is -1.

I don't understand your statement "As you add terms in the taylor series, the derivative at each point is used to move closer to the solution." In this case I am not sure your intuitive understanding is correct either, judging by what you deduce from it.

[Edited by - alvaro on July 22, 2010 12:30:48 PM]
that was indeed what didnt make sens.

1-x and exp(-x) all are differentiable

And it's not because 1-x doesnt have any beautiful Taylor formulation (apart 1-x itself lol) that it has to be "somewhat different in its differentiability"

So, to quote Dirge:
"As you add terms in the taylor series, the derivative at each point is used to move closer to the solution. exp(-x) has this trait while 1-x does not."

Yes it does. It just reach the exact solution at step 2 of the taylor expression.
That doesnt mean its non-differentiable. Just that it's polynomial.
And you said it yourself, polynomials functions are differentiable.

Dont bite your tail :D

This topic is closed to new replies.

Advertisement