Skip to content
This repository has been archived by the owner on Dec 31, 2020. It is now read-only.

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
colbyn committed Oct 14, 2020
1 parent 70df971 commit a60c9ae
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 15 deletions.
14 changes: 8 additions & 6 deletions build/posthtml-custom-elements/index.js
Expand Up @@ -492,13 +492,15 @@ function desmos(tree) {
const init = (setup) => {
const uid = `des_${guidGenerator()}`;
return `
<div id="${uid}" style="width: ${setup.width || '100%'}; height: ${setup.height || '400px'};"></div>
<div id="${uid}" style="width: ${setup.width || '100%'}; height: ${setup.height || '400px'}; margin: 0 auto;"></div>
<script>
window.addEventListener("load", function on_load() {
var elt = document.getElementById('${uid}');
var options = {
expressionsCollapsed: ${setup.expressionsCollapsed} || true,
lockViewport: ${setup.lockViewport || true},
expressionsCollapsed: true,
expressions: ${setup.show_expressions},
lockViewport: ${setup.lockViewport},
settingsMenu: false,
};
var calculator = Desmos.GraphingCalculator(elt, options);
for (cmd of ${JSON.stringify(setup.commands)}) {
Expand All @@ -512,7 +514,7 @@ function desmos(tree) {
let width = "100%";
let height = "500px";
let lockViewport = true;
let expressionsCollapsed = true;
let show_expressions = true;
if (!('attrs' in node)) {
node.attrs = {};
}
Expand All @@ -526,7 +528,7 @@ function desmos(tree) {
lockViewport = node.attrs.lock;
}
if (has_attr(node, 'controls')) {
expressionsCollapsed = node.attrs.controls;
show_expressions = node.attrs.controls;
}
let commands = [];
let errors = [];
Expand Down Expand Up @@ -572,7 +574,7 @@ function desmos(tree) {
width: width,
height: height,
lockViewport: lockViewport,
expressionsCollapsed, expressionsCollapsed,
show_expressions, show_expressions,
});
node.tag = "div";
node.attrs['block'] = '';
Expand Down
31 changes: 26 additions & 5 deletions src/calc/chapter3.html
Expand Up @@ -370,10 +370,16 @@ <h4>Intercepts</h4>
<h4>Symmetry</h4>
<img src="https://cdn.kastatic.org/googleusercontent/qoY4fIGSlPFLX3i61ama3uehSPpmWGLa_ksk11D-W8hFG_tezdylgH68l_kyjNwEa0CMaN4iIVkeMjMAPPmcK8LFgw">
<note>If <tex>f(-x) = f(x)</tex> then <tex>f</tex> is even and will be symmetric about the y-axis.</note>
<note>If <tex>f(x) = f(x + p)</tex> where <tex>p</tex> is a positive constant, then <tex>f</tex> is a periodic function, and it's graph will be repeated every <tex>p</tex> units (i.e. the period).</note>
<note>
If <tex>f(x) = f(x + p)</tex> where <tex>p</tex> is a positive constant, then <tex>f</tex> is a periodic function, and it's graph will be repeated every <tex>p</tex> units (i.e. the period).
<note><tex>p</tex> is the period I believe, such as <tex>\pi</tex></note>
</note>
</note>
<note no-title>
<h4>Asymptotes</h4>
<note>
<p>Asymptotes of e.g. rational functions can be found using the first and second derivatives, instead of using vertical and horizontal limits.</p>
</note>
<p>Steps:</p>
<ol>
<li>Horizontal Asymptotes</li>
Expand All @@ -395,7 +401,6 @@ <h5>Vertical Asymptotes</h5>
<note no-title>
<h5>Horizontal Asymptotes</h5>
See <a href="#horizontal-asymptotes-section">3.4 | Limits at Infinity; Horizontal Asymptotes</a>.

<note>
<h6>To find horizontal asymptotes</h6>
<ul>
Expand All @@ -406,11 +411,8 @@ <h6>To find horizontal asymptotes</h6>
</note>
<note no-title>
<h5>Slant Asymptotes</h5>

<note>A slant (oblique) asymptote occurs when the polynomial in the <b>numerator</b> is a <b>higher degree</b> than the polynomial in the denominator.</note>

Can be found using polynomial long division, where the quotient <tex>mx + b</tex> is your slant asymptotes, then set <tex>y = mx + b</tex>.

<p>The above result can be confirmed using limits. Given some <tex>y = mx + b</tex>, if:</p>
<tex block>
\lim_{x \to \infty} \left( f(x) - (mx + b)\right) = 0
Expand Down Expand Up @@ -456,6 +458,25 @@ <h4>Sketch the Curve</h4>
</note>
</note>

<h3>Miscellaneous</h3>

<note>
<h4>First and second derivative for curve shape</h4>
<note>
<p>For instance, given <tex>y = x^3</tex>, the number line for the first and second derivatives will look like:</p>
<img block src="https://understandingcalculus.com/chapters/08/understanding_derivative_files/image121.gif" />
<p>On the negative (left) side, since <tex>f^\prime</tex> is positive, and <tex>f^{\prime\prime}</tex> is negative, it is increasing at a decreasing rate. So the curve will look like this</p>
<img block width='100px' src="~/../static/images/calc1/concavity-and-extrema/image--002.png" />
<p>Whereas on the positive (right) side of x, since the first derivative is positive and the second derivative is likewise positive, it will be increasing at an increasing rate. So therefore, the curve will look like this:</p>
<img block width='100px' src='~/../static/images/calc1/concavity-and-extrema/image--000.png'>
<p>Which matches the (compressed) curve of:</p>
<desmos width=200px height='200px' lock=true controls=false>
<expr>y = x^3</expr>
</desmos>
<note>This process works for asymptotes as well, such as those from rational functions.</note>
</note>
</note>

<h2>3.6 | Calculus with Graphing Calculators (Skipped)</h2>
<h2>3.7 | Optimization Problems</h2>
<h2>3.8 | Newtons Method</h2>
Expand Down
8 changes: 4 additions & 4 deletions src/theme/styling.css
Expand Up @@ -164,10 +164,10 @@ body > nav[side] {

ul[toc] > li[entry='h1'] {margin-left: 0;}
ul[toc] > li[entry='h2'] {margin-left: 50px;}
ul[toc] > li[entry='h3'] {margin-left: 140px;}
ul[toc] > li[entry='h4'] {margin-left: 160px;}
ul[toc] > li[entry='h5'] {margin-left: 180px;}
ul[toc] > li[entry='h6'] {margin-left: 200px;}
ul[toc] > li[entry='h3'] {margin-left: 100px;}
ul[toc] > li[entry='h4'] {margin-left: 130px;}
ul[toc] > li[entry='h5'] {margin-left: 160px;}
ul[toc] > li[entry='h6'] {margin-left: 190px;}

p[error-block] {
display: flex;
Expand Down

0 comments on commit a60c9ae

Please sign in to comment.