Find the horizontal asymptote of

f(x)=e^x - x

lim x->infinity (e^x)-x= infinity
when it's going towards infinity, shouldn't it equal to negative infinity, since 0-infinity = - infinity

lim x-> -infinity (e^x)-x= infinity

To find the horizontal asymptote of the function f(x) = e^x - x, we need to determine the behavior of the function as x approaches positive infinity and negative infinity.

As x approaches positive infinity, we take the limit of the function (e^x) - x.
lim(x->∞) (e^x) - x = ∞ - ∞ = ∞

When we have an indeterminate form like ∞ - ∞, we cannot conclude the value of the limit directly. It could be infinity, negative infinity, or any other real number.

In this case, we can use a technique called L'Hôpital's rule to evaluate the limit. We take the derivative of the numerator and denominator and then evaluate the limit again.

Differentiating f(x) = e^x - x,
f'(x) = e^x - 1

Now, taking the limit again as x approaches positive infinity,
lim(x->∞) (e^x) - x = lim(x->∞) (e^x - 1) = ∞ - 1 = ∞

Therefore, as x approaches positive infinity, the function f(x) = e^x - x does not have a horizontal asymptote. Instead, it approaches positive infinity.

As x approaches negative infinity, we again take the limit of the function (e^x) - x.
lim(x->-∞) (e^x) - x = ∞ - (-∞) = ∞ + ∞ = ∞

Similar to the previous case, we have an indeterminate form, ∞ - ∞, and we can apply L'Hôpital's rule.

Differentiating f(x) = e^x - x,
f'(x) = e^x - 1

Now, taking the limit again as x approaches negative infinity,
lim(x->-∞) (e^x) - x = lim(x->-∞) (e^x - 1) = ∞ - 1 = ∞

Therefore, as x approaches negative infinity, the function f(x) = e^x - x does not have a horizontal asymptote. Instead, it also approaches positive infinity.

In summary, the function does not have a horizontal asymptote as x approaches either positive infinity or negative infinity.