This repository has been archived by the owner on May 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 863
/
logarithms_1.5.html
71 lines (66 loc) · 4.01 KB
/
logarithms_1.5.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<!DOCTYPE html>
<html data-require="math">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Evaluating logarithms 2</title>
<script data-main="../local-only/main.js" src="../local-only/require.js"></script>
</head>
<body>
<div class="exercise">
<div class="problems">
<div id="integral">
<div class="vars" data-ensure="ABS_NUM < 1000">
<var id="BASE">randRange(2, 16)</var>
<var id="EXP">randRange(-4, 4)</var>
<var id="ABS_NUM">pow(BASE, abs(EXP))</var>
<var id="NUM_STR">EXP < 0 ? "\\dfrac{1}{" + ABS_NUM + "}" : "" + ABS_NUM</var>
</div>
<p class="question">
<code>\large{\log_{<var>BASE</var>}} <var>EXP < 0 ? "\\left(" + NUM_STR + "\\right)" : NUM_STR</var> = \text{?}</code>
</p>
<p class="solution"><var>EXP</var></p>
<div class="hints">
<p>If <code>b^y = x</code>, then <code>\log_{b} x = y</code>.</p>
<p>Therefore, we want to find the value <code>y</code> such that <code><var>BASE</var>^{y} = <var>NUM_STR</var></code>.</p>
<p data-if="EXP === 1">
Any number raised to the power <code>1</code> is simply itself, so <code><var>BASE</var>^{1} = <var>BASE</var></code> and thus <code>\log_{<var>BASE</var>} <var>BASE</var> = 1</code>.
</p>
<p data-else-if="EXP === 0">
Any non-zero number raised to the power <code>0</code> is simply <code>1</code>, so <code><var>BASE</var>^0 = 1</code> and thus <code>\log_{<var>BASE</var>} 1 = 0</code>.
</p>
<p data-else-if="EXP === -1">
Any number raised to the power <code>-1</code> is its reciprocal, so <code><var>BASE</var>^{-1} = \dfrac{1}{<var>BASE</var>}</code> and thus <code>\log_{<var>BASE</var>} \left(\dfrac{1}{<var>BASE</var>}\right) = -1</code>.
</p>
<p data-else="">
<span data-if="EXP < 0" data-unwrap="">
In this case, <code><var>BASE</var>^{<var>EXP</var>} = <var>NUM_STR</var></code>,
so <code>\log_{<var>BASE</var>} \left(<var>NUM_STR</var>\right) = <var>EXP</var></code>.
</span>
<span data-else="" data-unwrap="">In this case, <code><var>BASE</var>^{<var>EXP</var>} = <var>NUM_STR</var></code>,
so <code>\log_{<var>BASE</var>} <var>NUM_STR</var> = <var>EXP</var></code>.
</span>
</p>
</div>
</div>
<div id="root">
<div class="vars" data-ensure="NUM < 1000">
<var id="BASE">randRange(2, 16)</var>
<var id="EXP">randRange(2, 5)</var>
<var id="NUM">pow(BASE, EXP)</var>
</div>
<p class="question"><code>\large{\log_{<var>NUM</var>}} <var>BASE</var> = \text{?}</code></p>
<p class="solution"><var>1/EXP</var></p>
<div class="hints">
<p>If <code>b^y = x</code>, then <code>\log_{b} x = y</code>.</p>
<p>Notice that <code><var>BASE</var></code> is the <var>["square", "cube", "fourth", "fifth"][EXP - 2]</var> root of <code><var>NUM</var></code>.</p>
<p data-if="EXP === 2">
That is, <code>\sqrt{<var>NUM</var>} = <var>NUM</var>^{1/<var>EXP</var>} = <var>BASE</var></code>.
</p>
<p data-else="">That is, <code>\sqrt[<var>EXP</var>]{<var>NUM</var>} = <var>NUM</var>^{1/<var>EXP</var>} = <var>BASE</var></code>.</p>
<p>Thus, <code>\log_{<var>NUM</var>} <var>BASE</var> = \dfrac{1}{<var>EXP</var>}</code>.</p>
</div>
</div>
</div>
</div>
</body>
</html>