Going to Infinity: What Happens to Functions When the Independent Variable Gets Bigger and Bigger and Bigger?

Introduction

OBJECTIVE: To interpret limits going to infinity graphically and numerically.

In this module, you will explore limits of functions as the independent variable approaches infinity, and you will formulate and test some end-behavior models. We will examine graphs and create tables of function values for large values of the independent variable. The focus here is on comparing the behavior of some important functions that you will encounter throughout your study of calculus.

Technology Guidelines

NOTE:  If you have just finished a module, restart Mathematica or Quit Kernel under the Evaluation pull-down menu before executing a new module.
TO OPEN CELLS, click on the arrow to the left of the cell or put your cursor on the right cell bracket and double click. To open all cells, highlight the bracket on the far right and select Grouping under the Cell pull-down menu and select Open All Subgroups.
TO STOP AN EXECUTION
Select the Evaluation pull-down menu and click on Abort Evaluation.
ORDER OF EXECUTION
Execute cells in the order given. Do not skip any Input cells within a given notebook.
SAVING NOTEBOOKS
You can save anytime to any directory you choose, and it is wise to save often. However, before you do your final save to reduce the size of your file, it is a good idea to delete all your output by selecting the Delete All Output selection under the Cell pull-down menu.
EXPERIENCING MAJOR PROBLEMS
Save if appropriate, then shut down Mathematica and start it up again.

Part I:  Exploring End Behavior

Consider the following four examples. Can you determine why the end behavior is so different in each case?

Example 1:  (x/(Sqrt[10+(x^2)]))

Clear[x,y,g1,g2,g3,g4]
g1[x_]:=x/(Sqrt[10+(x^2)])
Plot[g1[x],{x,-10,10},AxesLabel->{x,y}]

It looks as though the function is approaching 1 as x gets large. Let's evaluate the function at 1 million.

g1[1000000.]

Example 2:  (x/(Sqrt[10+(x^3)]))

Now, we will increase the power of x in the denominator.

g2[x_]:=x/(Sqrt[10+(x^3)])
Plot[g2[x],{x,-2,20},AxesLabel->{x,y}]

What do you think happens as x gets bigger and bigger? Let's plot the function out further and also evaluate it at a large value of x, say 1 billion.

Plot[g2[x],{x,-2,2000},AxesLabel->{x,y}]

g2[1.*(10^9)]

Example 3:  (x/(Sqrt[10+x]))

Now, we will decrease the power of x in the denominator.

g3[x_]:=x/(Sqrt[10+x])
Plot[g3[x],{x,-9,20},AxesLabel->{x,y}]

What do you suppose is happening as x gets large beyond bound? Let's extend the graph.

Plot[g3[x],{x,-9,1000},AxesLabel->{x,y}]

It looks as though it is getting bigger, but not terribly fast. Let's evaluate the function at 1 trillion.

g3[1.*(10^12)]

Would you suspect that the function is getting large without bound?

Example 4:  ((Log[x])/(Sqrt[10+(x^2)]))

Here is a function involving the natural log of x.

\[MathematicaIcon] About Mathematica

g4[x_]:=Log[x]/(Sqrt[10+x])
Plot[g4[x],{x,.2,20},AxesLabel->{x,y},AxesOrigin->{0,0}]

What do you think happens to the value of g4(x) as x gets bigger and bigger? Do we need to extend the plot?

Plot[g4[x],{x,.2,200},AxesLabel->{x,y}]

Now it has turned downward and seems to be approaching 0, but very slowly. Is that what you guessed before? Let's evaluate the function at x= 1 trillion to see if the downward trend continues.

g4[1.*(10^12)]

You Try It: Part I

Limits Involving ((Log[x])/(Sqrt[10+(x^n)]))

In the fourth example in Part I, we used 2 for the power of x in the denominator of the function ((ln x)/(Sqrt[10+(x^2)])). In this example, we want you to consider other powers of x, therefore, we leave the power variable and call it n. Explore what happens as you change the value of n, and see if you can find a value for n that will give a finite nonzero value for the limit as x approaches infinity. We help you get started by looking at n=0.1.

h1[x_]:=Log[x]/(Sqrt[10+(x^n)])
n=.1;
bigx=(10^12);
Plot[h1[x],{x,1,1.*bigx},AxesLabel->{x,y}]
h1[bigx]

Do you think this function approaches a finite limit other than 0 as x approaches infinity? Check it out for a very large value of x (say, (10^50) for example) by changing the value of bigx (in red) in the cell above and re-executing it. If it doesn't work, try some other values for n (in red), and see if you can find one that does work.

Part II: End-Behavior Models

An end-behavior model for a function f(x) is a function g(x) such that (Underscript[lim , x->∞])((f(x))/(g(x)))=1. Can we find an end-behavior model for f(x)=(x/(Sqrt[10+(x^2)])), the first example function in Part I? To do this you should consider what happens to the denominator when x is a very large number. In this case, 10+(x^2)≈(x^2), since 10 is almost insignificant in comparison to (x^2) when x is large, and (Sqrt[10+(x^2)])≈(Sqrt[(x^2)])=x. Therefore, we guess that g(x)=(x/x)=1 is an end-behavior model for f(x). Let's test it out, first by taking the limit of ((f(x))/(g(x))) as x approaches infinity, and then by plotting f(x) and g(x) on the same graph.

Clear[x,f,g]
f[x_]=(x/(Sqrt[10+(x^2)]));
g[x_]=1;
Limit[f[x]/g[x],x->∞]

Plot[{f[x],g[x]},{x,-50,50},PlotStyle->{RGBColor[1,0,0],RGBColor[0,0,1]},AxesLabel->{"x","y"}]

Because the value of the limit is 1, g(x) is an end-behavior model for f(x). The graph shows that as x gets large, f(x) and g(x) get closer together, as we would expect.

You Try It: Part II

1. Use the approach outlined in Part II to find end-behavior models for the two functions in Examples 2 and 3 in Part I. Test your model by evaluating (Underscript[lim , x->∞])((f(x))/(g(x))), and provide support for the result by plotting f(x) and g(x) on the same graph. 

2. Based upon the results of your investigation of the function f(x)=((ln x)/(Sqrt[10+(x^2)]))in Part I, Example 3, do you think there is an end-behavior model for f(x) that is of the form g(x)=(x^n), where n is a positive number less than 1? We said earlier that the log functions grow very slowly as x gets larger. Well, radical functions of the form just described also grow slowly. Which functions do you think grow more slowly; log functions or those of the form (x^n), where n is a rational number less than 1?

Part III:  Rates of Growth of Polynomial Functions Versus Exponential Functions

Which type of function will grow faster as x gets large without bound, a polynomial function like (x^100) or an exponential function like (2^x)? Let's see what we can find out about this issue by graphing the ratio of the two functions.

Clear[f,x]
f[x_]:=(x^100)/(2^x)
Plot[f[x],{x,0,100},AxesLabel->{x,y},PlotRange->All]

This graph seems to suggest that the polynomial function grows more rapidly and outstrips the exponential function. To be sure that this pattern continues, let's plot the ratio of the two functions over a larger domain.

Plot[f[x],{x,0,300},AxesLabel->{x,y},PlotRange->All]
Print["The function evaluated at x = 300 is ",f[300.]]

Look at this!  For a while, the polynomial function out-runs the exponential function, but eventually it is overtaken by the exponential function. The value of the ratio at x = 300 is still large, however, so let's see what happens for values of x in the neighborhood of 1000.

Plot[f[x],{x,1000,1010}]
Print["The function evaluated at x = 1010 is ",f[1010.]]

It appears that (2^x) is now growing faster than (x^100), therefore, the ratio of the latter over the former is going to 0, as x gets larger. 

Next, we create a table with very large values of x to see if the pattern persists.

tf=Table[{x,f[x]},{x,1.*(10^6),2.*(10^6),1.*(10^5)}]//N;
TableForm[tf,TableHeadings->{None,{"x","ratio"}}]

These ratios look very close to 0.

In the long run, exponential functions of the form (a^x), where a is a positive constant greater than 1, will always outgrow a polynomial function of the form (x^n), no matter how big n is and no matter how close a is to 1. The power function may dominate at first, but in the end the exponential function surpasses it.

You Try It: Part III

What does this have to do with NP-Complete problems?

A very important concept in computer science is related to polynomial growth rate versus exponential growth rate. Look up the term NP-Complete, and write two paragraphs explaining what this is about and why it is important.

Part IV:  Euler's Very Special Number

Here is a function that you may have seen before if you studied interest on an investment that compounds more and more frequently during a year. Let's suppose that you invest $100 in an account that pays interest at an annual percentage rate of 5% and you leave the earned interest in the account to compound. If the interest is compounded n times per year, the amount of principal in the account at the end of one year will be 100(((1+.05/n))^n). We graph the amount of principal in the account after one year for n=1, 2, . . . , 12, and generate a table of values.

Clear[f,n]
f[n_]:=100(((1+.05/n))^n)
accumulation=Table[{n,f[n]},{n,1,12}];
ListPlot[accumulation,AxesLabel->{"n","balance-yr 1"},PlotRange->{{0,12},All},PlotStyle->{PointSize[0.02],RGBColor[0,0,1]}]
Print["Here are some examples of the amount in the account (in dollars) at the end of one year if the interest is compounded once twice,..., up to 12 times a year (monthly). ",TableForm[accumulation,TableHeadings->{None,{"interest pd / yr","account balance"}}]]

What do you think happens to the function below, as n gets larger and larger, in other words, as you approach a situation where the interest compounds continuously at every instant in time during the year? To find out, let's evaluate the limit of the principal function as n goes to infinity.

Limit[f[n],n->∞]

Because we wrote the principal function with the interest rate in decimal form, Mathematica evaluates the function using floating-point arithmetic, giving a decimal approximation for the value of the function and the limit. If we rewrite the principal function with the interest rate in fraction form, Mathematica will give us the exact value of the limit, provided it can evaluate the limit. Let's see what happens.

Limit[100(((1+(5/(100n))))^n),n->∞]

Are you surprised? Why is this happening? The base is Euler's number e. Why is this happening?

You Try It: Part IV

Limits Involving (((1 + r/n))^nt)

1. Evaluate the last limit in Part IV, but change the initial investment amount to P0, and change the annual percentage rate to r. Be sure that you Clear[r] before you evaluate the limit, otherwise, Mathematica will use the last value that was assigned to r when it evaluates the limit.

Now we will consider what would happen if we were to invest $100 for periods longer than one year. Our investment earns interest for t years, and we consider what happens over the years if interest on our investment is compounded quarterly, contrasting this to what happens when the interest is compounded continuously. We start with an annual percentage rate of 15% and see how the investment grows if left untouched over the years. The amount of principal in the account after t years is given by 100(((1+(r/n)))^(n t)), where n is the number of times the interest is compounded each year, and t is the number of years the money is invested.

Clear[r,n]
r = 0.15; 
f1[n_] := 100(((1+r/n))^n)
f2[n_] := 100(((1+r/n))^(2n))
f3[n_] := 100(((1+r/n))^(3n))
f4[n_] := 100(((1+r/n))^(4n))
f5[n_] := 100(((1+r/n))^(5n))
f10[n_] := 100(((1+r/n))^(10n))
f20[n_] := 100(((1+r/n))^(20n))
TableForm[{{years, "quarterly compounding", 
    "continuous compounding"}, 
   {1, f1[4], Limit[f1[n], {n -> Infinity}]}, 
   {2, f2[4], Limit[f2[n], {n -> Infinity}]}, 
   {3, f3[4], Limit[f3[n], {n -> Infinity}]}, 
   {4, f4[4], Limit[f4[n], {n -> Infinity}]}, 
   {5, f5[4], Limit[f5[n], {n -> Infinity}]}, 
   {10, f10[4], Limit[f10[n], {n -> Infinity}]}, 
   {20, f20[4], Limit[f20[n], {n -> Infinity}]}}]

To see the effect of the interest rate on the investment, build a table that shows the amount invested after 5 years for annual percentage rates of 5%, 10%, 15%, 20%, 25%, and 30%. In each row of the table, show the annual percentage rate, the principal in the investment account after 5 years when the interest is compounded quarterly, when it is compounded continuously, and the difference in the amount of principal for the two compounding methods. Which factor has more effect on the earnings, the annual percentage rate paid on the investment or the frequency at which the interest is compounded?

\[MathematicaIcon] About Mathematica

In Mathematica, the expression Log[x] refers to the natural log of x. If we want the log base ten, we would need to write Log[x, 10].
 Go back.