Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Views: 4898

Limits at Infinity

Limits at infinity truly are not so difficult once you've become familiarized with then, but at first, they may seem somewhat obscure. The basic premise of limits at infinity is that many functions approach a specific y-value as their independent variable becomes increasingly large or small. We're going to look at a few different functions as their independent variable approaches infinity, so start a new worksheet called 04-Limits at Infinity, then recreate the following graph.
plot(1/(x-3), x, -100, 100, randomize=False, plot_points=10001,detect_poles=True) \ .show(xmin=-10, xmax=10, ymin=-10, ymax=10) #Plot 1/(x-3) from -100 to 100. The backslash indicates that the command continues on the second line. Not randomizing the points on the graph produces a consistently smoother result, and plot_points=10001 and detect_poles=True is simply so that SageMath won't draw a line for the vertical asymptote at x=3. Though the graph was plotted from -100 to 100, it is only shown for a domain and range of -10 to 10.

In this graph, it is fairly easy to see that as xx becomes increasingly large or increasingly small, the y-value of f(x)f(x) becomes very close to zero, though it never truly does equal zero. When a function's curve suggests an invisible line at a certain y-value (such as at y=0 in this graph), it is said to have a horizontal asymptote at that y-value. We can use limits to describe the behavior of the horizontal asymptote in this graph, as:

limx1x3=0\underset{x\to\infty}{\rm{lim}}\dfrac{1}{x-3}=0 and limx1x3=0\underset{x\to-\infty}{\rm{lim}}\dfrac{1}{x-3}=0

Try setting xmin as -100 and xmax as 100, and you will see that f(x)f(x) becomes very close to zero indeed when xx is very large or very small. Which is what you should expect, since one divided by a large number will naturally produce a small result.

The concept of one-sided limits can be applied to the vertical asymptote in this example, since one can see that as xx approaches 33 from the left, the function approaches negative infinity, and that as xx approaches 33 from the right, the function approaches positive infinity, or:

limx31x3=\underset{x\to3^{-}}{\rm{lim}}\dfrac{1}{x-3}=-\infty and limx3+1x3=\underset{x\to3^{+}}{\rm{lim}}\dfrac{1}{x-3}=\infty

Unfortunately, the behavior of functions as xx approaches positive or negative infinity is not always so easy to describe. If ever you run into a case where you can't discern a function's behavior at infinity--whether a graph isn't available or isn't very clear--imagining what sort of values would be produced when ten-thousand or one-hundred thousand is substituted for xx will normally give you a good indication of what the function does as xx approaches infinity.

Powers and Exceptions

Let's analyze a couple of not-so-straightforward examples concerning limits at infinity to ensure a full understanding of how they work. Take a look at this strangely bird-like function:

plot((2*x^4 + x^2 + 2)/(x^4 + 1), x, -4, 4,xmin=-3, xmax=3, ymin=-1, ymax=2.5)+text('f(x)=(2*x^4 + x^2 + 2)/(x^4 + 1)',(3,1))

The graph gives it away; the limit of the function as xx approaches either positive or negative infinity is 22. But what if we didn't have the graph? There are actually a couple of clues as to what value the function approaches at both infinities. Compare the numerator to the denominator: see how the "highest power" of each polynomial is 44? The numerator has 2x42x^4 and the denominator has simply x4x^4 Perhaps you see where this is going--what do you get when you divide 2x42x^4 by x4x^4? Why, 22 of course. Simply put, when the numerator and the denominator of a function have the same power--when the highest exponents of xx between the top and bottom of the fraction match--the function will have a horizontal asymptote at y equals (coefficient of numerator's highest power) / (coefficient of denominator's highest power).

Well...maybe that wasn't so simple. Let me reiterate with a general case. For a function like this one:

f(x)=axn+...bxn+...f(x)=\dfrac{ax^n+...}{bx^n+...}

Assuming that nn is the highest exponent of both the numerator and denominator and that aa and bb are coefficients:

limx±axn+...bxn+...=ab\underset{x\to\pm\infty}{\rm{lim}}\dfrac{ax^n+...}{bx^n+...}=\dfrac{a}{b}

For this trick to work, though, the function must be a rational expression (one polynomial divided by another) and cannot have trigonometric or other special functions in the numerator or denominator. For example, the horizontal asymptote of the following function cannot be found using the above method, as it refers to an expression where xx is an exponent.

f(x)=ex5x2xf(x)=\dfrac{e^x}{5^x-2x}

Before you graph this function to see if and where it has a horizontal asymptote, though, let us try a bit of logical analysis. First, which will grow the fastest, exe^x or 5x5^x? Evaluating 'float(e)' in SageMath will tell you that Euler's number ee equals approximately 2.71828182846, so 5x5^x will grow more quickly than exe^x. But what about the 2x2x in the denominator? Consider the growth, now, of 5x5^x relative to 2x2x. When xx is 55, the former evaluates to 31253125 while the latter evaluates to 1010. What you should gather from this is that 5x5^x trumps all; as xx approaches positive or negative infinity, the function will become the quotient of a big number (exe^x) divided by a really big number that only continues to grow. In other words, one could write this as:

limx±ex5x2x=1±=0\underset{x\to\pm\infty}{\rm{lim}}\dfrac{e^x}{5^x-2x}=\dfrac{1}{\pm\infty}=0

And tada! There you have it. Comparing relative growths is another way of figuring out the behavior of a function as its independent variable approaches infinity. Continue reading to learn about this lesson's final type of function, those that oscillate.

Oscillating Functions

plot(sin(x), x, -10, 10)+text('f(x)=sin(x)',(5,.5))

Like most of the trigonometric functions, as xx approaches positive or negative infinity, the sine function itself continues to jump up and down. An oscillating function is one that continues to move between two or more values as its independent variable (xx) approaches positive or negative infinity. The limit of an oscillating function f(x)f(x) as xx approaches positive or negative infinity is undefined. In the plot that you just created, try replacing 'sin\sin' with various other trigonometric functions such as 'cos\cos', 'tan\tan', 'sec\sec', 'csc\csc', 'cot\cot', or any of the arc-functions (like 'arctan\arctan') to observe whether they oscillate or whether they have a horizontal asymptote as xx approaches positive or negative infinity.

The next graph behaves differently though, as you may observe:

plot(sin(x)/x, x, -100, 100,ymin=-1,plot_points=10001)+text('f(x)=sin(x)/x',(45,.5))

Even though the function oscillates indefinitely due to the sine function in its numerator, I can tell you without a doubt that the limit of the function as xx approaches either positive or negative infinity is still zero. But why is this? The sine of a really big number must still be somewhere in the range of 1-1 and 11, while denominator will simply be a really big number. If we create a table of values, we can watch the function's behavior when xx is large. Use the following code to create such a table.

def f(x): # Define a function f(x) that is equal to sin(x)/x. The 'def f(x):' signifies "when f(x) is referenced, do whatever the next indented line says" return sin(x) / x def table(): # Define a function called 'table' print '| x | f(x) |' # Print the header of the table print '|-------------------|' for x in [10000..10010]: # Starting at x=10000, perform the following indented command, incrementing x by 1 every time print '|%6i | %+f |'%(x, f(x)) # Print the current values of x and f(x) # Note: '%6i' means "fill six spaces with the following integer", while '%+f' means "put a positive or negative sign in front of the following floating point number". The '%(x, f(x))' at the end of the line tells SageMath which numbers to use when it replaces the preceding percentage signs. table()
| x | f(x) | |-------------------| | 10000 | -0.000031 | | 10001 | -0.000097 | | 10002 | -0.000074 | | 10003 | +0.000017 | | 10004 | +0.000092 | | 10005 | +0.000083 | | 10006 | -0.000003 | | 10007 | -0.000086 | | 10008 | -0.000090 | | 10009 | -0.000011 | | 10010 | +0.000077 |

There is another way to prove that the limit of sin(x)x\dfrac{\sin(x)}{x} as xx approaches positive or negative infinity is zero. Whether you have heard of it as the pinching theorem, the sandwich theorem or the squeeze theorem, as I will refer to it here, the squeeze theorem says that for three functions g(x)g(x), f(x)f(x), and h(x)h(x),

If g(x)f(x)h(x)g(x)\leq f(x)\leq h(x) and limxah(x)=L\underset{x\to a}{\rm{lim}} h(x)=L,

then limxaf(x)=L\underset{x\to a}{\rm{lim}}f(x)=L

To apply this theorem, we have to find a function g(x)g(x) that is less than f(x)f(x) as well as a function h(x)h(x) that is greater than f(x)f(x). Since sin(x)\sin(x) is always somewhere in the range of 1-1 and 1,1, we can set g(x)g(x) equal to 1x\dfrac{-1}{x} and h(x)h(x) equal to 1x\dfrac{1}{x}. We know that the limit of both 1x\dfrac{-1}{x} and 1x\dfrac{1}{x} as xx approaches either positive or negative infinity is zero, therefore the limit of sin(x)x\dfrac{\sin(x)}{x} as xx approaches either positive or negative infinity is zero. One could write this out as:

Given that g(x)=1xg(x)=-\dfrac{1}{x} and h(x)=1xh(x)=\dfrac{1}{x},

Since g(x)sin(x)xh(x)g(x)\leq\dfrac{\sin(x)}{x}\leq h(x) for all x in (,)(-\infty,\infty) and limx±g(x)=limx±h(x)=0,\underset{x\to\pm\infty}{\rm{lim}}g(x)=\underset{x\to\pm\infty}{\rm{lim}}h(x)=0,

It follows that limx±sin(x)x=0\underset{x\to\pm\infty}{\rm{lim}}\dfrac{\rm{sin}(x)}{x}=0

Practice Problems

Find the limit of each function as xx approaches positive and negative infinity, if either exists. Try determining each limit by analysis and/or plotting, then check your results in the Notebook using 'limit(..., x=...)'.

1) g(x)=ln(x)g(x)=\ln(x)

2) f(x)=3x24x35x2+x+1f(x)=\dfrac{3x^2-4x-3}{5x^2+x+1}

3) h(x)=2xx2+3h(x)=\dfrac{2x}{\sqrt{x^2+3}}

To view answers, select this cell and paste it into your own sagews, and then double click on it

[Previous: One-Sided Limits](One-Sided_Limits.sagews) | [To Main](Introduction.sagews) | [Next: Supplement: Slant Asymptotes](Slant_Asymptotes.sagews)