新手使用 Latex:发生严重错误,未生成输出 PDF 文件!我不知道该怎么办!

新手使用 Latex:发生严重错误,未生成输出 PDF 文件!我不知道该怎么办!
\documentclass[12pt,oneside]{article}
\setlength{\parindent}{0pt}

% This package simply sets the margins to be 1 inch.
\usepackage[margin=1in]{geometry}
\usepackage{array}
\usepackage{graphicx}

% This removes page numbers.
\pagenumbering{gobble}

% These packages include nice commands from AMS-LaTeX
\usepackage{amssymb,amsmath,amsthm}
\usepackage[table,xcdraw]{xcolor}
% Make the space between lines slightly more
% generous than normal single spacing, but compensate
% so that the spacing between rows of matrices still
% looks normal.  Note that 1.1=1/.9090909...
\renewcommand{\baselinestretch}{1.1}
\renewcommand{\arraystretch}{.91}

% Define an environment for exercises.
% \newenvironment{exercise}[1]{\vspace{.5cm}\noindent\textbf{#1 \hspace{.05em}}}{}

% Allow for underlining.
\usepackage[normalem]{ulem}

% define shortcut commands for commonly used symbols
\newcommand{\R}{\mathbb{R}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\calP}{\mathcal{P}}

\DeclareMathOperator{\vsspan}{span}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

Unit 2 Assessment - Albert Xia
\vspace{6mm}

1. Fill in the table.
\begin{align*}
\begin{tabular}{|c|c|}
\hline
Exponential form & Logarithmic Form \\ \hline
$2401=7^4$       & $\log_7(2401)=4$ \\ \hline
$a^c =b$         & $a=\log_b c$     \\ \hline
\end{tabular}
\end{align*}
\vspace{6mm}

2. Solve for $x$. Give answer to three decimal places where applicable.
$$\text{a.}\quad x=\log37$$
\begin{align*}
    10^x&=37\\
    x&=1.568
\end{align*}
$$\text{b.}\quad x=\log10000$$
\begin{align*}
    10^x&=10000\\
    x&=4
\end{align*}

3. Convert each of the following to exponential form and solve.
$$\text{a.}\quad n=\log_416384$$
\begin{align*}
    4^n&=16384\\
    4^n&=4^7\\
    n&=7
\end{align*}
$$\text{b.}\quad 6=\log_b46656$$
\begin{align*}
    b^6&=46656\\
    b&=\sqrt{6}46656\\
    b&=6
\end{align*}
\newpage
4. Use the special properties of logarithms to solve the following equations.
$$\text{a.}\quad M=\log_{11}11^{21}$$
\qquad\text{Using} the property $log_{a}a^{x}=x$...
\begin{align*}
    M&=21\log_{11}(11)\\
    M&=21
\end{align*}

$$\text{b.}\quad 4^{\log_{4}57}=x$$
\qquad\text{Using} the property $a^{log_{a}x}=x$...
\begin{align*}
    x&=4^{log_{4}57}\\
    x&=57
\end{align*}
$$\text{c.}\quad x=\log_{23}78$$
\qquad Using the proprety $\log_{a}b=\frac{\log a}{\log b}$...
\begin{align*}
    x=\frac{\log78}{\log23}\\
    x\approx1.389
\end{align*}
\vspace{6mm}

5. Evaluate the following using a method of your choice.
$$\text{a.}\quad\log_9729$$
\qquad Let $x$ be the unknown variable.
\begin{align*}
    7^x&=729\\
    x&=3.387\\
\end{align*}
$$\text{b.}\quad\log_{6}7776-\log_{6}36$$
\qquad$\log_{6}7776\text{ can be rewritten as }6^n=7776$
\begin{align*}
    6^n&=7776\\
    6^n&=6^5\\
    n&=5
\end{align*}
\qquad$\log_{6}36\text{ can be rewritten as }6^x=36$
\begin{align*}
    6^x&=36\\
    6^x&=6^2\\
    x&=2
\end{align*}
\qquad Now we can substitute $\log_{6}7776-\log_{6}36$ with $n-x$
\begin{align*}
    \log_{6}7776-\log_{6}36&=n-x\\
    n-x&=5-2\\
    n-x&=3
\end{align*}
\vspace{6mm}

6. Solve for the unknown variable using a method of your choice.
$$\text{a.}\quad5^{11x+23}=125^{7x}$$
\qquad I will solve for the unknown variable by making the bases equal.
\begin{align*}
    5^{11x+23}&=((5)^3)^{7x}\\
    5^{11x+23}&=(5)^21x\\
    11x+23&=21x\\
    23&=21x-11x\\
    23&=10x\\
    \frac{23}{10}&=x
\end{align*}

$$\text{b.}\quad2^n=123$$
\qquad I will solve for the unknown variable using the property $q\log_b p=\log_b p^q$. 
\begin{align*}
    2^n&=123\\
    \log2^n&=\log123\\
    n\log2&=log123\\
    n&=\frac{\log123}{\log2}\\
    n&\approx6.943
\end{align*}
\newpage

7. Solve for the unknown variable using a method of your choice.
\begin{align*}
    3^{x+5}+3^x&=177876\\
    (3^x)(3^5)+3^x&=177876\\
    3^x(3^5+1)&=177876\\
    3^x(244)&=177876\\
    3^x&=\frac{177876}{244}\\
    3^x&=729\\
    3^x&=3^6\\
    x&=6
\end{align*}
\vspace{6mm}

8. Describe the transformations on the given logarithmic function.

$$g(x)=-\frac{1}{6}\log_{10}[-\frac{1}{6}(x-7)]-85$$
\vspace{2mm}

The transformations on the given logarithmic function is as follows:
\begin{enumerate}
    \item The parent function of this function is $g(x)=a\log_{10}x$.
    \item The transformed function is reflected in the x-axis.
    \item The transformed function is being vertically compressed by a factor of $\frac{1}{6}$.
    \item The transformed function is being reflected in the y-axis.
    \item The transformed function is being horizontally stretched by a factor of 6.
    \item The transformed function is being translated right 7 units.
    \item The transformed function is being translated down 85 units.
\end{enumerate}
\vspace{6mm}

9. Write the equation of a logarithmic function that has been vertically stretched by 5, reflected in the x-axis, horizontally compressed by $\frac{1}{3}$, moved 11 units left and 8 units down. Justify your answer.
\vspace{3mm}

I define the transformed function as $f(x)$.
\begin{align*}
    a=-5\\
    k=3\\
    d=-11\\
    c=-8
\end{align*}
The transformed function is $f(x)=-5\log_{10}[3(x+11)]-8$.
\vspace{12mm}

10. The point $(-23,\,-13)$ is on the transformed function: $y=-2\log_{10}[-5(x+3)]-9$. Find the original point on the parent function $f(x)=\log_{10}x$. Justify your answer.
\vspace{3mm}
\begin{align*}
    a&=-2\\
    k&=-5\\
    d&=-3\\
    c&=-9
\end{align*}
I will use mapping rule to determine the x and y values translated onto the parent function.
$$(x,y)\rightarrow(-23,\,-13)$$
$$(x,y)\rightarrow(\frac{x}{k}+d,\,ay+c)$$
\vspace{3mm}

So we have for the $x$ value...
\begin{align*}
    \frac{x}{-5}-3&=-23\\
    \frac{x}{-5}&=-20\\
    x&=-20(-5)\\
    x&=100
\end{align*}

And for the $y$ value...
\begin{align*}
    -2(y)+(-9)&=-13\\
    -2(y)&=(-13)+9\\
    -2(y)&=-4\\
    y&=\frac{-4}{-2}\\
    y&=2
\end{align*}

Therefore we determine the original point on the parent function $f(x)=\log_{10}x$ to be $(100,2)$.
\vspace{6mm}

11. Ethan bought a new car worth 60000 dollars. After 5 years, the car was worth 35429.40 dollars. Calculate the depreciation rate of Ethan's car.
\newpage
The equation I will use is $W=C(1-\frac{D}{100})^T$ where $C$ is initial cost, $W$ is worth of car, $D$ is rate of depreciation, and $T$ is time in years.
\begin{align*}
    W&=C(1-\frac{D}{100})^T\\
    35429.40&=60000(1-\frac{D}{100})^5\\
    \frac{35429.40}{60000}&=(1-\frac{D}{100})^5\\
    (1-\frac{D}{100})&=(\frac{35429.40}{60000})^{\frac{1}{5}}\\
    (\frac{35429.40}{60000})^{\frac{1}{5}}&=0.9\\
    0.9&=(1-\frac{D}{100})\\
    \frac{D}{100}&=1-0.9\\
    \frac{D}{100}&=0.1\\
    D&=0.1*100\\
    D&=10\text{ (percent)}
\end{align*}
The depreciation rate of Ethan's car is 10 percent.
\vspace{12mm}

12. The hydrogen ion concentration of a lemon is about 0.01. What is its pH?
\vspace{6mm}

I will convert the value of the lemon's hydrogen ion concentration 0.01 into a base ten number for the logarithmic equation, which is $10^{-2}$. 
\vspace{6mm}

I will determine the pH by using the equation $pH=-\log[H^+]$, where the value of $[H^+]$ is $10^{-2}\,mol/l$.
\begin{align*}
    pH&=-\log(10^{-2})\\
    pH&=-2\log_{10}(10)\\
    pH&=-(-2)\\
    pH&=2
\end{align*}
The pH of a lemon is 2.
\vspace{12mm}

13. How does an earthquake of magnitude 8.4 compare to an earthquake of magnitude 3.7? Round answer to the nearest whole number.

To calculate the difference in size, I will divide $10^{8.4}$ from $10^{3.7}$ since the Richter scale is logarithmic.
\newpage
\begin{align*}
    \text{Size_difference}&=\frac{10^{8.4}}{10^{3.7}}\\
    \text{Size_difference}&=10^{8.4-3.7}\\
    \text{Size_difference}&=10^{4.7}\\
    \text{Size_difference}&\approx50119
\end{align*}

An earthquake of 8.4 magnitude on the Richter scale is approximately 50119 times larger than one of 3.7 magnitude on the same scale.

\end{document}

答案1

将上一个 align*-environment 更改为

\begin{align*}
    \text{Size\_difference}&=\frac{10^{8.4}}{10^{3.7}}\\
    \text{Size\_difference}&=10^{8.4-3.7}\\
    \text{Size\_difference}&=10^{4.7}\\
    \text{Size\_difference}&\approx50119
\end{align*}

应该可以成功编译整个手稿。 在此处输入图片描述

答案2

除了修复语法错误(忘记转义文字_(下划线)字符)之外,您可能还需要熟悉避免执行过多视觉格式化的方法。

我附上了一些建议,让你的文档“表现”得像 LaTeX 文档。枚举列表中的最后一项将如下所示:

在此处输入图片描述

\documentclass[12pt,oneside]{article}
%\setlength{\parindent}{0pt} % not needed

% This package simply sets the margins to be 1 inch.
\usepackage[margin=1in]{geometry}

\usepackage{array}
\usepackage{graphicx}

% This removes page numbers.
\pagestyle{empty} %%% \pagenumbering{gobble}

% These packages include nice commands from AMS-LaTeX
\usepackage{amssymb,amsmath,amsthm}
\usepackage[table,xcdraw]{xcolor}

%% Make the space between lines slightly more
%% generous than normal single spacing, but compensate
%% so that the spacing between rows of matrices still
%% looks normal.  Note that 1.1=1/.9090909...
%%\renewcommand{\baselinestretch}{1.1}
%%\renewcommand{\arraystretch}{.91}
% The preceding reasoning is incorrect! Better to use the setspace package:
\usepackage[nodisplayskipstretch]{setspace}
\setstretch{1.1}

% Define an environment for exercises.
% \newenvironment{exercise}[1]{\vspace{.5cm}\noindent\textbf{#1 \hspace{.05em}}}{}

% Allow for underlining.
\usepackage[normalem]{ulem}

% define shortcut commands for commonly used symbols
\newcommand{\R}{\mathbb{R}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\calP}{\mathcal{P}}
\DeclareMathOperator{\vsspan}{span}


%% New code:
\usepackage[T1]{fontenc}
\usepackage{enumitem}
\setlist[enumerate,1]{label=\bfseries\arabic*.,left=0pt}
\setlist[enumerate,2]{label=\alph*.,left=0pt}
\usepackage[print-unity-mantissa=false,per-mode=symbol]{siunitx}
\allowdisplaybreaks

\begin{document}


\subsubsection*{Unit 2 Assessment --- Albert Xia}
%%% \vspace{6mm}

\begin{enumerate}

% #1
\item Fill in the table.
%%%%%\begin{align*}
\begin{center}
\setlength{\extrarowheight}{2pt}
\begin{tabular}{|c|c|}
\hline
Exponential form & Logarithmic Form \\ \hline
$2401=7^4$       & $\log_7(2401)=4$ \\ \hline
$a^c =b$         & $a=\log_b c$     \\ \hline
\end{tabular}
%%%%%\end{align*}
\end{center}
%%% \vspace{6mm}

% #2
\item Solve for $x$. Give answer to three decimal places where applicable.
\begin{enumerate}
\item $x=\log37$
\begin{align*}
    10^x&=37\\
    x&=1.568
\end{align*}
\item $x=\log10000$
\begin{align*}
    10^x&=10000\\
    x&=4
\end{align*}
\end{enumerate}

% #3
\item Convert each of the following to exponential form and solve.
\begin{enumerate}
\item $n=\log_416384$
\begin{align*}
    4^n&=16384\\
    4^n&=4^7\\
    n&=7
\end{align*}
\item $6=\log_b46656$
\begin{align*}
    b^6&=46656\\
     b&=\sqrt[6]{46656}\\
     b&=6
\end{align*}
\end{enumerate}

% #4
\item Use the special properties of logarithms to solve the following equations.
\begin{enumerate}
\item $M=\log_{11}11^{21}$

Using the property $\log_{a}a^{x}=x$:
\begin{align*}
    M&=21\log_{11}(11)\\
     &=21
\end{align*}

\item $4^{\log_{4}57}=x$

Using the property $a^{\log_{a}x}=x$:
\begin{align*}
    x&=4^{\log_{4}57}\\
    x&=57
\end{align*}
\item $x=\log_{23}78$

Using the proprety $\log_{a}b=\frac{\log a}{\log b}$:
\begin{align*}
    x&=\frac{\log78}{\log23}\\
     &\approx1.389
\end{align*}
\end{enumerate}

% #5 
\item Evaluate the following using a method of your choice.
\begin{enumerate}
\item $\log_9729$. 

Let $x$ be the unknown variable.
\begin{align*}
    7^x&=729\\
      x&=3.387
\end{align*}
\item $\log_{6}7776-\log_{6}36$.

$\log_{6}7776$ can be rewritten as $6^n=7776$
\begin{align*}
    6^n&=7776\\
    6^n&=6^5\\
      n&=5
\end{align*}
$\log_{6}36$ can be rewritten as $6^x=36$
\begin{align*}
    6^x&=36\\
    6^x&=6^2\\
      x&=2
\end{align*}
Now we can substitute $\log_{6}7776-\log_{6}36$ with $n-x$
\begin{align*}
    \log_{6}7776-\log_{6}36&=n-x\\
    n-x&=5-2\\
    n-x&=3
\end{align*}
\end{enumerate}

\newpage
% #6
\item Solve for the unknown variable using a method of your choice.
\begin{enumerate}
\item $5^{11x+23}=125^{7x}$

I will solve for the unknown variable $x$ by making the bases equal.
\begin{align*}
    5^{11x+23}&=((5)^3)^{7x}\\
    5^{11x+23}&=(5)^{21x}\\
    11x+23&=21x\\
    23&=21x-11x\\
    23&=10x\\
    \frac{23}{10}&=x
\end{align*}

\item $2^n=123$

I will solve for the unknown variable using the property $q\log_b p=\log_b p^q$. 
\begin{align*}
    2^n&=123\\
    \log2^n&=\log123\\
    n\log2&=\log123\\
    n&=\frac{\log123}{\log2}\\
    n&\approx6.943
\end{align*}
\end{enumerate}


% #7
\item Solve for the unknown variable using a method of your choice.
\begin{align*}
    3^{x+5}+3^x&=177876\\
    (3^x)(3^5)+3^x&=177876\\
    3^x(3^5+1)&=177876\\
    3^x(244)&=177876\\
    3^x&=\frac{177876}{244}\\
    3^x&=729\\
    3^x&=3^6\\
    x&=6
\end{align*}
%%% \vspace{6mm}

% #8
\item Describe the transformations on the given logarithmic function.
\[
g(x)=-\frac{1}{6}\log_{10}\Bigl[-\frac{1}{6}(x-7)\Bigr]-85
\]
%\vspace{2mm}

The transformations on the given logarithmic function are as follows:
\begin{enumerate}
    \item The parent function of this function is $g(x)=a\log_{10}x-c$.
    \item The transformed function is being reflected in the $x$-axis.
    \item The transformed function is being vertically compressed by a factor of $\frac{1}{6}$.
    \item The transformed function is being reflected in the $y$-axis.
    \item The transformed function is being horizontally stretched by a factor of~6.
    \item The transformed function is being translated right 7 units.
    \item The transformed function is being translated down 85 units.
\end{enumerate}
%%% \vspace{6mm}

% #9
\item Write the equation of a logarithmic function that has been vertically stretched by 5, reflected in the x-axis, horizontally compressed by $\frac{1}{3}$, moved 11 units left and 8 units down. Justify your answer.
%\vspace{3mm}

I define the transformed function as $f(x)$.
\begin{align*}
    a&=-5\\
    k&=3\\
    d&=-11\\
    c&=-8
\end{align*}
The transformed function is $f(x)=-5\log_{10}[3(x+11)]-8$.
%\vspace{12mm}

% #10
\item The point $(-23,-13)$ is on the transformed function: $y=-2\log_{10}[-5(x+3)]-9$. Find the original point on the parent function $f(x)=\log_{10}x$. Justify your answer.
%\vspace{3mm}
\begin{align*}
    a&=-2\\
    k&=-5\\
    d&=-3\\
    c&=-9
\end{align*}
I will use mapping rule to determine the $x$ and $y$ values translated onto the parent function.
\begin{align*}
(x,y)&\rightarrow(-23,\,-13)\\
(x,y)&\rightarrow\Bigl(\frac{x}{k}+d,\,ay+c\Bigr)
\end{align*}
%\vspace{3mm}
\enlargethispage{1.5\baselineskip} % only instance of visual formatting
So we have for the $x$ value
\begin{align*}
    \frac{x}{-5}-3&=-23\\
    \frac{x}{-5}&=-20\\
    x&=-20(-5)\\
    x&=100
\end{align*}

And for the $y$ value...
\begin{align*}
    -2(y)+(-9)&=-13\\
    -2(y)&=(-13)+9\\
    -2(y)&=-4\\
    y&=\frac{-4}{-2}\\
    y&=2
\end{align*}
Therefore we determine the original point on the parent function $f(x)=\log_{10}x$ to be $(100,2)$.
%%% \vspace{6mm}

% #11
\item Ethan bought a new car worth \$60000. After 5 years, the car was worth \$35429.40. Calculate the depreciation rate of Ethan's car.

%\newpage
The equation I will use is $W=C\bigl(1-\frac{D}{100}\bigr)^T$, where $C$ is initial cost (in dollars), $W$ is the current worth of the car (in dollars), $D$ is the annualized rate of depreciation, and $T$ is time (in years).
\begin{align*}
    W&=C\Bigl(1-\frac{D}{100}\Bigr)^T\\
    35429.40&=60000\Bigl(1-\frac{D}{100}\Bigr)^5\\
    \frac{35429.40}{60000}&=\Bigl(1-\frac{D}{100}\Bigr)^5\\
    \Bigl(1-\frac{D}{100}\Bigr)&=\Bigl(\frac{35429.40}{60000}\Bigr)^{\frac{1}{5}}\\
    \Bigl(\frac{35429.40}{60000}\Bigr)^{\frac{1}{5}}&=0.9\\
    0.9&=\Bigl(1-\frac{D}{100}\Bigr)\\
    \frac{D}{100}&=1-0.9\\
    \frac{D}{100}&=0.1\\
    D&=0.1\cdot100\\
    D&=10\%\,.
\end{align*}
The depreciation rate of Ethan's car is 10 percent.
%\vspace{12mm}

% #12
\item The hydrogen ion concentration of a lemon is about~0.01. What is its pH?
%%% \vspace{6mm}

I will convert the value of the lemon's hydrogen ion concentration 0.01 into a base-ten number for the logarithmic equation, which is $10^{-2}$. 
%%% \vspace{6mm}

I will determine the pH by using the equation 
$\mathrm{pH}=-\log[\mathrm{H}^+]$, 
where the value of $[\mathrm{H}^+]$ is \qty{1e-2}{\mol\per\liter}.
\begin{align*}
    \mathrm{pH}&=-\log(10^{-2})\\
               &=-2\log_{10}(10)\\
               &=-(-2)\\
               &=2
\end{align*}
The pH of a lemon is 2.

%\vspace{12mm}


% #13
\item How does an earthquake of magnitude 8.4 compare to an earthquake of magnitude 3.7? Round the answer to the nearest whole number.

To calculate the difference in size, I will divide $10^{8.4}$ by $10^{3.7}$ since the Richter scale is logarithmic.
\begin{align*}
    \mathrm{Size\_difference}&=\frac{10^{8.4}}{10^{3.7}}\\
                             &=10^{8.4-3.7}\\
                             &=10^{4.7}\\
                             &\approx 50119
\end{align*}
An earthquake of 8.4 magnitude on the Richter scale is approximately 50119 times more powerful than one of 3.7 magnitude on the same scale.

\end{enumerate}

\end{document}

相关内容