\newtheorem{ex}{Exercise}
\begin{ex}
\textup{Consider the differential equation
\begin{align}
\label{eq3}
\frac{x}{y(x)}y'(x)+1=y(x)\,\textup{log}(x)
\end{align} with unknown quantity $y:(0,+\infty)\rightarrow\mathbb{R^*}$.
\begin{itemize}
\item Show that Equation \eqref{eq3} is a Bernoulli-type differential equation and that $z(x):=\frac{1}{y(x)}$ satisfies
\begin{align}
\label{eq4}
z'(x)-\frac{z(x)}{x}=-\frac{log(x)}{x}\ .
\end{align}
\item Find all the solutions to Equation \eqref{eq4} on (0,+\infty).
\end{itemize}}
\end{ex}\hfill\break
答案1
错位是由于
Find all the solutions to Equation \eqref{eq4} on (0,+\infty).
就像\infty
数学模式命令一样。编译代码会导致经典Missing $ inserted
错误:永远不要忽略错误!TeX 会尝试恢复,但无论你得到什么 PDF 输出通常都是垃圾,正如你所见。
另外几条评论:
- 不要使用
\textup{log}
,而是\log
:后者具有正确的操作符间距,并且不需要\,
在它前面明确说明。 :
是关系符号;对于标点符号,在这种情况下使用冒号\colon
。- 避免
align
使用单行方程。 - 避免将整个环境内容包装在其中
\textup
;从一开始就使用直立文本的定理样式。
\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\theoremstyle{definition} % predefined style with upright text
\newtheorem{ex}{Exercise}
\providecommand*{\coloneq}{\mathrel{\mathop:}=}
\begin{document}
\begin{ex}
Consider the differential equation
\begin{equation}
\label{eq3}
\frac{x}{y(x)} \, y'(x)+1=y(x)\log(x)
\end{equation}
with unknown quantity $y\colon(0,+\infty)\rightarrow\mathbb{R}^*$.
\begin{itemize}
\item Show that Equation \eqref{eq3} is a Bernoulli-type differential equation
and that $z(x)\coloneq\frac{1}{y(x)}$ satisfies
\begin{equation}
\label{eq4}
z'(x)-\frac{z(x)}{x}=-\frac{\log(x)}{x}\ .
\end{equation}
\item Find all the solutions to Equation \eqref{eq4} on $(0,+\infty)$.
\end{itemize}
\end{ex}
\end{document}