gpt-4o-2024-08-06· OpenAI
WildChat-4.8M (AI2)
in jupyter markdown how to make this another line: $$ T(n) \leq T(\frac{n}{9}) +…
- User
in jupyter markdown how to make this another line:
- Assistant
In Jupyter Markdown, you can create multiline equations by using the
alignenvironment, which is part of LaTeX'samsmathpackage. This allows you to align multiple equations vertically. To use it in Jupyter Markdown, you need to wrap your equations with double dollar signs$$and use thealignenvironment within them.Here’s how you can format your given equations to appear on separate lines:
$$ \begin{align} T(n) & \leq T\left(\frac{n}{9}\right) + T\left(\frac{2n}{3}+12\right) + O(n) \\ & \leq c\frac{n}{9} + c\left(\frac{2n}{3}+12\right) + d \cdot n \end{align} $$In this format:
&is used to align the equations at a specific point, usually before the relation operators like=,\leq, etc.\\is used to indicate the end of a line and to move to the next equation.\left(and\right)are used to ensure that the parentheses scale properly with the contents inside them.
Paste this into a Jupyter Notebook markdown cell to display your equations on separate lines, with alignment.