Let $f : \mathbb{C} \setminus \{0\} \rightarrow \mathbb{C}$, $f(z) = z + \frac{1}{z}$. Given that
$f(z) = \begin{cases}
\sqrt{2 + \sqrt{n}} &\text{if } z \in \mathbb{R} \setminus \lbrace 0\rbrace \\
\sqrt{1 + \frac{\sqrt{n}}{2}} + i \sqrt{-1 + \frac{\sqrt{n}}{2}} &\text{if } z \in \mathbb{C} \setminus \mathbb{R}
\end{cases}
for some positive integer $n$ and that $f(z^8) = 2023$ for all $z \in \mathbb{C} \setminus \lbrace 0\rbrace$, find $n$.
这是我的分段函数的 latex 代码,但输出只有一行,而不是两行。我怎样才能让它看起来像一个正常的分段函数?谢谢!
答案1
正如评论中提到的,您的方程式代码并未以 结尾$
。添加它并扩展您的代码片段以完成小文档(MWE:最小工作示例),我得到了:
\documentclass{article}
\usepackage{amsmath, amssymb}
\begin{document}
Let $f : \mathbb{C} \setminus \{0\} \rightarrow \mathbb{C}$, $f(z) = z + \frac{1}{z}$. Given that
$
f(z) = \begin{cases}
\sqrt{2 + \sqrt{n}} & \text{if } z \in \mathbb{R} \setminus \lbrace 0 \rbrace \\
\sqrt{1 + \frac{\sqrt{n}}{2}} + i \sqrt{-1 + \frac{\sqrt{n}}{2}}
& \text{if } z \in \mathbb{C} \setminus \mathbb{R}
\end{cases}
$
for some positive integer $n$ and that $f(z^8) = 2023$ for all $z \in \mathbb{C} \setminus \lbrace 0\rbrace$, find $n$.
\end{document}
不过,我会把你的条件方程写成
\documentclass{article}
\usepackage{mathtools, amssymb}
\begin{document}
Let $f : \mathbb{C} \setminus \{0\} \rightarrow \mathbb{C}$, $f(z) = z + \frac{1}{z}$. Given that
\[
f(z) = \begin{dcases}
\sqrt{2 + \sqrt{n}} & \text{if } z \in \mathbb{R} \setminus \lbrace 0 \rbrace \\
\sqrt{1 + \frac{\sqrt{n}}{2}} + i \sqrt{-1 + \frac{\sqrt{n}}{2}}
& \text{if } z \in \mathbb{C} \setminus \mathbb{R}
\end{dcases}
\]
for some positive integer $n$ and that $f(z^8) = 2023$ for all $z \in \mathbb{C} \setminus \lbrace 0\rbrace$, find $n$.
\end{document}