文档类别无法识别,且定理和证明存在问题

文档类别无法识别,且定理和证明存在问题

我究竟做错了什么?

\documentclass{amsart}
\usepackage{amssymb,amsmath,latexsym,times,color}


\newtheorem*{theorem*}{Theorem}
\newtheorem{theorem}{Theorem}
\newtheorem{lemma}[theorem]{Lemma}
\begin{document}

Question Number 3
\begin{theorem*}
Since a and b are positive numbers, then $$\frac{a}{b}$$ and $$\frac{a+2b}{a}$$ are positive integers.
\end{theorem*}
\begin{proof}
Case 1: If $$\frac{a}{b}\leq 2$$ then $$min{$$\frac{a}{b}$$,$$\frac{a+2b}{a}$$}\leq\frac{a}{b}\leq 2$$
Thus $$min{\frac{a}{b}$$,$$\frac{a+2b}{a}$$}\leq 2$$
Case 1: If $$\frac{a}{b}\leq 2$$ then $$min{$$\frac{a}{b}$$,$$\frac{a+2b}{a}$$}\leq\frac{a}{b}\leq 2$$
Thus min{$$\frac{a}{b}$$,$$\frac{a+2b}{a}$$}\leq 2
Case 2: If $$\frac{a}{b}>2$$ then $$\frac{b}{a}<(1/2)$$
Since $$\frac{a+2b}{a}= \frac{a}{a} + \frac{2b}{a}$$ which also means it is < 1+2*(1/2)
Thus $$\frac{a+2b}{a}<2$$
so $$min{$$\frac{a}{b}$$,$$\frac{a+2b}{a}$$}\leq\frac{a+2b}{a}<2$$
Hence from both sides we have min{$$\frac{a}{b}$$,$$\frac{a+2b}{a}$$}\leq 2
If you do this again with opposite inequalities you will get:
Case 1: If $$\frac{a}{b}\leq2$$ then \frac{b}{a}\geq (1/2)
Since $$\frac{a+2b}{a}= 1+\frac{2b}{a}\geq 1+2*(1/2)= 2$$ so \frac{a+2b}{a}\geq 2
thus $$max{\frac{a}{b},\frac{a+2b}{a}}\geq \frac{a+2b}{a}\geq 2$$ which simplifies to:
$$max{\frac{a}{b},\frac{a+2b}{a}}\geq 2$$
Case 2: If $$\frac{a}{b}>2$$ then $$max{\frac{a}{b},\frac{a+2b}{a}}\geq \frac{a}{b}>2$$
This means:
$$max{\frac{a}{b},\frac{a+2b}{a}}>2$$ 
From both cases we get: $$max{\frac{a}{b},\frac{a+2b}{a}}\geq 2$$
Since both sets of inequalities are true, we obtain:
$$min{\frac{a}{b},\frac{a+2b}{a}}\leq 2\leq max{\frac{a}{b},\frac{a+2b}{a}}$$
\end{proof}
\end{document}

答案1

以下是一个工作示例,我相信这里的一些数学家会改进它。

如果它不能在您的计算机上运行,​​则您的 TeX 发行版存在一些问题。

我强烈建议你阅读对于 LaTeX 初学者来说有哪些好的学习资源?

\documentclass{amsart}
\usepackage{amssymb,amsmath,newtxtext,newtxmath}

\newtheorem*{theorem*}{Theorem}
\newtheorem{theorem}{Theorem}
\newtheorem{lemma}[theorem]{Lemma}

\begin{document}
Question Number 3
\begin{theorem*}
    Since a and b are positive numbers, then 
    \[
    \frac{a}{b}
    \] 
    and 
    \[
    \frac{a+2b}{a}
    \] 
    are positive integers.
\end{theorem*}
\begin{proof}
    Case 1: If 
    \[
    \frac{a}{b}\leq 2
    \] 
    then 
    \[
    \min\left\{\frac{a}{b},\frac{a+2b}{a}\right\}\leq\frac{a}{b}\leq 2
    \]
    Thus 
    \[
    \min\left\{\frac{a}{b},\frac{a+2b}{a}\right\}\leq 2
    \]
    Case 1: If 
    \[
    \frac{a}{b}\leq 2
    \] 
    then 
    \[
    \min\left\{\frac{a}{b},\frac{a+2b}{a}\right\}\leq\frac{a}{b}\leq 2
    \]
    Thus 
    \[
    \min\left\{\frac{a}{b},\frac{a+2b}{a}\right\}\leq 2
    \]
    Case 2: If 
    \[
    \frac{a}{b}>2
    \] 
    then 
    \[
    \frac{b}{a}<(1/2)
    \]
    Since 
    \[
    \frac{a+2b}{a}= \frac{a}{a} + \frac{2b}{a}
    \] 
    which also means it is \(< 1+2*(1/2)\).
    Thus 
    \[
    \frac{a+2b}{a}<2
    \]
    so 
    \[
    \min\left\{\frac{a}{b},\frac{a+2b}{a}\right\}\leq\frac{a+2b}{a}<2
    \]
    Hence from both sides we have 
    \[
    \min\left\{\frac{a}{b},\frac{a+2b}{a}\right\}\leq 2
    \]
    If you do this again with opposite inequalities you will get:
    Case 1: If 
    \[
    \frac{a}{b}\leq2
    \] 
    then 
    \[
    \frac{b}{a}\geq (1/2)
    \] 
    Since 
    \[
    \frac{a+2b}{a}= 1+\frac{2b}{a}\geq 1+2*(1/2)= 2
    \]
    so 
    \[
    \frac{a+2b}{a}\geq 2
    \] 
    thus 
    \[
    \max\left\{\frac{a}{b},\frac{a+2b}{a}\right\}\geq \frac{a+2b}{a}\geq 2
    \] 
    which simplifies to:
    \[
    \max\left\{\frac{a}{b},\frac{a+2b}{a}\right\}\geq 2
    \]
    Case 2: If 
    \[
    \frac{a}{b}>2
    \]
    then 
    \[
    \max\left\{\frac{a}{b},\frac{a+2b}{a}\right\}\geq \frac{a}{b}>2
    \]
    This means:
    \[
    \max\left\{\frac{a}{b},\frac{a+2b}{a}\right\}>2 
    \]
    From both cases we get: 
    \[
    \max\left\{\frac{a}{b},\frac{a+2b}{a}\right\}\geq 2
    \]
    Since both sets of inequalities are true, we obtain:
    \[
    \min\left\{\frac{a}{b},\frac{a+2b}{a}\right\}\leq 2\leq \max\left\{\frac{a}{b},\frac{a+2b}{a}\right\}
    \]
    \end{proof}
\end{document}

在此处输入图片描述 在此处输入图片描述

答案2

代码如下

Thus min{$$\frac{a}{b}$$,$$\frac{a+2b}{a}$$}\leq 2
...
so $$min{$$\frac{a}{b}$$,$$\frac{a+2b}{a}$$}\leq\frac{a+2b}{a}<2$$

完全不正确。我怀疑你真正想要的是

Thus $\min(\frac{a}{b},\frac{a+2b}{a})\leq 2$
...
so $\min(\frac{a}{b},\frac{a+2b}{a})\leq\frac{a+2b}{a}<2$

请注意,$...$用于输入和退出内联数学,而$$...$$用于输入和退出显示样式数学。事实上,$$...$$甚至不应该在 LaTeX 文档中使用;请参阅帖子为什么\[ … \]优于$$ … $$了解有关此特定主题的更多信息。

times包已被弃用;我建议您加载newtxtextnewtxmath包。

\min\max不是接受参数。如果要限定其范围,请使用(...)[...]\{...\}--不是 {...}

假设您主要希望在proof环境中使用内联数学,除了最后一个等式之外,以下内容可能对您有用。(顺便说一句,我还没有检查过数学本身!!)

在此处输入图片描述

\documentclass{amsart}
\usepackage{amssymb,amsmath,newtxtext,newtxmath}

\newtheorem*{theorem*}{Theorem}
\begin{document}

\begin{theorem*}
If $a$ and $b$ are positive numbers, then $\frac{a}{b}$ and $\frac{a+2b}{a}$ are positive integers.
\end{theorem*}
\begin{proof}
Case 1: If $\frac{a}{b}\leq 2$ then $\min\bigl(\frac{a}{b},\frac{a+2b}{a}\bigr)\leq\frac{a}{b}\leq 2$.
Thus $\min\bigl(\frac{a}{b},\frac{a+2b}{a}\bigr)\leq 2$.

Case 2: If $\frac{a}{b}>2$ then $\frac{b}{a}<(1/2)$.
Since $\frac{a+2b}{a}= \frac{a}{a} + \frac{2b}{a}$ which also means it is less than $1+2(1/2)$.
Thus $\frac{a+2b}{a}<2$
so $\min\bigl(\frac{a}{b},\frac{a+2b}{a}\bigr)\leq\frac{a+2b}{a}<2$.

Hence from both sides we have $\min\bigl(\frac{a}{b},\frac{a+2b}{a}\bigr)\leq 2$.

If you do this again with opposite inequalities you will get:

Case 1: If $\frac{a}{b}\leq2$ then $\frac{b}{a}\geq (1/2)$.
Since $\frac{a+2b}{a}= 1+\frac{2b}{a}\geq 1+2(1/2)= 2$ so $\frac{a+2b}{a}\geq 2$
thus $\max\bigl(\frac{a}{b},\frac{a+2b}{a}\bigr)\geq \frac{a+2b}{a}\geq 2$ which simplifies to
$\max\bigl(\frac{a}{b},\frac{a+2b}{a}\bigr)\geq 2$

Case 2: If $\frac{a}{b}>2$ then $\max\bigl(\frac{a}{b},\frac{a+2b}{a}\bigr)\geq \frac{a}{b}>2$.
This means:
$\max\bigl(\frac{a}{b},\frac{a+2b}{a}\bigr)>2$.

From both cases we get: $\max\bigl(\frac{a}{b},\frac{a+2b}{a}\bigr)\geq 2$.

Since both sets of inequalities are true, we obtain:
\[
\min\Bigl(\frac{a}{b},\frac{a+2b}{a}\Bigr)\leq 2\leq 
\max\Bigl(\frac{a}{b},\frac{a+2b}{a}\Bigr) \qedhere
\]
\end{proof}
\end{document}

相关内容