Fractions, roots and sums
此页面需较新浏览器(支持 SharedArrayBuffer)。请升级 Chrome、Edge、Firefox 或 Safari 至最新版本。
数学工具箱:amsmath
- 要写正经的数学,在导言区加载一次
amsmath宏包:
\usepackage{amsmath}
- 它提供更好的分数、对齐方式和几十种符号。几乎每一份数学文档都会用到它。
分数与根号
- 分数写作
\frac{top}{bottom};平方根写作\sqrt{...}:
\[ \frac{a + b}{2} \qquad \sqrt{x^2 + y^2} \]
- 它们可以愉快地嵌套:
\sqrt{\frac{1}{n}}就是“n 分之一”的平方根。
求和与积分
- 它们的大小会自动变得合适:
\[ \sum_{i=1}^{n} i \qquad \int_0^1 x^2 \, dx \]
_设置下限,^设置上限 —— 和写幂用的是同样的按键。
常见错误
- 普通文本中的
\frac、\sqrt或\sum。Half is \frac{1}{2}.会产生! Missing $ inserted.。请将它们置于$...$或\[ ... \]内部。 - 遗漏
\usepackage{amsmath}。 诸如\text{...}之类的命令随后会给出! Undefined control sequence.错误。 \sqrt{3}{x}用于立方根。 根指数需置于方括号内:\sqrt[3]{x}。
难度 2/5 · 今日首次完成可获 140 金币及少量额外奖励
Write a 馏分 in the display equation. Replace the comment with \frac{1}{2} so the equation reads one-half. The amsmath package is already loaded for you.
点击“运行”编译并预览 PDF。
难度 2/5 · 今日首次完成可获 140 金币及少量额外奖励
Now use two more maths tools. In the display equation write a square root \sqrt{...} and a sum \sum, for example \[ \sqrt{2} + \sum_{i=1}^{n} i \].
点击“运行”编译并预览 PDF。
难度 2/5 · 今日首次完成可获 140 金币及少量额外奖励
Put it all together: write the quadratic formula in display maths, \[ x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} \]. \pm is the plus-or-minus sign.
点击“运行”编译并预览 PDF。