如何对齐多个方程并为每个方程编号

如何对齐多个方程并为每个方程编号

我尝试过类似问题的答案,但没有用。

\begin{equation}\label{pertama0}
\begin{aligned}
\frac{\partial E}{\partial L^0_{10}}&= \frac{\partial E}{\partial \hat{x}_{n+1}}\\
&=-2(x-\hat{x})\\
&=2(\hat{x}-x)
\end{aligned}
\end{equation}

\begin{equation}
\begin{aligned}
\frac{\partial L^o_{10}}{\partial L^i_{10}}&= \frac{\partial f(L^i_{10})}{\partial L^i_{10}}\\
&=\frac{\partial L^i_{10}}{\partial L^i_{10}}\\
&=1
\end{aligned}
\end{equation}

\begin{equation}
\begin{aligned}
\frac{\partial L_{10}^{i}}{\partial a_{21}} &=\frac{\partial\left(x_{n}+h\left(b_{1} k_{1x}+b_{2}k_{2x}\right)\right.}{\partial a_{21}} \\
&=\frac{\partial\left(h b_{2} k_{2 x}\right)}{\partial a_{21}} \\
&=h b_{2}\frac{ \partial\left(x_{n}^{\prime}+h a_{21} k_{1x^{\prime}})\right.}{\partial a_{21}} \\
&=h^{2} b_{2} k_{1 x^{\prime}}
\end{aligned}
\end{equation}
%
\begin{equation}
\begin{aligned}
\frac{\partial E}{\partial L^0_{11}}&= \frac{\partial E}{\partial \hat{y}_{n+1}}\\
&=-2(y-\hat{y})\\
&=2(\hat{y}-y)
\end{aligned}
\end{equation}

\begin{equation}
\begin{aligned}
\frac{\partial L^o_{11}}{\partial L^i_{11}}&= \frac{\partial f(L^i_{11})}{\partial L^i_{11}}\\
&=\frac{\partial L^i_{11}}{\partial L^i_{11}}\\
&=1
\end{aligned}
\end{equation}

\begin{equation}
\begin{aligned}
\frac{\partial L_{11}^{i}}{\partial a_{21}} &=\frac{\partial\left(y_{n}+h\left(b_{1} k_{1y}+b_{2}k_{2y}\right)\right.}{\partial a_{21}} \\
&=\frac{\partial\left(h b_{2} k_{2 y}\right)}{\partial a_{21}} \\
&=h b_{2}\frac{ \partial\left(y_{n}^{\prime}+h a_{21} k_{1y^{\prime}})\right.}{\partial a_{21}} \\
&=h^{2} b_{2} k_{1 y^{\prime}}
\end{aligned}
\end{equation}
%
\begin{equation}
\begin{aligned}
\frac{\partial E}{\partial L^0_{12}}&= \frac{\partial E}{\partial \hat{x}^{\prime}_{n+1}}\\
&=-2({x}^{\prime}-\hat{x}^{\prime})\\
&=2(\hat{x}^{\prime}-{x}^{\prime})
\end{aligned}
\end{equation}

\begin{equation}
\begin{aligned}
\frac{\partial L^o_{12}}{\partial L^i_{12}}&= \frac{\partial f(L^i_{12})}{\partial L^i_{12}}\\
&=\frac{\partial L^i_{12}}{\partial L^i_{12}}\\
&=1
\end{aligned}
\end{equation}

\begin{equation}
\begin{aligned}
\frac{\partial L_{12}^{i}}{\partial a_{21}} &=\frac{\partial\left(x_{n}^{\prime}+h\left(b_{1} k_{1x^{\prime}}+b_{2}k_{2 x^{\prime}}\right)\right)}{\partial a_{21}} \\
&=\frac{\partial\left(h b_{2} k_{2 x^{\prime}}\right)}{\partial a_{21}} \\
&=h b_{2} \frac{\partial f_{x^\prime}\left(x_{n}+h a_{21} k_{1 x^{\prime}}, y_{n}+h a_{21} k_{1 y^{\prime}}\right)}{\partial a_{21}} \\
&=h b_{2}\left(f_{x^{\prime}_{1}} h k_{1x^{\prime}} +f_{x^{\prime}_{2}} h k_{1 y^{\prime}}\right)
\end{aligned}
\end{equation}
%
\begin{equation}
\begin{aligned}
\frac{\partial E}{\partial L^0_{13}}&= \frac{\partial E}{\partial \hat{y}^{\prime}_{n+1}}\\
&=-2({y}^{\prime}-\hat{y}^{\prime})\\
&=2(\hat{y}^{\prime}-{y}^{\prime})
\end{aligned}
\end{equation}

\begin{equation}
\begin{aligned}
\frac{\partial L^o_{13}}{\partial L^i_{13}}&= \frac{\partial f(L^i_{13})}{\partial L^i_{13}}\\
&=\frac{\partial L^i_{13}}{\partial L^i_{13}}\\
&=1
\end{aligned}
\end{equation}
\begin{equation}\label{terakhhir0}
\begin{aligned}
\frac{\partial L_{13}^{i}}{\partial a_{21}} &=\frac{\partial\left(y_{n}^{\prime}+h\left(b_{1} k_{1y^{\prime}}+b_{2}k_{2 y^{\prime}}\right)\right)}{\partial a_{21}} \\
&=\frac{\partial\left(h b_{2} k_{2 y^{\prime}}\right)}{\partial a_{21}} \\
&=h b_{2} \frac{\partial f_{y^\prime}\left(x_{n}+h a_{21} k_{1 x^{\prime}}, y_{n}+h a_{21} k_{1 y^{\prime}}\right)}{\partial a_{21}} \\
&=h b_{2}\left(f_{y^{\prime}_{1}} h k_{1x^{\prime}} +f_{y^{\prime}_{2}} h k_{1 y^{\prime}}\right)
\end{aligned}
\end{equation}
\frac{\partial E}{\partial L^0_{13}}&= \frac{\partial E}{\partial \hat{y}^{\prime}_{n+1}}\\
&=-2({y}^{\prime}-\hat{y}^{\prime})\\
&=2(\hat{y}^{\prime}-{y}^{\prime})
\end{aligned}
\end{equation}

\begin{equation}
\begin{aligned}
\frac{\partial L^o_{13}}{\partial L^i_{13}}&= \frac{\partial f(L^i_{13})}{\partial L^i_{13}}\\
&=\frac{\partial L^i_{13}}{\partial L^i_{13}}\\
&=1
\end{aligned}
\end{equation}
\begin{equation}\label{terakhhir0}
\begin{aligned}
\frac{\partial L_{13}^{i}}{\partial a_{21}} &=\frac{\partial\left(y_{n}^{\prime}+h\left(b_{1} k_{1y^{\prime}}+b_{2}k_{2 y^{\prime}}\right)\right)}{\partial a_{21}} \\
&=\frac{\partial\left(h b_{2} k_{2 y^{\prime}}\right)}{\partial a_{21}} \\
&=h b_{2} \frac{\partial f_{y^\prime}\left(x_{n}+h a_{21} k_{1 x^{\prime}}, y_{n}+h a_{21} k_{1 y^{\prime}}\right)}{\partial a_{21}} \\
&=h b_{2}\left(f_{y^{\prime}_{1}} h k_{1x^{\prime}} +f_{y^{\prime}_{2}} h k_{1 y^{\prime}}\right)
\end{aligned}
\end{equation}

 
\begin{equation}\label{pertama0}
\begin{aligned}
\frac{\partial E}{\partial L^0_{10}}&= \frac{\partial E}{\partial \hat{x}_{n+1}}\\
&=-2(x-\hat{x})\\
&=2(\hat{x}-x)
\end{aligned}
\end{equation}

\begin{equation}
\begin{aligned}
\frac{\partial L^o_{10}}{\partial L^i_{10}}&= \frac{\partial f(L^i_{10})}{\partial L^i_{10}}\\
&=\frac{\partial L^i_{10}}{\partial L^i_{10}}\\
&=1
\end{aligned}
\end{equation}

\begin{equation}
\begin{aligned}
\frac{\partial L_{10}^{i}}{\partial a_{21}} &=\frac{\partial\left(x_{n}+h\left(b_{1} k_{1x}+b_{2}k_{2x}\right)\right.}{\partial a_{21}} \\
&=\frac{\partial\left(h b_{2} k_{2 x}\right)}{\partial a_{21}} \\
&=h b_{2}\frac{ \partial\left(x_{n}^{\prime}+h a_{21} k_{1x^{\prime}})\right.}{\partial a_{21}} \\
&=h^{2} b_{2} k_{1 x^{\prime}}
\end{aligned}
\end{equation}
%
\begin{equation}
\begin{aligned}
\frac{\partial E}{\partial L^0_{11}}&= \frac{\partial E}{\partial \hat{y}_{n+1}}\\
&=-2(y-\hat{y})\\
&=2(\hat{y}-y)
\end{aligned}
\end{equation}

\begin{equation}
\begin{aligned}
\frac{\partial L^o_{11}}{\partial L^i_{11}}&= \frac{\partial f(L^i_{11})}{\partial L^i_{11}}\\
&=\frac{\partial L^i_{11}}{\partial L^i_{11}}\\
&=1
\end{aligned}
\end{equation}

像这样好奇在此处输入图片描述

答案1

align与 一起使用split

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{align}
\begin{split}\label{first}
\frac{\partial E}{\partial L^0_{10}}&= \frac{\partial E}{\partial \hat{x}_{n+1}}\\
&=-2(x-\hat{x})\\
&=2(\hat{x}-x)
\end{split}
\\[1ex]
\begin{split}\label{second}
\frac{\partial L^o_{10}}{\partial L^i_{10}}&= \frac{\partial f(L^i_{10})}{\partial L^i_{10}}\\
&=\frac{\partial L^i_{10}}{\partial L^i_{10}}\\
&=1
\end{split}
\\[1ex]
\begin{split}\label{third}
\frac{\partial L_{10}^{i}}{\partial a_{21}} &=\frac{\partial(x_{n}+h(b_{1} k_{1x}+b_{2}k_{2x}))}{\partial a_{21}} \\
&=\frac{\partial(h b_{2} k_{2 x})}{\partial a_{21}} \\
&=h b_{2}\frac{ \partial(x_{n}'+h a_{21} k_{1x'})}{\partial a_{21}} \\
&=h^{2} b_{2} k_{1 x'}
\end{split}
\\[1ex]
\begin{split}\label{fourth}
\frac{\partial E}{\partial L^0_{11}}&= \frac{\partial E}{\partial \hat{y}_{n+1}}\\
&=-2(y-\hat{y})\\
&=2(\hat{y}-y)
\end{split}
\end{align}

\end{document}

我在块之间\\[1ex]添加了一些垂直空间,以帮助读者更好地看到块边界。

我删除了无用的\left\right说明:在这种情况下,它们只会增加不必要的空间。我还将其改为^{\prime}更简单的'

检查一下可疑的^o那应该是^0

在此处输入图片描述

相关内容