我正在写一篇研究论文并做了一些证明。我对 pdf 中方程的放置方式不满意。有些方程位于中间,有些位于页面最左边。这里有三个问题,以及关于如何最好地组织论文的疑问。
1- 将方程式置于中心或使用对齐的最佳方法是什么?我喜欢将方程式置于中心。
2- u 替换框写在新行中,我更希望将其放在等式的最右边(请参阅代码以便更好地理解)
3- 当使用 \begin{proof} 时,阴影方块不会放置在证明的末尾。
附件是我的代码,如有任何建议或帮助我将不胜感激。\
\documentclass[12pt]{article}%For type of paper
\usepackage{authblk}%For author commands
\usepackage{setspace}% For double space
\doublespacing% For double space
\usepackage{subeqnarray} % For number equations (1a), (1b) etc.
\usepackage{graphicx,epstopdf} % For including graphics
\usepackage[framed , numbered]{matlab-prettifier}% For MATLAB code
\usepackage{amssymb}% For ams math, symbol packages
\usepackage{amsmath} % For more ams
\usepackage{amsthm}
\usepackage{xcolor}
\usepackage{bigstrut}
\usepackage{tikz}
\renewcommand{\qedsymbol}{$\blacksquare$}
\usepackage{nccmath}% For adding Mathematical commands
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage[a4paper,margin=2.5cm]{geometry} % set page margins as needed
\newcommand{\diff}{\mathop{}\!d}
\newcommand{\innerp}[2]{\left\langle #1 \vert #2 \right\rangle}
\newcommand\intpp{\int_{-\pi}^{\pi}} % handy shortcut macro
\begin{document}
\subsection{Partial Sum of Fourier Series}
After we found the coefficients of Fourier series, the partial sum of Fourier series is defined on interval [$-\pi$,$ \pi $]
\begin{equation}
\mathbf{S_N(x) = \frac{1}{2} \, a_{0} + \sum_{n=1}^{N} \left[
a_{n}\,\boldsymbol{\cos} \left( \boldsymbol\,n\,x \right) +
b_{n} \,\boldsymbol{\sin} \left( \boldsymbol\,n\,x \right) \right] } ,\quad\textrm{where } N<\infty
\end{equation}
Referring back to the coefficients we proved in previous Section \ref{subsection:4.1},and Sub-subsection \ref{subsubsection:4.4.2} , we can now show the partial sum as:
\begin{enumerate}
\item[[A]]
$$ S_N(x) = \frac{1}{2\pi}\int_{-\pi}^{\pi}f(x+t)\frac{sin\Big((N+\frac{1}{2}t)\Big)}{\sin(\frac{1}{2}t)} dt$$
If we take the 2 from the fraction outside the integral, we will get the Dirichlet Kernel
$$ = \frac{1}{\pi}\int_{-\pi}^{\pi}f(x+t)D_N(t)dt , \quad\textrm{where } D_N(t)\textrm{ is the Dirichlet Kernel } $$
Notice here we integrating from $-\pi$ to $\pi$. So, we also need to proof the integration from 0 to $\pi$ as follows:
\item[[B]]
$$ S_N(x) = \frac{1}{2\pi}\int_{0}^{\pi}\Big[f(x+t)+f(x-t)\Big]\frac{\sin\big((N+\frac{1}{2})t\big)}{\sin(\frac{1}{2}t)} dt $$
$$ = \frac{1}{\pi}\int_{0}^{\pi}\Big[f(x+t)+f(x-t)\Big]D_N(t)dt $$
\end{enumerate}
\begin{proof} For part A, we can refer back to Section \ref{subsection:4.4}. We take some part of the partial sum which we go from 1 to N.
$$ a_n\cos(nx)+b_n\sin(nx) $$
So, if we put in the Fourier series coefficients for $ a_n$ and $b_n$, we plug them in and get:
$$ = \Big[\frac{1}{\pi}\int_{-\pi}^{\pi}f(t)\cos(nt)dt\Big]\cos(nx)+\Big[\frac{1}{\pi}\int_{-\pi}^{\pi}f(t)\sin(nt)dt\Big]\sin(nx) $$
Since the integrals go from $-\pi$ to $ \pi $, we can factor out the $\frac{1}{\pi}$ and $f(t)$. Then we get:
$$ = \frac{1}{\pi}\int_{-\pi}^{\pi}f(t)\Big[\cos(nt)\cos(nx)+\sin(nt)\sin(nx)\Big]dt $$
So this integral can be reduced by using trig identities we covered in Section \ref{subsection:4.2}.
$$ = \frac{1}{\pi}\int_{-\pi}^{\pi}f(t)\cos\big(n(t-x)\big)dt $$
Then, when we put those back to the partial sum, we get:
$$ = \frac{1}{2\pi}\int_{-\pi}^{\pi}f(t)dt+\frac{1}{\pi}\sum_{n=1}^{N}\int_{-\pi}^{\pi}f(t)\cos\big(n(t-x)\big)dt $$
We can combine all integrals.We get:
$$ = \frac{1}{\pi}\int_{-\pi}^{\pi}f(t)\Big[\frac{1}{2}+\sum_{n=1}^{N}\cos\big(n(t-x)\big)\Big]dt $$
We can instantly write the formula by referring back to Section \ref{subsection:4.5} as:\\
$\begin{aligned}[t]
\\&= \frac{1}{\pi}\displaystyle\intpp f(t)D_N(t-x)\,dt \\
& \qquad
\textcolor{red}{\textup{Substitution}}
\quad
\boxed{\begin{aligned}
u&=t-x,\\
du&=dt
\end{aligned}} \\
&= \frac{1}{\pi}\int_{-\pi-x}^{\pi-x}f(x+u)D_N(u)\,du \\
&= \frac{1}{\pi}\intpp f(x+t)D_N(t)\,dt \\
&= \frac{1}{2\pi}\intpp f(x+t)\,
\frac{\sin\bigl((N+\frac{1}{2})t\bigr)}{\sin\bigl(\frac{1}{2}t\bigr)}\,dt
\qquad\qedhere \\
&= \frac{1}{\pi}\int_{-\pi-x}^{\pi-x}f(x+u)D_N(u)du = \frac{1}{\pi}\int_{-\pi}^{\pi}f(x+t)D_N(t)dt
&= \frac{1}{2\pi}\int_{-\pi}^{\pi}f(x+t)\frac{\sin\big((N+\frac{1}{2})t\big)}{\sin(\frac{1}{2}t)}dt
\end{aligned}$
\end{proof}
\begin{proof} For part B, we want to restrict the integral from 0 to $\pi $. We begin by partial sum.
$$ S_N(x) = \frac{1}{\pi}\int_{-\pi}^{\pi}f(x+t)D_N(t)dt $$
$\begin{aligned}[t]
\\&= \frac{1}{\pi}\int_{0}^{\pi}f(x+t)D_N(t)dt + \frac{1}{\pi}\int_{-\pi}^{0}f(x+t)D_N(t)dt \\
& \qquad
\textcolor{red}{\textup{Substitution}}
\quad
\boxed{\begin{aligned}
u&=-t,\\
du&=-dt
\end{aligned}} \\
&= \frac{1}{\pi}\int_{0}^{\pi}f(x+t)D_N(t)dt + \frac{-1}{\pi}\int_{\pi}^{0}f(x-u)D_N(u)du\\
&= \frac{1}{\pi}\int_{0}^{\pi}f(x+t)D_N(t)dt + \frac{1}{\pi}\int_{\pi}^{0}f(x-t)D_N(t)dt\\
&= \frac{1}{\pi}\int_{0}^{\pi}\Big[f(x+t)+f(x-t)\Big]\frac{\sin\big((N+\frac{1}{2})t\big)}{\sin(\frac{1}{2}t)}\cdot dt\\
\end{aligned}$
\end{proof}
\end{document}
答案1
首先是一些一般性的评论。
$$
不应在乳胶中使用,\boldsymbol\,
是粗体细空格吗??\item[[A]]
有可选参数[A
,即项目标签,后面跟着]
文本的开头,也许你想要\item[{[A]}]
- 最后一个块是左对齐的,因为你使用
$\begin{aligned}[t]
而不是显示的\begin{align}
- 你
\diff
用一个空格来定义,但你只是在方程中d
使用dt
- 应该和应该
\frac{sin\Big(
sin
\sin
\Big
\Bigl
\displaystyle
不需要aligned
(或align
),因为它已经是显示样式
解决这些问题的初步方法是
\documentclass[12pt]{article}%For type of paper
\usepackage{authblk}%For author commands
\usepackage{setspace}% For double space
\doublespacing% For double space
\usepackage{subeqnarray} % For number equations (1a), (1b) etc.
\usepackage{graphicx} % For including graphics
\usepackage[framed , numbered]{matlab-prettifier}% For MATLAB code
\usepackage{amssymb}% For ams math, symbol packages
\usepackage{amsmath} % For more ams
\usepackage{amsthm}
\usepackage{xcolor}
\usepackage{bigstrut}
\usepackage{tikz}
\renewcommand{\qedsymbol}{$\blacksquare$}
\usepackage{nccmath}% For adding Mathematical commands
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage[a4paper,margin=2.5cm]{geometry} % set page margins as needed
\newcommand{\diff}{\mathop{}\!d}
\newcommand{\innerp}[2]{\left\langle #1 \vert #2 \right\rangle}
\newcommand\intpp{\int_{-\pi}^{\pi}} % handy shortcut macro
\begin{document}
\subsection{Partial Sum of Fourier Series}
After we found the coefficients of Fourier series, the partial sum of Fourier series is defined on interval [$-\pi$,$ \pi $]
\boldmath
\begin{equation}
\mathrm{S}_N(x) = \frac{1}{2} a_{0} + \sum_{n=1}^{N} \left[
a_{n}\cos ( n x ) +
b_{n} \sin (nx) \right] ,\quad\textrm{where } N<\infty
\end{equation}
\unboldmath
Referring back to the coefficients we proved in previous Section \ref{subsection:4.1},and Sub-subsection \ref{subsubsection:4.4.2} , we can now show the partial sum as:
\begin{enumerate}
\item[{[A]}]
\[ S_N(x) = \frac{1}{2\pi}\int_{-\pi}^{\pi}f(x+t)\frac{sin\Big((N+\frac{1}{2}t)\Big)}{\sin(\frac{1}{2}t)} \diff t\]
If we take the 2 from the fraction outside the integral, we will get the Dirichlet Kernel
\[ = \frac{1}{\pi}\int_{-\pi}^{\pi}f(x+t)D_N(t)\diff t , \quad\textrm{where } D_N(t)\textrm{ is the Dirichlet Kernel } \]
Notice here we integrating from $-\pi$ to $\pi$. So, we also need to proof the integration from 0 to $\pi$ as follows:
\item[[B]]
\[ S_N(x) = \frac{1}{2\pi}\int_{0}^{\pi}\Bigl[f(x+t)+f(x-t)\Bigr]\frac{\sin\big((N+\frac{1}{2})t\big)}{\sin(\frac{1}{2}t)} \diff t \]
\[ = \frac{1}{\pi}\int_{0}^{\pi}\Bigl[f(x+t)+f(x-t)\Bigr]D_N(t)\diff t \]
\end{enumerate}
\begin{proof} For part A, we can refer back to Section \ref{subsection:4.4}. We take some part of the partial sum which we go from 1 to N.
\[ a_n\cos(nx)+b_n\sin(nx) \]
So, if we put in the Fourier series coefficients for $ a_n$ and $b_n$, we plug them in and get:
\[ = \Big[\frac{1}{\pi}\int_{-\pi}^{\pi}f(t)\cos(nt)\diff t\Big]\cos(nx)+\Big[\frac{1}{\pi}\int_{-\pi}^{\pi}f(t)\sin(nt)\diff t\Big]\sin(nx) \]
Since the integrals go from $-\pi$ to $ \pi $, we can factor out the $\frac{1}{\pi}$ and $f(t)$. Then we get:
\[ = \frac{1}{\pi}\int_{-\pi}^{\pi}f(t)\Big[\cos(nt)\cos(nx)+\sin(nt)\sin(nx)\Big]\diff t \]
So this integral can be reduced by using trig identities we covered in Section \ref{subsection:4.2}.
\[ = \frac{1}{\pi}\int_{-\pi}^{\pi}f(t)\cos\big(n(t-x)\big)\diff t \]
Then, when we put those back to the partial sum, we get:
\[ = \frac{1}{2\pi}\int_{-\pi}^{\pi}f(t)\diff t+\frac{1}{\pi}\sum_{n=1}^{N}\int_{-\pi}^{\pi}f(t)\cos\big(n(t-x)\big)\diff t \]
We can combine all integrals.We get:
\[ = \frac{1}{\pi}\int_{-\pi}^{\pi}f(t)\Bigl[\frac{1}{2}+\sum_{n=1}^{N}\cos\bigl(n(t-x)\bigl)\Bigr]\diff t \]
We can instantly write the formula by referring back to Section \ref{subsection:4.5} as:
\begin{align}
&= \frac{1}{\pi}\intpp f(t)D_N(t-x)\,\diff t \\
& \qquad
\textcolor{red}{\textup{Substitution}}
\quad
\boxed{\begin{aligned}
u&=t-x,\\
du&=\diff t
\end{aligned}} \\
&= \frac{1}{\pi}\int_{-\pi-x}^{\pi-x}f(x+u)D_N(u)\diff uu \\
&= \frac{1}{\pi}\intpp f(x+t)D_N(t)\,\diff t \\
&= \frac{1}{2\pi}\intpp f(x+t)\,
\frac{\sin\bigl((N+\frac{1}{2})t\bigr)}{\sin\bigl(\frac{1}{2}t\bigr)}\diff t
\qquad\qedhere \\ % why qed here?
&= \frac{1}{\pi}\int_{-\pi-x}^{\pi-x}f(x+u)D_N(u)\diff u \\
&= \frac{1}{\pi}\int_{-\pi}^{\pi}f(x+t)D_N(t)\diff t \\
&= \frac{1}{2\pi}\int_{-\pi}^{\pi}f(x+t)\frac{\sin\big((N+\frac{1}{2})t\bigr)}{\sin(\frac{1}{2}t)}\diff t
\end{align}
\end{proof}
\begin{proof} For part B, we want to restrict the integral from 0 to $\pi $. We begin by partial sum.
\begin{align}
S_N(x) &= \frac{1}{\pi}\int_{-\pi}^{\pi}f(x+t)D_N(t)\diff t \\
&= \frac{1}{\pi}\int_{0}^{\pi}f(x+t)D_N(t)\diff t + \frac{1}{\pi}\int_{-\pi}^{0}f(x+t)D_N(t)\diff t \\
& \qquad
\textcolor{red}{\textup{Substitution}}
\quad
\boxed{\begin{aligned}
u&=-t,\\
du&=-\diff t
\end{aligned}} \\
&= \frac{1}{\pi}\int_{0}^{\pi}f(x+t)D_N(t)\diff t + \frac{-1}{\pi}\int_{\pi}^{0}f(x-u)D_N(u)du\\
&= \frac{1}{\pi}\int_{0}^{\pi}f(x+t)D_N(t)\diff t + \frac{1}{\pi}\int_{\pi}^{0}f(x-t)D_N(t)\diff t\\
&= \frac{1}{\pi}\int_{0}^{\pi}\Bigl[f(x+t)+f(x-t)\Bigr]\frac{\sin\bigl((N+\frac{1}{2})t\bigr)}{\sin(\frac{1}{2}t)}\cdot \diff t
\end{align}
\end{proof}
\end{document}