aboutsummaryrefslogtreecommitdiff
path: root/htdocs/index.html
blob: 866b2a7d0c537c8f4b9f46255ecef8f03ab7e3a2 (plain)
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
<!DOCTYPE html>
<html lang='en-US'>
  <head>
    <meta charset='utf-8'/>
    <title>Mathy</title>
    <link rel='stylesheet' type='text/css' href='css/font-awesome-4.7.0/css/font-awesome.min.css'/>
    <link rel='stylesheet' type='text/css' href='js/bootstrap-3.3.7/css/bootstrap.min.css'/>
    <link rel='stylesheet' type='text/css' href='js/bootstrap-3.3.7/css/bootstrap-theme.min.css'/>
    <link rel='stylesheet' type='text/css' href='css/mathy.css' media='screen'/>
  </head>

  <body>
    <div id='editor'>\text{add latex here}</div>
    <div id='math-wrap'>
      <div id='MathPreview'></div>
      <div id='MathBuffer' style='visibility:hidden; position:absolute; top:0; left: 0'></div>
    </div>

    <div id='buttons' class='btn-toolbar'>
      <div class='btn-group btn-group-sm dropup'>
        <a
          href='#'
          class='btn btn-default dropdown-toggle'
          title='load saved result'
          data-toggle='dropdown'
        >
          <i class='fa fa-upload'></i>
          Load
          <i class='fa fa-caret-down'></i>
        </a><!-- btn -->

        <ul id='saves' class='dropdown-menu'>
        </ul><!-- dropdown-menu -->
      </div><!-- btn-group -->

      <div class='btn-group btn-group-sm'>
        <a
          href='#'
          id='btn-save'
          class='btn btn-default'
          title='save'
        >
          <i class='fa fa-save'></i>
          Save
        </a><!-- btn -->
      </div><!-- btn-group -->

      <div class='btn-group btn-group-sm pull-right dropup'>
        <a
          href='#'
          class='btn btn-default dropdown-toggle'
          title='get help'
          data-toggle='dropdown'
        >
          <i class='fa fa-question-circle'></i>
          Help
          <i class='fa fa-caret-down'></i>
        </a><!-- btn -->

        <ul id='help' class='dropdown-menu'>
          <li class='dropdown-header'>
            Examples
          </li>

          <li>
            <a
              href='#'
              class='example'
              data-text='
                \lim_{x \to \infty}{\frac{1}{x^2}}
              '
            >1. Some Limit</a>
          </li>

          <!-- li>
            <a
              href='#'
              class='example'
              data-text='
                \begin{align*}
                  &= \int_0^2{x^2 + 5x + 2}\,\text{d}x \\
                  &= \int{x^2 + 5x + 2}\,\text{d}x \\
                  &= \frac{1}{3}x^3 + \frac{5}{2}x^2 + 2x + c \\
                  &= \frac{1}{3}2^3 + \frac{5}{2}2^2 + 2\times2 -
                     (\frac{1}{3}0^3 + \frac{5}{2}0^2 + 2\times0) \\
                  &= \frac{8}{3} + \frac{20}{2} + 4 \\
                  &= 14 + \frac{8}{3} \\
                  &= \frac{50}{3}
                \end{align*}
              '
            >Test 2</a>
          </li -->

          <li>
            <a
              href='#'
              class='example'
              data-text='
\text{Quadratic Formula} \\
x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
              '
            >2. Quadratic Formula</a>
          </li>

          <li>
            <a
              href='#'
              class='example'
              data-text='
\text{Cross Product via Matrix Determinant} \\

\begin{align*}
    \vec{a} \times \vec{b} & = \begin{vmatrix}
        \hat{i} & \hat{j} & \hat{k} \\
        \vec{a}_x & \vec{a}_y & \vec{a}_z \\
        \vec{b}_x & \vec{b}_y & \vec{b}_z 
    \end{vmatrix} \\
    
    & = 
    \begin{vmatrix}
        \vec{a}_y & \vec{a}_z \\
        \vec{b}_y & \vec{b}_z
    \end{vmatrix} \hat{i} - 
    
    \begin{vmatrix}
        \vec{a}_x & \vec{a}_z \\
        \vec{b}_x & \vec{b}_z
    \end{vmatrix} \hat{j} +
    
    \begin{vmatrix}
        \vec{a}_x & \vec{a}_y \\
        \vec{b}_x & \vec{b}_y
    \end{vmatrix} \hat{k} \\
    
    & = 
    (\vec{a}_y\vec{b}_z - \vec{a}_z\vec{b}_y)\hat{i} -
    (\vec{a}_x\vec{b}_z - \vec{a}_z\vec{b}_x)\hat{j} +
    (\vec{a}_x\vec{b}_y - \vec{a}_x\vec{b}_y)\hat{k} \\
    
    & =
    \langle
        \vec{a}_y\vec{b}_z - \vec{a}_z\vec{b}_y\text{, } 
        \vec{a}_x\vec{b}_z - \vec{a}_z\vec{b}_x\text{, } 
        \vec{a}_x\vec{b}_y - \vec{a}_y\vec{b}_z
    \rangle \\
    
    \vec{a} & = \langle2, 1, -1\rangle \\
    \vec{b} & = \langle-3, 4, 1\rangle \\
    \vec{a} \times \vec{b} & = \langle
        (1)(1) - (-1)(4),
        (2)(1) - (-1)(-3),
        (2)(4) - (1)(-3)
    \rangle \\
    
    & = \langle
        5, 5, 11
    \rangle \\
    \vec{b} \times \vec{a} & = \langle
        (4)(-1) - (1)(1),
        (-3)(-1) - (1)(2),
        (-3)(1) - (4)(2)
    \rangle \\
    & = \langle
        -5, -5, -11
    \rangle
\end{align*}
              '
					  >3. Cross Product</a>
					</li>

          <li>
            <a
              href='#'
              class='example'
              data-text="
\text{Derivative Rules} \\

\begin{align*}
% sum/difference rule
\frac{\text{d}}{\text{d}x} \,
f(x) \pm g(x) &=
\frac{\text{d}}{\text{d}x} \, f(x) \pm
\frac{\text{d}}{\text{d}x} \, g(x) &
\text{Sum/Difference Rule} \\

% constant factor rule
\frac{\text{d}}{\text{d}x} \,
k f(x) &=
k \frac{\text{d}}{\text{d}x} \, f(x) &
\text{Constant Factor Rule} \\

% constant rule
\frac{\text{d}}{\text{d}x} \,
k &=
0 &
\text{Constant Rule} \\

% power rule
\frac{\text{d}}{\text{d}x} \,
x^n &=
nx^{n-1} &
\text{Power Rule} \\

% exponent rule
\frac{\text{d}}{\text{d}x} \,
b^x &=
b^xln(b) &
\text{Exponent Rule} \\

% chain rule
\frac{\text{d}}{\text{d}x} \,
f(g(x)) &=
% (f \cdot g)(x) &=
f'(g(x))g'(x) &
\text{Chain Rule} \\

% product rule
\frac{\text{d}}{\text{d}x} \,
f(x)g(x) &=
f'(x)g(x) + f(x)g'(x) &
\text{Product Rule} \\

% quotient rule
\frac{\text{d}}{\text{d}x} \,
\frac{f(x)}{g(x)} &=
\frac{f'(x)g(x) - f(x)g'(x)}{g(x)^2} &
\text{Quotient Rule} \\

% logarithm rule
\frac{\text{d}}{\text{d}x} \,
log_b{x} &=
\frac{1}{x ln(b)} &
\text{Logarithm Rule} \\

\end{align*}
"
            >4. Derivative Rules</a>
          </li>

          <li>
            <a
              href='#'
              class='example'
              data-text="
% https://math.vanderbilt.edu/schectex/courses/cubic/
\text{The Cubic Formula} \\
\begin{align*}
% first term
x &= \sqrt[3]{
  % first term, first subterm
  \left (
    \frac{-b^3}{27a^3} +
    \frac{bc}{6a^2} -
    \frac{d}{2a}
  \right )

  +

  \sqrt{
    % first term, second subterm
    \left (
      \frac{-b^3}{27a^3} +
      \frac{bc}{6a^2} -
      \frac{d}{2a}
    \right )^2

    +

    % first term, third subterm
    \left (
      \frac{c}{3a} -
      \frac{b^2}{9a^2}
    \right )^3
  }
} \\

&+

% second term
\sqrt[3]{
  % first term, second subterm
  \left (
    \frac{-b^3}{27a^3} +
    \frac{bc}{6a^2} -
    \frac{d}{2a}
  \right )

  -

  \sqrt{
    % second term, second subterm
    \left (
      \frac{-b^3}{27a^3} +
      \frac{bc}{6a^2} -
      \frac{d}{2a}
    \right )^2

    +

    % second term, third subterm
    \left (
      \frac{c}{3a} -
      \frac{b^2}{9a^2}
    \right )^3
  }
} \\

&-

% third part
\frac{b}{3a}
\end{align*}
  "
            >5. Cubic Formula</a>
          </li>
          <li>
            <a
              href='#'
              class='example'
              data-text="
\text{Linear Regression} \\

\begin{align*}
  m &= \frac{
    \sum(x_i - \bar{x})(y_i - \bar{y}	)
  }{
    \sum(x_i - \bar{x})^2
  } \\

  b &= \bar{y} - m\bar{x} \\

  y &= mx + b
\end{align*}
              "
            >6. Linear Regression</a>
          </li>
          <li class='divider'></li>
        </ul><!-- dropdown-menu -->
      </div><!-- btn-group -->

      <div class='btn-group btn-group-sm pull-right'>
        <a
          href='#'
          id='btn-config'
          class='btn btn-default disabled'
          title='edit settings'
        >
          <i class='fa fa-cog'></i>
          Config
        </a><!-- btn -->
      </div><!-- btn-group -->
    </div><!-- btn-toolbar -->
    
    <script type="text/x-mathjax-config">
      MathJax.Hub.Config({
        showProcessingMessages: false,
        tex2jax: { inlineMath: [['$','$'],['\\(','\\)']] }
      });
    </script>
    <script type='text/javascript' src='js/jquery-3.1.1.min.js'></script>
    <script type='text/javascript' src='js/bootstrap-3.3.7/js/bootstrap.min.js'></script>
    <script type='text/javascript' src='js/ace/ace.js' charset='utf-8'></script>
    <script type='text/javascript' src='js/MathJax-2.7.0/MathJax.js?config=TeX-AMS-MML_SVG'></script>
    <script type='text/javascript' src='js/luigi-template-0.4.1.min.js'></script>
    <script type='text/javascript' src='js/mathy.js'></script>
  </body>
</html>