add CI action; rm stale files

This commit is contained in:
jverzani committed 2022-09-08 07:03:08 -04:00
1 parent 0db8896554
commit ba14dd8548
682 files changed
+573037 -8

No files matched your search

@@ -0,0 +1,15 @@
{
"hash": "28336c0a7c9467c98ef2917b094fad2e",
"result": {
"markdown": "# Exponential and logarithmic functions\n\n\n\nThis section uses the following add-on packages:\n\n``` {.julia .cell-code}\nusing CalculusWithJulia\nusing Plots\n```\n\n\n\n\n---\n\n\nThe family of exponential functions is used to model growth and decay. The family of logarithmic functions is defined here as the inverse of the exponential functions, but have reach far outside of that.\n\n\n## Exponential functions\n\n\nThe family of exponential functions is defined by $f(x) = a^x, -\\infty< x < \\infty$ and $a > 0$. For $0 < a < 1$ these functions decay or decrease, for $a > 1$ the functions grow or increase, and if $a=1$ the function is constantly $1$.\n\n\nFor a given $a$, defining $a^n$ for positive integers is straightforward, as it means multiplying $n$ copies of $a.$ From this, for *integer powers*, the key properties of exponents: $a^x \\cdot a^y = a^{x+y}$, and $(a^x)^y = a^{x \\cdot y}$ are immediate consequences. For example with $x=3$ and $y=2$:\n\n\n\n$$\n\\begin{align*}\na^3 \\cdot a^2 &= (a\\cdot a \\cdot a) \\cdot (a \\cdot a) \\\\\n &= (a \\cdot a \\cdot a \\cdot a \\cdot a) \\\\\n\t\t\t &= a^5 = a^{3+2},\\\\\n(a^3)^2 &= (a\\cdot a \\cdot a) \\cdot (a\\cdot a \\cdot a)\\\\\n &= (a\\cdot a \\cdot a \\cdot a\\cdot a \\cdot a) \\\\\n\t\t&= a^6 = a^{3\\cdot 2}.\n\\end{align*}\n$$\n\n\nFor $a \\neq 0$, $a^0$ is defined to be $1$.\n\n\nFor positive, integer values of $n$, we have by definition that $a^{-n} = 1/a^n$.\n\n\nFor $n$ a positive integer, we can define $a^{1/n}$ to be the unique positive solution to $x^n=a$.\n\n\nUsing the key properties of exponents we can extend this to a definition of $a^x$ for any rational $x$.\n\n\nDefining $a^x$ for any real number requires some more sophisticated mathematics.\n\n\nOne method is to use a [theorem](http://tinyurl.com/zk86c8r) that says a *bounded* monotonically increasing sequence will converge. (This uses the [Completeness Axiom](https://en.wikipedia.org/wiki/Completeness_of_the_real_numbers).) Then for $a > 1$ we have if $q_n$ is a sequence of rational numbers increasing to $x$, then $a^{q_n}$ will be a bounded sequence of increasing numbers, so will converge to a number defined to be $a^x$. Something similar is possible for the $0 < a < 1$ case.\n\n\nThis definition can be done to ensure the rules of exponents hold for $a > 0$:\n\n\n\n$$\na^{x + y} = a^x \\cdot a^y, \\quad (a^x)^y = a^{x \\cdot y}.\n$$\n\n\nIn `Julia` these functions are implemented using `^`. A special value of the base, $e$, may be defined as well in terms of a limit. The exponential function $e^x$ is implemented in `exp`.\n\n::: {.cell hold='true' execution_count=4}\n``` {.julia .cell-code}\nplot(x -> (1/2)^x, -2, 2, label=\"1/2\")\nplot!(x -> 1^x, label=\"1\")\nplot!(x -> 2^x, label=\"2\")\nplot!(x -> exp(x), label=\"e\")\n```\n\n::: {.cell-output .cell-output-display execution_count=5}\n![](exp_log_functions_files/figure-html/cell-5-output-1.svg){}\n:::\n:::\n\n\nWe see examples of some general properties:\n\n\n * The domain is all real $x$ and the range is all *positive* $y$ (provided $a \\neq 1$).\n * For $0 < a < 1$ the functions are monotonically decreasing.\n * For $a > 1$ the functions are monotonically increasing.\n * If $1 < a < b$ and $x > 0$ we have $a^x < b^x$.\n\n\n##### Example\n\n\n[Continuously](http://tinyurl.com/gsy939y) compounded interest allows an initial amount $P_0$ to grow over time according to $P(t)=P_0e^{rt}$. Investigate the difference between investing $1,000$ dollars in an account which earns $2$% as opposed to an account which earns $8$% over $20$ years.\n\n\nThe $r$ in the formula is the interest rate, so $r=0.02$ or $r=0.08$. To compare the differences we have:\n\n::: {.cell execution_count=5}\n``` {.julia .cell-code}\nr2, r8 = 0.02, 0.08\nP0 = 1000\nt = 20\nP0 * exp(r2*t), P0 * exp(r8*t)\n```\n\n::: {.cell-output .cell-output-display execution_count=6}\n```\n(1491.8246976412704, 4953.0324243951145)\n```\n:::\n:::\n\n\nAs can be seen, there is quite a bit of difference.\n\n\nIn $1494$, [Pacioli](http://tinyurl.com/gsy939y) gave the \"Rule of $72$\", stating that to find the number of years it takes an investment to double when continuously compounded one should divide the interest rate into $72$.\n\n\nThis formula is not quite precise, but a rule of thumb, the number is closer to $69$, but $72$ has many divisors which makes this an easy to compute approximation. Let's see how accurate it is:\n\n::: {.cell execution_count=6}\n``` {.julia .cell-code}\nt2, t8 = 72/2, 72/8\nexp(r2*t2), exp(r8*t8)\n```\n\n::: {.cell-output .cell-output-display execution_count=7}\n```\n(2.0544332106438876, 2.0544332106438876)\n```\n:::\n:::\n\n\nSo fairly close - after $72/r$ years the amount is $2.05...$ times more than the initial amount.\n\n\n##### Example\n\n\n[Bacterial growth](https://en.wikipedia.org/wiki/Bacterial_growth) (according to Wikipedia) is the asexual reproduction, or cell division, of a bacterium into Line truncated
"supporting": [
"exp_log_functions_files"
],
"filters": [],
"includes": {
"include-in-header": [
"<script src=\"https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js\" integrity=\"sha512-c3Nl8+7g4LMSTdrm621y7kf9v3SDPnhxLNhcjFJbKECVnmZHTdo+IRO05sNLTH/D3vA6u1X32ehoLC7WFVdheg==\" crossorigin=\"anonymous\"></script>\n<script src=\"https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js\" integrity=\"sha512-bLT0Qm9VnAYZDflyKcBaQ2gg0hSYNQrJ8RilYldYQ1FxQYoCLtUjuuRuZo+fjqhx/qtq/1itJ0C2ejDxltZVFg==\" crossorigin=\"anonymous\"></script>\n<script type=\"application/javascript\">define('jquery', [],function() {return window.jQuery;})</script>\n"
]
}
}
}