2

For some reason there's this ugly blank line in the left column that I just can;t get rid of. Here's what Ive got typed out:

\begin{multicols}{2}
\(y_{1}(t)\):
\noindent
\begin{align*}
    t^2 y''-2y&=t^2 y_{1}''-2y_{1}\\
    &=t^2(2)-2t^{2}\\
    &=2t^{2}-2t^{2}\\
    &=0
\end{align*}

\columnbreak

\(y_{2}(t)\):
\begin{align*}
    t^2 y''-2y&=t^2 y_{2}''-2y_{2}\\
    &=t^{2}\left(\frac{2}{t^3}\right)-\frac{2}{t}\\
    &=\frac{2}{t}-\frac{2}{t}\\
    &=0
\end{align*}
\end{multicols}

What could I do to fix it? I've never really run into this issue before

1
  • You have placed \noindent just before a math display environment. That has the effect of starting a new paragraph, but the display math then starts a new "block", leaving a blank line. If you want the display block flush left, use flalign as the environment. Sep 23 at 3:25

4 Answers 4

2

If you want to use an approach similar to the one you're using now, I would use \raggedcolumns so that the multicols environment doesn't try to vertically balance the shorter material in the left column.

\documentclass{article}
\usepackage{amsmath,mathtools}
\usepackage{multicol}
\begin{document}

\begin{multicols}{2}
\raggedcolumns
\noindent\(y_{1}(t)\):
\begin{align*}
    t^2 y''-2y&=t^2 y_{1}''-2y_{1}\\
    &=t^2(2)-2t^{2}\\
    &=2t^{2}-2t^{2}\\
    &=0
\end{align*}

\columnbreak

\noindent\(y_{2}(t)\):
\begin{align*}
    t^2 y''-2y&=t^2 y_{2}''-2y_{2}\\
    &=t^{2}\left(\frac{2}{t^3}\right)-\frac{2}{t}\\
    &=\frac{2}{t}-\frac{2}{t}\\
    &=0
\end{align*}
\end{multicols}

\end{document}

multicol with raggedcolumns

However, in this case, I'm not sure why you need columns for this at all. If your equations don't need to be separately numbered, you can use a single align* environment, as this environment supports multiple sets of aligned formulas next to each other.

Alternatively, you could put each group inside an aligned environment; then the larger spacing (because of the fractions) in the right group won't be applied to the left group as well.

Here's code for both approaches:

\documentclass{article}
\usepackage{amsmath,mathtools}
\begin{document}

With one big align environment:

\begin{align*}
& \mathrlap{y_{1}(t):} & & & & \mathrlap{y_{2}(t):} & & & \\
& &    t^2 y''-2y &=t^2 y_{1}''-2y_{1} &&& t^2 y''-2y&=t^2 y_{2}''-2y_{2}             \\
& &               &=t^2(2)-2t^{2}      &&&           &=t^{2}\left(\frac{2}{t^3}\right)-\frac{2}{t} \\
& &               &=2t^{2}-2t^{2}      &&&           &=\frac{2}{t}-\frac{2}{t} \\
& &               &=0                  &&&           &=0
\end{align*}

With two aligned environments inside an align* environment:

\begin{align*}
y_{1}(t): & & y_{2}(t): \\
%
& \begin{aligned}[t]
    t^2 y''-2y&=t^2 y_{1}''-2y_{1}\\
    &=t^2(2)-2t^{2}\\
    &=2t^{2}-2t^{2}\\
    &=0
\end{aligned}
&
&
\begin{aligned}[t]
    t^2 y''-2y&=t^2 y_{2}''-2y_{2}\\
    &=t^{2}\left(\frac{2}{t^3}\right)-\frac{2}{t}\\
    &=\frac{2}{t}-\frac{2}{t}\\
    &=0
\end{aligned}
\end{align*}

\end{document}

align* environments

1

You needn't multicol package. You can construct the same by TeX primitive \hbox and two \vtops inside it:

\hbox to\hsize{%
   \vtop{smaller \hsize, left material}\hss
   \vtop{smaller \hsize, right material}}

Your example looks like this:

\hbox to\hsize{%
\vtop{\hsize=.45\hsize
\(y_{1}(t)\):
\begin{align*}
    t^2 y''-2y&=t^2 y_{1}''-2y_{1}\\
    &=t^2(2)-2t^{2}\\
    &=2t^{2}-2t^{2}\\
    &=0
\end{align*}
}\hss
\vtop{\hsize=.45\hsize
\(y_{2}(t)\):
\begin{align*}
    t^2 y''-2y&=t^2 y_{2}''-2y_{2}\\
    &=t^{2}\left(\frac{2}{t^3}\right)-\frac{2}{t}\\
    &=\frac{2}{t}-\frac{2}{t}\\
    &=0
\end{align*}
}}
0

I'd use two minipages, so you can better control the horizontal and vertical alignment.

\documentclass{article}
\usepackage{amsmath}

\begin{document}

Some text before the display, long enough to wrap across lines.
Perhaps this is enough.
\[
\begin{minipage}[t]{0.45\displaywidth}
\(\begin{aligned}[t]
&y_{1}(t)\,{:}\\
&\quad
  \begin{aligned}
    t^2 y''-2y&=t^2 y_{1}''-2y_{1}\\
    &=t^2(2)-2t^{2}\\
    &=2t^{2}-2t^{2}\\
    &=0
  \end{aligned}
\end{aligned}\)
\end{minipage}
\begin{minipage}[t]{0.45\displaywidth}
\(\begin{aligned}[t]
&y_{2}(t)\,{:} \\
&\quad
  \begin{aligned}
    t^2 y''-2y&=t^2 y_{2}''-2y_{2}\\
    &=t^{2}\left(\frac{2}{t^3}\right)-\frac{2}{t}\\
    &=\frac{2}{t}-\frac{2}{t}\\
    &=0
  \end{aligned}
\end{aligned}\)
\end{minipage}
\]
Some text below the display, long enough to wrap across lines.
Perhaps this is enough.

\end{document}

enter image description here

0

You may insert your equation systems in table, for example tblr defined in the tabularray package:

\documentclass[11pt]{book}
\usepackage{tabularray}
\UseTblrLibrary{amsmath, varwidth}

\begin{document}
    \begin{table}[htb]
\begin{tblr}{colsep =0pt, 
             colspec={X[c, mode=math] c  X[c, mode=math]}, 
             row{1} ={l}
             }
y_{1}(t):       &\qquad &   y_{2}(t):           \\
%
\begin{aligned}[t]  % <---
    t^2 y''-2y&=t^2 y_{1}''-2y_{1}\\
    &=t^2(2)-2t^{2}\\
    &=2t^{2}-2t^{2}\\
    &=0
\end{aligned}   &       &  \begin{aligned}[t]˛ % <---
    t^2 y''-2y&=t^2 y_{2}''-2y_{2}\\
    &=t^{2}\left(\frac{2}{t^3}\right)-\frac{2}{t}\\
    &=\frac{2}{t}-\frac{2}{t}\\
    &=0
\end{aligned}
\end{tblr}
    \end{table}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.