I was trying to achieve an alignment inside a cases environment. Here is what I was trying to achieve:
I actually was able to achieve the above using the following MathJax code:
$$
f(x,y) =
\begin{cases}
\begin{align*}
x&=1, & y&=1 \\
x&=10, & y&=20
\end{align*}
\end{cases}
$$
I realize that $$ is not proper LaTeX syntax, but I'm not sure what to substitute it with.
Now, when I try to put this inside a LaTeX document, it gives me a few errors and doesn't line everything up properly into two columns (there is only one column).
\documentclass{article}
\usepackage{amsmath}
\begin{document}
$$
f(x,y) =
\begin{cases}
\begin{align*}
x&=1, & y&=1 \\
x&=10, & y&=20
\end{align*}
\end{cases}
$$
\end{document}
Here is something else I tried, which reduced the graphical errors, but still puts it inside only one column:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
f(x,y) =
\begin{cases}
u &= \ln x & v' &= 1 \\
u' &= \frac{1}{x} & v &= x \\
\end{cases}
\end{align*}
\end{document}
I would also like to control the spacing with the alignat environment, but I need to find out how to do this first before I can start thinking about that :)



texdoc amsmath?alignis a display environment (you can usealignedfor subterms. – David Carlisle Sep 24 '17 at 16:10$$..$$(which is also the mathjax default) is\[..\]– David Carlisle Sep 24 '17 at 16:12$$ ... $$. See the answer to this question. – Bernard Sep 24 '17 at 16:15