本文概述
- 经营者
- 幂和指数
下面给出了用于实现数学命令和方程式的环境:
\begin{equation}...........\end{equation}
下面给出了用于实现数学命令和方程的软件包:
\usepackage{amsmath}
要么
\usepackage{mathtools}
mathtools软件包还加载amsmath软件包。因此, 从以上两个程序包中, 可以使用任何一个。
让我们用一个简单的方程x + y = 4的例子来理解。
下面给出了该示例的代码:
\documentclass[12pt]{article}\usepackage{mathtools}\begin{document}\begin{equation}x + y = 4 % there should be no gap between any of the two rows\end{equation}\end{document}
输出:

文章图片
你还可以编写任何顺序的方程式。
下面给出了写二阶方程的代码:
\documentclass[12pt]{article}\usepackage{mathtools}\begin{document}\begin{equation}x^2 +2x+ 6 = 0\end{equation}\end{document}
输出:

文章图片
让我们考虑另一个写方程式的例子。代码如下:
\documentclass[12pt]{article}\usepackage{mathtools}\begin{document}\begin{equation}x^3 - y^2 = 23\end{equation}\end{document}
输出:

文章图片
如果要以无穷或有限级数格式写数字等, 则可以使用以下代码中给出的命令:
\documentclass[12pt]{article}\usepackage{mathtools}\begin{document}\begin{equation}1, 2, 3, 4, 5, 6........... \infty\end{equation}\end{document}
输出:

文章图片
你也可以用不同的格式编写一个简单的方程式。下面给出了该示例的代码:
\documentclass[12pt]{article}\usepackage{mathtools}\begin{document}\begin{equation}10 \text{oranges} \times 2 \text{dozens of oranges} = 120 \text{oranges}\end{equation}\end{document}
输出:

文章图片
你还可以根据需要在文档中编写几个方程式。公式编号将根据公式自动调整。但是, 你需要为每个方程式使用单独的环境。
此类示例的代码如下:
\documentclass[12pt]{article}\usepackage{mathtools}\begin{document}\begin{equation} % to implement equations more than one, you need to use a separate equation environment for every equation.x^3 + y^3 = 9 \end{equation}\begin{equation}x^2 + 2x + 4 = 0 \end{equation}\begin{equation}y^2 + 4y = 5 \end{equation}\end{document}
输出:

文章图片
你还可以使用到目前为止讨论的命令在文档中的任何位置执行派生。
让我们通过一个简单的例子来理解推导的概念。
这个例子是牛顿运动方程。
此类示例的代码如下:
\documentclass[12pt]{article}\usepackage{mathtools}\begin{document}\begin{center}The three equations of motion are: \\\end{center}\begin{equation} % to insert extra space between equations, you can leave space between the equation environments. But you should not leave space inside any environment.v = u + at\end{equation}\begin{equation}v^2 = u^2 + 2as\end{equation}\begin{equation}s = ut + 1/2at^2\end{equation} \\where, \\s = displacement;
\\u = initial velocity;
\\v = final velocity;
\\a = acceleration;
\\t = time of motion\end{document}
输出:

文章图片
经营者 运算符定义为以对数函数, 三角函数, 指数函数和极限形式编写的函数。
让我们考虑以上三个功能的示例。
Latex引入了一种简单的方法来使用三角函数, 指数函数和对数函数, 并以等式形式显示。
1)让我们考虑两个三角函数示例。
下面是第一个示例的代码:
\documentclass[12pt]{article}\usepackage{mathtools}\begin{document}\begin{equation}\cos^2 \theta + \sin^2 \theta = 1\end{equation}\end{document}
输出:

文章图片
下面给出第二个示例的代码:
\documentclass[12pt]{article}\usepackage{mathtools}\begin{document}\begin{equation}cos2 \theta = 1 - 2sin^2\theta % you can specify any equation according to the requirements.\end{equation}\end{document}
输出:

文章图片
2)让我们考虑对数函数的两个示例。
下面是第一个示例的代码:
\documentclass[12pt]{article}\usepackage{mathtools}\begin{document}\begin{equation}\log a = \log b\end{equation}\end{document}
输出:

文章图片
下面给出第二个示例的代码:
\documentclass[12pt]{article}\usepackage{mathtools}\begin{document}\begin{equation}\log a + \log b = \log c + \log d\end{equation}\centering which can also be written as\\\begin{equation}\log ab = \log cd\end{equation}\end{document}
输出:

文章图片
3)让我们考虑两个指数函数和极限的例子。
下面是第一个示例的代码:
\documentclass[12pt]{article}\usepackage{mathtools}\begin{document}\begin{equation}\lim\limits_{x \to n-1} \exp(x) = 0\end{equation}\end{document}
输出:

文章图片
下面给出第二个示例的代码:
\documentclass[12pt]{article}\usepackage{mathtools}\begin{document}\begin{equation}\lim\limits_{x \to \infty} \Sigma f(x) = 0\end{equation}\centeringwhere, \begin{equation}f(x) = 3x^3 + 2x^2 - 4ax +2 = 0\end{equation}\end{document}
在这里, 你还可以根据需要组合不同形式和类型的数学方程式。
输出:

文章图片
幂和指数 功效和索引被认为与标准文本中的上标和下标相似。
大括号{}用于包含超过一位的幂。
下划线符号在Latex中使用下划线符号(_)提及。
你也可以使用|将竖线插入方程式中。符号。
让我们通过一些例子来理解它。
下面是第一个示例的代码:
\documentclass[12pt]{article}\usepackage{mathtools}\begin{document}\begin{equation}k_n = k_{n-1} + k_{n-2}\end{equation}\end{document}
输出:

文章图片
下面给出第二个示例的代码:
\documentclass[12pt]{article}\usepackage{mathtools}\begin{document}\begin{center}\begin{equation}a^{12} \times a^{22} = a^{34}\end{equation}where, \\12 + 22 = 34 \\equation 1 signifies that the powers are added when multiplied.\begin{equation}b^9 \div b^4 = b^5\end{equation}where, \\9 - 4 = 5 \\equation 2 signifies that the powers are subtracted when divided.\end{center}\end{document}
输出:

文章图片
下面给出了第三个示例的代码:
\documentclass[12pt]{article}\usepackage{mathtools}\begin{document}\begin{center}\begin{equation}f(x) = x^3 + 2x^2 + 4x + 2 |_{x = -2}\end{equation}\end{center}\end{document}
【Latex数学方程】输出:

文章图片