# (Possibly) Tricky Alignment Problem

#### Ackbach

##### Indicium Physicus
Staff member
So, I'm typing away as follows:

Code:
\begin{align*}
&0\le y\le 1 & &\\
\intertext{Determine the natural domain of the following functions.}
\intertext{Determine the range of the following functions.}
\intertext{Determine which of the following sets of functions are equal. If the functions
are not equal, state why.}
\phantom{31.} &y_{2}=x+3 & &y_{2}=x+1\\
&y_{2}=\frac{(x^{2}+x)(x+2)}{x+2} & &y_{2}=x\\
\intertext{Solve the following problems:}
&y_{2}=\frac{x(x+3)}{x+3}\\
\intertext{Determine how $y_{1}$ and $y_{2}$ can be changed to be equal in a manner that
will allow their respective domains to include all real numbers. Be sure not to
change the rules of association over the {\it natural} domains.}
\intertext{Determine how to make the following functions equal by restricting the
domains. Be sure not to restrict the domains any more than absolutely
necessary.}
&y_{1}=\sqrt{\frac{x+1}{x-3}}\\
&y_{2}=\sqrt{\frac{x^{2}+2x+1}{x^{2}-2x-3}}.
\end{align*}
This does not seem to compile correctly on Mathjax, but it compiles in my $\LaTeX$ environment. My problem is this: I want Problem 38's text to begin aligned with the y_{1} of the previous line and on the same line as the number 38, but I don't want the preceding align environment to push everything over to the right, just because I now have a huge amount of text to format. I like the intertext command for inserting text into an align environment. What I essentially need now is a way to "ignore" alignment for the rest of one line, after I've done one or two ampersands for the first alignments. Is there a way to do that?

#### Sudharaka

##### Well-known member
MHB Math Helper
So, I'm typing away as follows:

Code:
\begin{align*}
&0\le y\le 1 & &\\
\intertext{Determine the natural domain of the following functions.}
\intertext{Determine the range of the following functions.}
\intertext{Determine which of the following sets of functions are equal. If the functions
are not equal, state why.}
\phantom{31.} &y_{2}=x+3 & &y_{2}=x+1\\
&y_{2}=\frac{(x^{2}+x)(x+2)}{x+2} & &y_{2}=x\\
\intertext{Solve the following problems:}
&y_{2}=\frac{x(x+3)}{x+3}\\
\intertext{Determine how $y_{1}$ and $y_{2}$ can be changed to be equal in a manner that
will allow their respective domains to include all real numbers. Be sure not to
change the rules of association over the {\it natural} domains.}
\intertext{Determine how to make the following functions equal by restricting the
domains. Be sure not to restrict the domains any more than absolutely
necessary.}
&y_{1}=\sqrt{\frac{x+1}{x-3}}\\
&y_{2}=\sqrt{\frac{x^{2}+2x+1}{x^{2}-2x-3}}.
\end{align*}
This does not seem to compile correctly on Mathjax, but it compiles in my $\LaTeX$ environment. My problem is this: I want Problem 38's text to begin aligned with the y_{1} of the previous line and on the same line as the number 38, but I don't want the preceding align environment to push everything over to the right, just because I now have a huge amount of text to format. I like the intertext command for inserting text into an align environment. What I essentially need now is a way to "ignore" alignment for the rest of one line, after I've done one or two ampersands for the first alignments. Is there a way to do that?
Hi Ackbach,

I don't know if this will answer all your questions yet your code seem not to compile correctly in Mathjax so I thought of the possible changes that could be done to it.

The "\intertext" command is not supported by Mathjax. (See here.) It seems that if we want to produce text inside a LaTeX environment the only option that MathJax gives is the "\mbox" command. But then the line breaks wouldn't be there so the sentences will run out of the page. I have encountered this problem before, so I only write the equations using Mathjax, not paragraphs and sentences. Of course I prefer the fonts produced by LaTeX and if there is a way to write everything including the paragraphs in LaTeX it would be great.

So if you break up your align environment into pieces, keeping the sentences independent of LaTeX environments you will have the following output.

Kind Regards,
Sudharaka

Code:
\begin{align*} 1.\quad &y=\sqrt{x+2}\qquad\qquad\qquad &6.\quad &x=3\\
&0\le y\le 1 & &\\
\end{align*}

Determine the natural domain of the following functions.

\begin{align*}
\end{align*}

Determine the range of the following functions.

\begin{align*}
\end{align*}

Determine which of the following sets of functions are equal. If the functions are not equal, state why.

\begin{align*}
\phantom{31.} &y_{2}=x+3 & &y_{2}=x+1\\
&y_{2}=\frac{(x^{2}+x)(x+2)}{x+2} & &y_{2}=x\\
\end{align*}

Solve the following problems:

\begin{align*}
&y_{2}=\frac{x(x+3)}{x+3}\\
\end{align*}

Determine how $y_{1}$ and $y_{2}$ can be changed to be equal in a  manner that will allow their respective domains to include all real  numbers. Be sure not to change the rules of association over the [I]natural[/I] domains.

$$38.$$ Determine how to make the following functions equal by  restricting the domains. Be sure not to restrict the domains any more  than absolutely necessary.

\begin{align*}
&y_{1}=\sqrt{\frac{x+1}{x-3}}\\
&y_{2}=\sqrt{\frac{x^{2}+2x+1}{x^{2}-2x-3}}.
\end{align*}
&0\le y\le 1 & &\\
\end{align*}

Determine the natural domain of the following functions.

\begin{align*}
\end{align*}

Determine the range of the following functions.

\begin{align*}
\end{align*}

Determine which of the following sets of functions are equal. If the functions are not equal, state why.

\begin{align*}
\phantom{31.} &y_{2}=x+3 & &y_{2}=x+1\\
&y_{2}=\frac{(x^{2}+x)(x+2)}{x+2} & &y_{2}=x\\
\end{align*}

Solve the following problems:

\begin{align*}
&y_{2}=\frac{x(x+3)}{x+3}\\
\end{align*}

Determine how $y_{1}$ and $y_{2}$ can be changed to be equal in a manner that will allow their respective domains to include all real numbers. Be sure not to change the rules of association over the natural domains.

$$38.$$ Determine how to make the following functions equal by restricting the domains. Be sure not to restrict the domains any more than absolutely necessary.

\begin{align*}
&y_{1}=\sqrt{\frac{x+1}{x-3}}\\
&y_{2}=\sqrt{\frac{x^{2}+2x+1}{x^{2}-2x-3}}.
\end{align*}

#### Ackbach

##### Indicium Physicus
Staff member
Thank you for your thoughts, but unfortunately, I need the problem numbers aligned all down the page, for both columns. Any other solutions?

I should mention that these problems are not for MHB, they are for a book I'm typing up. So while I'm limited by Mathjax a little on MHB in writing up the problem, I have no such limitations in the actual document.

Last edited:

#### Sudharaka

##### Well-known member
MHB Math Helper
Thank you for your thoughts, but unfortunately, I need the problem numbers aligned all down the page, for both columns. Any other solutions?

I should mention that these problems are not for MHB, they are for a book I'm typing up. So while I'm limited by Mathjax a little on MHB in writing up the problem, I have no such limitations in the actual document.
You are welcome. I think I misunderstood your problem by thinking you are trying to compile this using Mathjax. Now your question seem a little bit clear to me. You want the number 38 aligned with the rest of the numbers and also the text that succeed should begin just after the number 38. Here is the code, if this is not what you expect please don't hesitate to elaborate more.

Kind Regards,
Sudharaka.

Code:
\begin{align*} 1.\quad &y=\sqrt{x+2}\qquad\qquad\qquad &6.\quad &x=3\\
&0\le y\le 1 & &\\
\intertext{Determine the natural domain of the following functions.}
\intertext{Determine the range of the following functions.}
\intertext{Determine which of the following sets of functions are equal. If the functions
are not equal, state why.}
\phantom{31.} &y_{2}=x+3 & &y_{2}=x+1\\
&y_{2}=\frac{(x^{2}+x)(x+2)}{x+2} & &y_{2}=x\\
\intertext{Solve the following problems:}
&y_{2}=\frac{x(x+3)}{x+3}\\
\intertext{Determine how $y_{1}$ and $y_{2}$ can be changed to be equal in a manner that
will allow their respective domains to include all real numbers. Be sure not to
change the rules of association over the {\it natural} domains.}
%
\intertext{\quad 38. Determine how to make the following functions equal by restricting the
domains. Be sure not to restrict the domains any more than absolutely
necessary.}
&y_{1}=\sqrt{\frac{x+1}{x-3}}\\
&y_{2}=\sqrt{\frac{x^{2}+2x+1}{x^{2}-2x-3}}.
\end{align*}

#### Opalg

##### MHB Oldtimer
Staff member
Another solution would be to replace the align* environment by the tabbing environment. This has more flexibility, because it allows you to set the tab positions absolutely, and material from one column can spill over into the next column if you want it to. Also, the two columns of question numbers are aligned all the way down the page.

Code:
\begin{tabbing}\qquad \= 11.\quad \= \hspace{.4\linewidth} \= 11.\quad \= \kill

\>1.\> $y=\sqrt{x+2}$ \> $\phantom{1}$6.\> $x=3$ \\
\>2.\> $x^{2}+y^{2}=16$ \> $\phantom{1}$7.\> $(1,2);\;(1,4);\;(2,7)$ \\
\>3.\> $y=x^{2}+3x+4$ \> $\phantom{1}$8.\> $(1,2);\;(2,4);\;(3,6)$ \\
\>4.\> $y^{2}=x-3$ \> $\phantom{1}$9.\> $y=4$ \\
\>5.\> $0\le x\le 1$ \> 10.\> $y=\frac{1}{x}$ \\
\> \> $0\le y\le 1$ \\
\\
Determine the natural domain of the following functions. \\
\\
\>11.\> $y=x^{2}+3x-2$ \> 16.\> $y=\frac{1}{x+4}$ \\
\>12.\> $y=\sqrt[3]{x+4}$ \> 17.\> $y=\sqrt{\frac{1}{x-6}}$ \\
\>13.\> $y=\sqrt{x+2}$ \> 18.\> $y=\sqrt[3]{\frac{5}{x-3}}$ \\
\>14.\> $y=\sqrt{x^{2}-4}$ \> 19.\> $y=\frac{x(x-1)}{x^{2}-3x+2}$ \\
\>15.\> $y=\sqrt{x^{2}-3x+2}$ \> 20.\> $y=\sqrt{\frac{x}{x^{2}-6x+5}}$ \\
\\
Determine the range of the following functions. \\
\\
\>21.\> $y=x+6$ \> 26.\> $y=x^{2}-13x+12$ \\
\>22.\> $y=\sqrt{x+4}$ \> 27.\> $y=\frac{x(x-1)}{x-1}$ \\
\>23.\> $y=x^{2}+6$ \> 28.\> $y=x^{3}$ \\
\>24.\> $y=x^{3}-7$ \> 29.\> $y=-x^{2}+4x-3$ \\
\>25.\> $y=\frac{1}{x-2}$ \> 30.\> $y=\frac{x-2}{x^{2}-3x+2}$ \\
\\
\begin{minipage}[t]{\linewidth}Determine which of the following sets of functions are equal. If the functions are not equal, state why. \end{minipage} \\
\\
\>31.\> $y_{1}=x+1$ \>34.\>$y_{1}=x+1$ \\
\>\>$y_{2}=x+3$ \> \> $y_{2}=x+1$ \\
\>32.\> $y_{1}=x(x+1)$ \> 35.\> $y_{1}= y_{1}=\begin{cases}\frac{x^{2}+3x}{x+3} \ &\text{for }x\not=-3\\ -3 &\text{for }x=-3\end{cases}$ \\
\>\>$y_{2}=\frac{(x^{2}+x)(x+2)}{x+2}$ \>\> $y_{2}=x$ \\
\>33.\>$y_{1}=x+1$ \>36.\> $y_{1}=\frac{x^{3}(x+1)}{x^{2}+3x+2}$ \\
\>\>$y_{2}=\begin{cases}\frac{x(x+1)}{x+1}\ &\text{for }x\not=-1\\ 0 &\text{for }x=-1\end{cases}$ \>\> $y_{2}=\frac{x^{3}+x^{2}}{x^{3}+3x^{2}+2x}$ \\
\\ \\
\>37.\> \begin{minipage}[t]{.9\linewidth}For the following functions, determine how $y_{1}$ and $y_{2}$ can be changed to be equal in a manner that will allow their respective domains to include all real numbers. Be sure not to change the rules of association over the {\it natural} domains. \end{minipage} \\
\\
\>\> $y_{1}=\frac{x^{2}(x-1)(x+2)}{x^{3}+x^{2}-2x}$ \\
\>\> $y_{2}=\frac{x(x+3)}{x+3}$ \\
\\
\>38.\> \begin{minipage}[t]{.9\linewidth}Determine how to make the following functions equal by restricting the domains. Be sure not to restrict the domains any more than absolutely necessary.  \end{minipage} \\
\\
\>\>$y_{1}=\sqrt{\frac{x+1}{x-3}}$ \\
\>\>$y_{2}=\sqrt{\frac{x^{2}+2x+1}{x^{2}-2x-3}}$
\end{tabbing}

#### Ackbach

##### Indicium Physicus
Staff member
Thank you both very much for your time and effort in helping me out. I think Opalg's solution is a little better, because the "38" is in line with all the other problem numbers in the left-hand column. So now I will attempt to learn the "tabbing" environment.

Cheers!

#### Evgeny.Makarov

##### Well-known member
MHB Math Scholar
What I essentially need now is a way to "ignore" alignment for the rest of one line, after I've done one or two ampersands for the first alignments.
You could also use the \rlap command around the \minipage from Opalg's post. It makes the width of its argument zero and allows it to stick out to the right. The drawback is that the width of the minipage, which is 0.9 times the width of the line, is ad-hoc and the right edge of the minipage does not really align with the rest of the page.