2

What am I doing wrong?

\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}
Mico
  • 506,678
Britney
  • 21

2 Answers2

4

The following is a working example, I'm sure some mathematician here would improve it.

If it doesn't work on your computer, you have some problems with your TeX distribution.

I highly recommend to you to read What are good learning resources for a LaTeX beginner?

\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}

enter image description here enter image description here

CarLaTeX
  • 62,716
  • thank you! it doesn't work on my computer but i used an online editor to get the pdf version of my work in progress. but this is super helpful. – Britney Sep 11 '17 at 06:05
  • 2
    @Britney I would guess you are using the incorrect command on your local installation (tex rather than latex) – David Carlisle Sep 11 '17 at 06:36
2

Code such as

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$$

is simply incorrect. I suspect that what you really want is

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$

Note that $...$ serves to enter and exit inline math, whereas $$...$$ serves to enter and exit display-style math. In fact, $$...$$ shouldn't even be used in a LaTeX document; see the posting Why is \[ … \] preferable to $$ … $$? for more information on this particular subject.

The times package is deprecated; I suggest you load the newtxtext and newtxmath packages.

\min and \max do not take arguments. If you want to delimit their scope, use (...), [...], or \{...\} -- not {...}.

Assuming that you mostly want inline math in the proof environment, except maybe for the very last equation, the following may be of use to you. (By the way, I haven't checked the math itself!!)

enter image description here

\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}
Mico
  • 506,678