Markdown writes mathematical formulas

In the field of computers, we will definitely come into contact with mathematics. Mathematics contains many formulas. But until now, handwriting these formulas should be familiar, but if you let your computer type them out, you will definitely be confused. This also causes some formulas when we sometimes write notes. There is no way to be as flexible as our handwriting on the computer. Today I will share with you the grammar of using markdown to describe formulas.

MarkDown math formula: use $, to write the math formula $between two. Written $$between two is to center the formula.

1. Superscript and subscript

^ means superscript, _ means subscript, if the superscript or subscript content is more than one character, use {} to enclose.

example :

$(x^2 + x^2 )^{x^y}+ x_1^2= y_1 - y_2^{x_1^2-y_1^2}$

The final display result is

( x 2 + x 2 ) x y + x 1 2 = y 1 − y 2 x 1 2 − y 1 2 (x^2 + x^2 )^{x^y}+ x_1^2= y_1 - y_2^{x_1^2-y_1^2} (x2+x2)xy+x12=y1y2x12y12

This equation does not hold true in mathematics, it is just for demonstration.

Here is a point. In normal times, we have two ^superscripts and two ~subscripts. I personally feel that it is more convenient to simply represent a certain variable or unknown without involving complex mathematical formulas. I believe everyone knows it.

2. score

Formula \frac{numerator}{denominator}, or numerator\over denominator

example :

$\frac{1+x}{y-1}$ 或 $x \over x+y$

result:

1 + x y − 1 \frac{1+x}{y-1} y11+x x x + y x \over x+y x+yx

Here is a small detail that needs attention. $\fracThere should be no spaces between and , otherwise an error will be reported; and $there must be spaces before and after , which are used to distinguish the numerator and denominator. If there is no space, an error will be reported.\$x \over x+y$\over

3. Prescribing

The formula \sqrt[n]{a}, where n is the coefficient and a is the independent variable, if {n} is omitted, mathematically speaking, it will open the quadratic follow-up by default

example :

 $\sqrt[3]{4}$ 或 $\sqrt{9}$

result:

4 3 \sqrt[3]{4} 34 or 9 \sqrt{9}9

4. Brackets

() [] can be written directly, while {} needs to be escaped (escaping: need to add \ before the left bracket and \ before the right bracket)

example :

$f(x, y) = x^2 + y^2, x \epsilon [0, 100], y \epsilon \{1,2,3\}$

result:

f ( x , y ) = x 2 + y 2 , x ϵ [ 0 , 100 ] , y ϵ { 1 , 2 , 3 } f(x, y) = x^2 + y^2, x \epsilon [0, 100], y \epsilon \{1,2,3\}f(x,y)=x2+y2,xϵ[0,100],{ 1 ,2,3}

For long brackets, you need to add \left before the left bracket and \right before the right bracket, (this brace is not the other brace)

Example: $(\sqrt{1 \over 2})^2$after braces $\left(\sqrt{1 \over 2}\right)^2$

( 1 2 ) 2 (\sqrt{1 \over 2})^2 (21 )2 becomes( 1 2 ) 2 \left(\sqrt{1 \over 2}\right)^2(21 )2

\left and \rightmust appear in pairs, and can be used instead for the side not shown ..

Example: $\frac{du}{dx} | _{x=0}$After increasing $\left. \frac{du}{dx} \right| _{x=0}$

d u d x ∣ x = 0 \frac{du}{dx} | _{x=0} dxof _x=0becomes dudx ∣ x = 0 \left. \frac{du}{dx} \right| _{x=0}dxof _ x=0

Braces \begin{cases}start with , \end{cases}end with , and \\wrap in the middle

example :

$f(x,y):\begin{cases} x^2+y^2=1\\ x-y = 0 \end{cases}$

result:

f ( x , y ) : { x 2 + y 2 = 1 x − y = 0 f(x,y):\begin{cases} x^2+y^2=1\\ x-y = 0 \end{cases} f(x,y):{ x2+y2=1xy=0

5. Vector

The formula \vec{a}

example :

$\vec d \cdot \vec b = 1$

result:

d ⃗ ⋅ b ⃗ = 1 \vec d \cdot \vec b = 1d b =1

Note that there is no {} to distinguish like this, and the space system is used, so you need to pay attention to the format.

6. Fixed integral

Formula \int, _ means the lower limit ^ means the upper limit

Example: Symbol: $\int$, Example formula:$\int_0^1x^2dx$

Symbol: ∫, example formula: ∫ 0 1 x 2 dx \int_0^1x^2dx01x2dx

7. Plus and minus infinity

Positive infinity + ∞ +\infty+ , whose expression is$+\infty$

Negative infinity− ∞ -\infty , its expression is$-\infty

8. Limit

formula \lim_{n\rightarrow+\infty}, where \rightarrowthe right arrow

example:

$\lim_{n\rightarrow+\infty}\frac{1}{n}$

Result: lim ⁡ n → + ∞ 1 n \lim_{n\rightarrow+\infty}\frac{1}{n}limn+n1

After all, computers cannot perfectly replace handwriting, although handwriting has always been placed limbelow

9. Accumulation and multiplication

formula to add \sum_1^nup\prod_{i=0}^n

example:

累加$\sum_1^n$
累乘$\prod_{i=0}^n$

result:

Accumulate ∑ 1 n \sum_1^n1nAnd multiplication ∏ i = 0 n \prod_{i=0}^ni=0n

10. Ellipsis

The formula \ldots indicates the ellipsis between the bottom line, \cdotsthe ellipsis between the middle line and \cdotthe dot multiplication sign.

example :

$f(x_1,x_2,\ldots,x_n) = \left({1 \over x_1}\right)^2+\left({1 \over x_2}\right)^2+\cdots+\left({1 \over x_n}\right)^2$

结果: f ( x 1 , x 2 , … , x n ) = ( 1 x 1 ) 2 + ( 1 x 2 ) 2 + ⋯ + ( 1 x n ) 2 f(x_1,x_2,\ldots,x_n) = \left({1 \over x_1}\right)^2+\left({1 \over x_2}\right)^2+\cdots+\left({1 \over x_n}\right)^2 f(x1,x2,,xn)=(x11)2+(x21)2++(xn1)2

11. Mathematical symbols

the code symbol describe
$\not=$ ≠ \not= = not equal to
$\approx$ ≈ \approx approximately equal to
$\leq$ ≤ \leq less than or equal to
$\geq$ ≥ \geq greater or equal to
$\times$ × \times × Multiplication sign
$\pm$ ± \pm ± sign
$\div$ division sign
$\overline{x_1+x_x+x_3}$ x 1 + x x + x 3 ‾ \overline{x_1+x_x+x_3} x1+xx+x3 average value
$\lceil x \rceil$ ⌈ x ⌉ \lceil x \rceil x Rounded up
$\lfloor x \rfloor$ ⌊ x ⌋ \lfloor x \rfloor x round down

12. Trigonometric functions

symbol the code describe
sin ⁡ \sinsin `` sin ⁡ \sinsin` sine
sin ⁡ θ \sin{\theta}sini $\sin{\theta}$ sine
⊥ \bot $\bot$ vertical
∠ \angle $\angle$ horn
3 0 ∘ 30^\circ 30 $30^\circ$ frequency
cos ⁡ \coscos ` cos ⁡ \coscos cosine

Other trigonometric functions are abbreviations that we usually use in mathematics.

13. Logarithmic notation

  • $\log$The result is log ⁡ \loglog
  • $\lg$The result is lg ⁡ \lglg
  • $\ln$The result of ln ⁡ \lnln

14. Points

symbol the code describe
∫ \int $\int$ Definite integral
∬ \iint $\iint$ double integral
∭ \iiint $\iiint$ triple points
∮ \oint $\oint$ curve integral
y ′ y \primey $y \prime$ Derivation

15. Greek alphabet

insert image description here

Guess you like

Origin blog.csdn.net/weixin_51496226/article/details/131742283