{"id":147,"date":"2012-06-25T08:30:10","date_gmt":"2012-06-25T13:30:10","guid":{"rendered":"https:\/\/blogs.mathworks.com\/cleve\/?p=147"},"modified":"2016-12-05T13:48:26","modified_gmt":"2016-12-05T18:48:26","slug":"exponential-growth","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/cleve\/2012\/06\/25\/exponential-growth\/","title":{"rendered":"Exponential Growth"},"content":{"rendered":"&nbsp;\r\n<div class=\"content\"><!--introduction-->What, exactly, is exponential growth? What is <i>e<\/i> and what does it have to do with exponential growth? A simple MATLAB interactive graphic introduces these concepts.\r\n\r\n<!--\/introduction-->\r\n<h3>Contents<\/h3>\r\n<div>\r\n<ul>\r\n \t<li><a href=\"#d270b5c2-86a7-4bc8-8b33-c9f6f6d3a4b8\">Exponential growth.<\/a><\/li>\r\n \t<li><a href=\"#73582c29-a29c-4de0-8db4-8a551d2b9eae\">Approximate derivative.<\/a><\/li>\r\n \t<li><a href=\"#25a3c767-199c-4898-b015-0e14b0ce762d\">2^t<\/a><\/li>\r\n \t<li><a href=\"#d7f25d58-059b-4f5d-9914-dad2ca731275\">Interactive interface.<\/a><\/li>\r\n \t<li><a href=\"#2a77bfbf-874d-47e2-b026-103e59030a72\">Animation.<\/a><\/li>\r\n \t<li><a href=\"#974d369f-232e-4901-8400-1efb9368fd42\">pi^t<\/a><\/li>\r\n \t<li><a href=\"#43e02e88-c26e-4529-a536-4f78d49b3891\">Finding e.<\/a><\/li>\r\n \t<li><a href=\"#972c7541-8268-4d71-b6f5-7ccb9bf2fcb5\">e^t<\/a><\/li>\r\n<\/ul>\r\n<\/div>\r\n<h4>Exponential growth.<a name=\"d270b5c2-86a7-4bc8-8b33-c9f6f6d3a4b8\"><\/a><\/h4>\r\nTo most people \"exponential growth\" simply means \"very rapid growth\". But, more precisely, a time varying quantity grows expontially if the rate of growth is proportional to size of the quantity itself. The rate can even be negative, in which case it is \"exponential decay\".\r\n\r\nI think that students who have taken calculus in high school or college should understand the mathematical ideas involved in exponential growth, but I'm afraid that most of them don't. When I ask students to tell me the derivative of $t^3$, they can usually respond $3t^2$. When I ask them \"why?\", they say \"take the $3$, put it out in front, and subtract $1$ from the exponent\". Finding derivatives is a purely mechanical process, like adding fractions or solving quadratic equations. When I ask for the derivative of $3^t$, some will even apply the same process to get $t 3^{t-1}$. There is no understanding of the relationship between differentiation and rate of change.\r\n\r\nA function $f(t)$ is growing exponentially if its growth rate, its derivative, is proportional to the function itself. Perhaps the most important function in all of mathematics is the one where this proportionality constant is equal to one, so the function is its own derivative. Let's discover that function.\r\n<h4>Approximate derivative.<a name=\"73582c29-a29c-4de0-8db4-8a551d2b9eae\"><\/a><\/h4>\r\nWe can get numerical values and graphs of derivatives without actually differentiating anything. For our purposes, approximate derivatives based on the notion of rate of change are, in some ways, even preferable to actual derivatives. We just have to pick a small step size $h$, say $h = .0001$. Then the approximate derivative of $f(t)$ is\r\n\r\n$$ \\dot{f}(t) = \\frac{f(t+h)-f(t)}{h} $$\r\n<h4>2^t<a name=\"25a3c767-199c-4898-b015-0e14b0ce762d\"><\/a><\/h4>\r\nWhat do we mean by the function\r\n\r\n$$ f(t) = 2^t $$\r\n\r\nIf $t$ is a positive integer, then $2^t$ is $2$ multiplied by itself $t$ times.\r\n\r\n$$ 2^0 = 1, \\ \\ 2^1 = 2, \\ \\ 2^2 = 4, ... $$\r\n\r\nIf $t$ is a negative integer, then $2^t$ is $1\/2$ multiplied by itself $|t|$ times.\r\n\r\n$$ 2^{-1} = 1\/2, \\ \\ 2^{-2} = 1\/4, ... $$\r\n\r\nIf $t = p\/q$ is a rational number, the ratio of two integers, $2^{p\/q}$ is the $q$-th root of the $p$-th power of $2$.\r\n\r\n$$ 2^{1\/2} = \\sqrt{2} = 1.4142, \\ \\\r\n2^{355\/113} = \\sqrt[113]{2^{355}} = 8.8250, ... $$\r\n\r\nTheoretically, for floating point arithmetic, this is all we need to know. All floating point numbers are ratios of two integers. We do not have to be concerned yet about the definition of $2^t$ for irrational $t$. If MATLAB can compute powers and roots, we can plot the graph of $2^t$.\r\n<h4>Interactive interface.<a name=\"d7f25d58-059b-4f5d-9914-dad2ca731275\"><\/a><\/h4>\r\nThe function <tt>expgui<\/tt> is included with the software for the book <i>Experiments with MATLAB<\/i>. I invite you to <a href=\"https:\/\/www.mathworks.com\/content\/dam\/mathworks\/mathworks-dot-com\/moler\/exm\/exm\/expgui.m\">download the function<\/a> and run it. It plots the graph of $a^t$ and its approximate derivative. Here is the code that generates the initial plot, with $a = 2$. You can see that the derivative, in green, has the same shape as the function, in blue. This is exponential growth.\r\n<pre class=\"codeinput\">   t = 0:1\/64:2;\r\n   h = .0001;\r\n\r\n   <span class=\"comment\">% Compute y = a^t and its approximate derivative<\/span>\r\n\r\n   a = 2.0;\r\n   y = a.^t;\r\n   ydot = (a.^(t+h) - a.^t)\/h;\r\n\r\n   <span class=\"comment\">% Plot<\/span>\r\n\r\n   plot(t,[y; ydot])\r\n\r\n   <span class=\"comment\">% Label<\/span>\r\n\r\n   axis([0 2 0 9])\r\n   fs = get(0,<span class=\"string\">'defaulttextfontsize'<\/span>)+2;\r\n   text(0.3,6.0,<span class=\"string\">'a = 2.000'<\/span>,<span class=\"string\">'fontsize'<\/span>,fs,<span class=\"string\">'fontweight'<\/span>,<span class=\"string\">'bold'<\/span>)\r\n   title(<span class=\"string\">'y = a^t'<\/span>,<span class=\"string\">'fontsize'<\/span>,fs,<span class=\"string\">'fontweight'<\/span>,<span class=\"string\">'bold'<\/span>)\r\n   legend(<span class=\"string\">'y'<\/span>,<span class=\"string\">'dy\/dt'<\/span>,<span class=\"string\">'location'<\/span>,<span class=\"string\">'northwest'<\/span>)\r\n   xlabel(<span class=\"string\">'t'<\/span>)\r\n   ylabel(<span class=\"string\">'y'<\/span>)\r\n<\/pre>\r\n<img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/cleve\/exponential_01.png\" alt=\"\" hspace=\"5\" vspace=\"5\" \/>\r\n<h4>Animation.<a name=\"2a77bfbf-874d-47e2-b026-103e59030a72\"><\/a><\/h4>\r\nAt this point, if you are actually running <tt>expgui<\/tt>, you can move the blue line with your mouse, changing the value of $a$. If you don't have MATLAB, or haven't downloaded <tt>expgui<\/tt>, you can click on this movie to see a simulation of the animation. I hope you get to move the line yourself with <tt>expgui<\/tt>. The tactile experience is much more satisfying that just watching the movie.\r\n<h4>pi^t<a name=\"974d369f-232e-4901-8400-1efb9368fd42\"><\/a><\/h4>\r\nIn case you are not able to run <tt>expgui<\/tt> or watch the movie, here is the plot of $\\pi^t$ and its approximate derivative.\r\n<pre class=\"codeinput\">   a = pi;\r\n   y = a.^t;\r\n   ydot = (a.^(t+h) - a.^t)\/h;\r\n   p = get(gca,<span class=\"string\">'children'<\/span>);\r\n   set(p(3),<span class=\"string\">'ydata'<\/span>,y)\r\n   set(p(2),<span class=\"string\">'ydata'<\/span>,ydot)\r\n   set(p(1),<span class=\"string\">'string'<\/span>,<span class=\"string\">'a = 3.142'<\/span>)\r\n<\/pre>\r\n<img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/cleve\/exponential_02.png\" alt=\"\" hspace=\"5\" vspace=\"5\" \/>\r\n<h4>Finding e.<a name=\"43e02e88-c26e-4529-a536-4f78d49b3891\"><\/a><\/h4>\r\nYou should soon see that the graph of the derivative of $a^t$ always has the same shape as the graph of $a^t$ itself. If $a$ is less than $2.7$ the derivative is below the function, while if $a$ is greater than $2.8$ the derivative is above the function. By moving the mouse carefully you can find a value in between where the curves lie on top of each other, The critical value of $a$ is 2.718. You have discovered $e$ and $e^t$, the only function in the world that is equal to its own derivative. And, you didn't have to differentiate anything. Here is the final graph.\r\n<pre class=\"codeinput\">   y = exp(t);\r\n   p = get(gca,<span class=\"string\">'children'<\/span>);\r\n   set(p(3),<span class=\"string\">'ydata'<\/span>,y)\r\n   set(p(2),<span class=\"string\">'ydata'<\/span>,y)\r\n   set(p(1),<span class=\"string\">'string'<\/span>,<span class=\"string\">'a = 2.718'<\/span>)\r\n<\/pre>\r\n<img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/cleve\/exponential_03.png\" alt=\"\" hspace=\"5\" vspace=\"5\" \/>\r\n<h4>e^t<a name=\"972c7541-8268-4d71-b6f5-7ccb9bf2fcb5\"><\/a><\/h4>\r\nIn contrast to its equally famous cousin, $\\pi$, the actual numerical value of $e$ is not so important. It's the function $e^t$, or <tt>exp(t)<\/tt> as it's known in MATLAB, that is fundamental. If you ever need to know the value of $e$, you can always use\r\n<pre class=\"codeinput\">format <span class=\"string\">long<\/span>\r\ne = exp(1)\r\n<\/pre>\r\n<pre class=\"codeoutput\">e =\r\n\r\n   2.718281828459046\r\n\r\n<\/pre>\r\nIt's pretty easy to memorize the first ten significant figures.\r\n<pre class=\"codeinput\">fprintf(<span class=\"string\">'e = %12.9f\\n'<\/span>,e)\r\n<\/pre>\r\n<pre class=\"codeoutput\">e =  2.718281828\r\n<\/pre>\r\n<script>\/\/ <![CDATA[\r\nfunction grabCode_0d6efd4b7ca149b791b64b3ff31eca4b() {\r\n        \/\/ Remember the title so we can use it in the new page\r\n        title = document.title;\r\n\r\n        \/\/ Break up these strings so that their presence\r\n        \/\/ in the Javascript doesn't mess up the search for\r\n        \/\/ the MATLAB code.\r\n        t1='0d6efd4b7ca149b791b64b3ff31eca4b ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' 0d6efd4b7ca149b791b64b3ff31eca4b';\r\n    \r\n        b=document.getElementsByTagName('body')[0];\r\n        i1=b.innerHTML.indexOf(t1)+t1.length;\r\n        i2=b.innerHTML.indexOf(t2);\r\n \r\n        code_string = b.innerHTML.substring(i1, i2);\r\n        code_string = code_string.replace(\/REPLACE_WITH_DASH_DASH\/g,'--');\r\n\r\n        \/\/ Use \/x3C\/g instead of the less-than character to avoid errors \r\n        \/\/ in the XML parser.\r\n        \/\/ Use '\\x26#60;' instead of '<' so that the XML parser\r\n        \/\/ doesn't go ahead and substitute the less-than character. \r\n        code_string = code_string.replace(\/\\x3C\/g, '\\x26#60;');\r\n\r\n        copyright = 'Copyright 2012 The MathWorks, Inc.';\r\n\r\n        w = window.open();\r\n        d = w.document;\r\n        d.write('\r\n\r\n<pre>\\n');\r\n        d.write(code_string);\r\n\r\n        \/\/ Add copyright line at the bottom if specified.\r\n        if (copyright.length > 0) {\r\n            d.writeln('');\r\n            d.writeln('%%');\r\n            if (copyright.length > 0) {\r\n                d.writeln('% _' + copyright + '_');\r\n            }\r\n        }\r\n\r\n        d.write('<\/pre>\r\n\r\n\r\n\\n');\r\n\r\n        d.title = title + ' (MATLAB code)';\r\n        d.close();\r\n    }\r\n\/\/ ]]><\/script>\r\n<p style=\"text-align: right; font-size: xx-small; font-weight: lighter; font-style: italic; color: gray;\">\r\n<a><span style=\"font-size: x-small; font-style: italic;\">Get\r\nthe MATLAB code<noscript>(requires JavaScript)<\/noscript><\/span><\/a>\r\n\r\nPublished with MATLAB\u00ae 7.14<\/p>\r\n<p class=\"footer\">\r\nPublished with MATLAB\u00ae 7.14<\/p>\r\n\r\n<\/div>\r\n<!--\r\n0d6efd4b7ca149b791b64b3ff31eca4b ##### SOURCE BEGIN #####\r\n%% Discovering Exponential Growth\r\n% What, exactly, is exponential growth?\r\n% What is _e_ and what does it have to do with exponential growth?\r\n% A simple MATLAB interactive graphic introduces these concepts.\r\n\r\n%% Exponential growth.\r\n% To most people \"exponential growth\" simply means \"very rapid growth\".\r\n% But, more precisely, a time varying quantity grows expontially\r\n% if the rate of growth is proportional to size of the quantity itself.\r\n% The rate can even be negative, in which case it is \"exponential decay\".\r\n\r\n%%\r\n% I think that students who have taken calculus in high school or college\r\n% should understand the mathematical ideas involved in exponential growth,\r\n% but I'm afraid that most of them don't.\r\n% When I ask students to tell me the derivative of $t^3$, they can\r\n% usually respond $3t^2$.  When I ask them \"why?\", they say \"take the $3$,\r\n% put it out in front, and subtract $1$ from the exponent\".\r\n% Finding derivatives is a purely mechanical process, like adding fractions\r\n% or solving quadratic equations.\r\n% When I ask for the derivative of $3^t$, some will even apply the same\r\n% process to get $t 3^{t-1}$.\r\n% There is no understanding of the relationship between differentiation\r\n% and rate of change.\r\n\r\n%%\r\n% A function $f(t)$ is growing exponentially if its growth rate,\r\n% its derivative, is proportional to the function itself.\r\n% Perhaps the most important function in all of mathematics is\r\n% the one where this proportionality constant is equal to one,\r\n% so the function is its own derivative.\r\n% Let's discover that function.\r\n\r\n%% Approximate derivative.\r\n% We can get numerical values and graphs of derivatives without actually\r\n% differentiating anything.  For our purposes, approximate derivatives\r\n% based on the notion of rate of change are, in some ways, even preferable\r\n% to actual derivatives.\r\n% We just have to pick a small step size $h$, say $h = .0001$.\r\n% Then the approximate derivative of $f(t)$ is\r\n%\r\n% $$ \\dot{f}(t) = \\frac{f(t+h)-f(t)}{h} $$\r\n\r\n%% 2^t\r\n% What do we mean by the function\r\n%\r\n% $$ f(t) = 2^t $$\r\n%\r\n% If $t$ is a positive integer, then $2^t$ is $2$ multiplied by itself\r\n% $t$ times.\r\n%\r\n% $$ 2^0 = 1, \\ \\ 2^1 = 2, \\ \\ 2^2 = 4, ... $$\r\n%\r\n% If $t$ is a negative integer, then $2^t$ is $1\/2$ multiplied\r\n% by itself $|t|$ times.\r\n%\r\n% $$ 2^{-1} = 1\/2, \\ \\ 2^{-2} = 1\/4, ... $$\r\n%\r\n% If $t = p\/q$ is a rational number, the ratio of two integers,\r\n% $2^{p\/q}$ is the $q$-th root of the $p$-th power of $2$.\r\n%\r\n% $$ 2^{1\/2} = \\sqrt{2} = 1.4142, \\ \\\r\n%    2^{355\/113} = \\sqrt[113]{2^{355}} = 8.8250, ... $$\r\n%\r\n% Theoretically, for floating point arithmetic, this is all we need to know.\r\n% All floating point numbers are ratios of two integers.\r\n% We do not have to be concerned yet about the definition of $2^t$ for\r\n% irrational $t$.\r\n% If MATLAB can compute powers and roots, we can plot the graph of $2^t$.\r\n\r\n%% Interactive interface.\r\n% The function |expgui| is included with the software for the book\r\n% _Experiments with MATLAB_.\r\n% I invite you to\r\n% <https:\/\/www.mathworks.com\/moler\/exm\/exm\/expgui.m download the function>\r\n% and run it.  It plots the graph of $a^t$ and its approximate derivative.\r\n% Here is the code that generates the initial plot, with $a = 2$.\r\n% You can see that the derivative, in green, has the same shape as the\r\n% function, in blue.  This is exponential growth.\r\n\r\nt = 0:1\/64:2;\r\nh = .0001;\r\n\r\n% Compute y = a^t and its approximate derivative\r\n\r\na = 2.0;\r\ny = a.^t;\r\nydot = (a.^(t+h) - a.^t)\/h;\r\n\r\n% Plot\r\n\r\nplot(t,[y; ydot])\r\n\r\n% Label\r\n\r\naxis([0 2 0 9])\r\nfs = get(0,'defaulttextfontsize')+2;\r\ntext(0.3,6.0,'a = 2.000','fontsize',fs,'fontweight','bold')\r\ntitle('y = a^t','fontsize',fs,'fontweight','bold')\r\nlegend('y','dy\/dt','location','northwest')\r\nxlabel('t')\r\nylabel('y')\r\n\r\n%% Animation.\r\n% At this point, if you are actually running |expgui|, you can move\r\n% the blue line with your mouse, changing the value of $a$.\r\n% If you don't have MATLAB, or haven't downloaded |expgui|, you can\r\n% <https:\/\/blogs.mathworks.com\/images\/cleve\/exp_movie.gif click on this movie>\r\n% to see a simulation of the animation.\r\n% I hope you get to move the line yourself with |expgui|.\r\n% The tactile experience is much more satisfying that just watching the movie.\r\n\r\n%% pi^t\r\n% In case you are not able to run |expgui| or watch the movie,\r\n% here is the plot of $\\pi^t$ and its approximate derivative.\r\n\r\na = pi;\r\ny = a.^t;\r\nydot = (a.^(t+h) - a.^t)\/h;\r\np = get(gca,'children');\r\nset(p(3),'ydata',y)\r\nset(p(2),'ydata',ydot)\r\nset(p(1),'string','a = 3.142')\r\n\r\n%% Finding e.\r\n% You should soon see that the graph of the derivative of $a^t$ always has\r\n% the same shape as the graph of $a^t$ itself.\r\n% If $a$ is less than $2.7$ the derivative is below the function,\r\n% while if $a$ is greater than $2.8$ the derivative is above the function.\r\n% By moving the mouse carefully you can find a value in between where\r\n% the curves lie on top of each other,\r\n% The critical value of $a$ is 2.718.\r\n% You have discovered $e$ and $e^t$, the only function in the world that\r\n% is equal to its own derivative.\r\n% And, you didn't have to differentiate anything.\r\n% Here is the final graph.\r\n\r\ny = exp(t);\r\np = get(gca,'children');\r\nset(p(3),'ydata',y)\r\nset(p(2),'ydata',y)\r\nset(p(1),'string','a = 2.718')\r\n\r\n%% e^t\r\n% In contrast to its equally famous cousin, $\\pi$, the actual numerical\r\n% value of $e$ is not so important.  It's the function $e^t$, or |exp(t)|\r\n% as it's known in MATLAB, that is fundamental.  If you ever need to know\r\n% the value of $e$, you can always use\r\n\r\nformat long\r\ne = exp(1)\r\n\r\n%%\r\n% It's pretty easy to memorize the first ten significant figures.\r\n\r\nfprintf('e = %12.9f\\n',e)\r\n\r\n##### SOURCE END ##### 0d6efd4b7ca149b791b64b3ff31eca4b\r\n-->","protected":false},"excerpt":{"rendered":"<!--introduction-->What, exactly, is exponential growth? What is <i>e<\/i> and what does it have to do with exponential growth? A simple MATLAB interactive graphic introduces these concepts.\r\n\r\n<!--\/introduction-->... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/cleve\/2012\/06\/25\/exponential-growth\/\">read more >><\/a><\/p>","protected":false},"author":78,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[12],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts\/147"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/users\/78"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/comments?post=147"}],"version-history":[{"count":18,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts\/147\/revisions"}],"predecessor-version":[{"id":2170,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts\/147\/revisions\/2170"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/media?parent=147"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/categories?post=147"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/tags?post=147"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}