use quarto, not Pluto to render pages

This commit is contained in:
jverzani committed 2022-07-24 16:38:24 -04:00
1 parent 93c993206a
commit 7b37ca828c
879 files changed
+793311 -2678

No files matched your search

@@ -0,0 +1,15 @@
{
"hash": "696f25ab6c9666a0370742c0329ce739",
"result": {
"markdown": "# Rational functions\n\n\n\nThis section uses the following add-on packages:\n\n``` {.julia .cell-code}\nusing CalculusWithJulia\nusing SymPy\nusing Plots\nimport Polynomials\nusing RealPolynomialRoots\n```\n\n\nThe `Polynomials` package is \"imported\" to avoid naming collisions with `SymPy`; names will need to be qualified.\n\n\n\n---\n\n\nA rational expression is the ratio of two polynomial expressions. Such expressions arise in many modeling situations. As many facts are known about polynomial expressions, much can be determined about rational expressions. This section covers some additional details that arise when graphing such expressions.\n\n\n## Rational functions\n\n\nThe rational numbers are simply ratios of integers, of the form $p/q$ for non-zero $q$. A rational function is a ratio of *polynomial* *functions* of the form $p(x)/q(x)$, again $q$ is non-zero, but may have zeros.\n\n\nWe know that polynomials have nice behaviors due to the following facts:\n\n\n * Behaviors at $-\\infty$, $\\infty$ are known just from the leading term.\n * There are possible wiggles up and down, the exact behavior depends on intermediate terms, but there can be no more than $n-1$ wiggles.\n * The number of real zeros is no more than $n$, the degree of the polynomial.\n\n\nRational functions are not quite so nice:\n\n\n * behavior at $-\\infty$ and $\\infty$ can be like a polynomial of any degree, including constants\n * behaviour at any value x can blow up due to division by $0$ - rational functions, unlike polynomials, need not be always defined\n * The function may or may not cross zero, even if the range includes every other point, as the graph of $f(x) =1/x$ will show.\n\n\nHere, as with our discussion on polynomials, we are interested for now in just a few properties:\n\n\n * What happens to $f(x)$ when $x$ gets really big or really small (towards $\\infty$ or $-\\infty$)?\n * What happens near the values where $q(x) = 0$?\n * When is $f(x) = 0$?\n\n\nThese questions can often be answered with a graph, but with rational functions we will see that care must be taken to produce a useful graph.\n\n\nFor example, consider this graph generated from a simple rational function:\n\n\n\n$$\nf(x) = \\frac{(x-1)^2 \\cdot (x-2)}{(x+3) \\cdot (x-3)}.\n$$\n\n::: {.cell execution_count=4}\n``` {.julia .cell-code}\nf(x) = (x-1)^2 * (x-2) / ((x+3)*(x-3) )\nplot(f, -10, 10)\n```\n\n::: {.cell-output .cell-output-display execution_count=5}\n![](rational_functions_files/figure-html/cell-5-output-1.svg){}\n:::\n:::\n\n\nWe would be hard pressed to answer any of the three questions above from the graph, though, on inspection, we might think the strange spikes have something to do with $x$ values where $q(x)=0$.\n\n\nThe question of big or small $x$ is not answered well with this graph, as the spikes dominate the scale of the $y$-axis. Setting a much larger viewing window illuminates this question:\n\n::: {.cell execution_count=5}\n``` {.julia .cell-code}\nplot(f, -100, 100)\n```\n\n::: {.cell-output .cell-output-display execution_count=6}\n![](rational_functions_files/figure-html/cell-6-output-1.svg){}\n:::\n:::\n\n\nWe can see from this, that the function eventually looks like a slanted straight line. The *eventual* shape of the graph is something that can be determined just from the two leading terms.\n\n\nThe spikes haven't vanished completely. It is just that with only a few hundred points to make the graph, there aren't any values near enough to the problem to make a large spike. The spikes happen because the function has a *vertical asymptote* at these values. Though not quite right, it is reasonable to think of the graph being made by selecting a few hundred points in the specified domain, computing the corresponding $y$ values, plotting the pairs, and finally connecting the points with straight line segments. Near a vertical asymptote the function values can be arbitrarily large in absolute values, though at the vertical asymptote the function is undefined. This graph doesn't show such detail.\n\n\nThe spikes will be related to the points where $q(x) = 0$, though not necessarily all of them – not all such points will produce a vertical asymptote.\n\n\nWhere the function crosses $0$ is very hard to tell from these two graphs. As well, other finer features, such as local peaks or valleys, when present, can be hard to identify as the $y$-scale is set to accommodate the asymptotes. Working around the asymptotes requires some extra effort. Strategies are discussed herein.\n\n\n## Asymptotes\n\n\nFormally, an [asymptote](http://en.wikipedia.org/wiki/Asymptote) of a curve is a line such that the distance between the curve and the line approaches $0$ as they tend to infinity. Tending to infinity can happen as $x \\rightarrow \\pm \\infty$ *or* $y \\rightarrow \\pm \\infty$, the former being related to *horizontal asymptotes* or *slant asymptotes*, the latter being related to *vertical asymptotes*.\n\Line truncated
"supporting": [
"rational_functions_files/figure-html"
],
"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"
]
}
}
}