1
\documentclass{article}

\usepackage{amsfonts,amsmath,amssymb,graphicx,amsthm,mathtools,systeme}

\begin{document}
\noindent Answer using ``T'' for True or ``F'' for False for the given statements:
\begin{enumerate}
\item The differential equation $(x^2+y^2)dx+8xydy=0$ is homogeneous.\hfill (....)
\item  $(D+2)\left[\sin(2x)\right]=2\cos(2x)+2\sin(2x)$.\hfill (....)
\item $\frac{1}{D^2+2D-8}\left[e^{3x}\right]=\frac{1}{7}e^{3x}$.
\item To solve the homogeneous differential equation $(2x-3y)dx+(2y+3x)dy=0$, we take the substitution $y=ux$.
\item The integrating factor $\mu(x)$ of the differential equation $-ydx+xdy=0$, which convert it to an exact differential equation is 
\begin{equation*}
\mu(x)=e^{-2\displaystyle\int\frac{1}{x}dx}.
\end{equation*}
\hfill (....)
 \end{enumerate} 
\end{document} 

I like to obtain as shown in this pic

enter image description here

Student
  • 1,134
  • 2
  • 9
  • 27
  • Assuming that I understand what you are after from the picture (moving the dots in brackets up to the text, rather than in line with the equation), moving the \hfill (....) to before the first $$ would do it. Other people may have other suggestions about what you are wanting to do, though. Incidentally, using $$ is discouraged: https://tex.stackexchange.com/a/69854 – enkorvaks Nov 29 '23 at 06:38
  • 1
    If you want to have (....) at the same baseline as the display formula then you can write $$ formula \eqno (....)$$ – wipet Nov 29 '23 at 07:22
  • Ok I fiexed my question. Thanks – Student Nov 29 '23 at 07:51
  • 1
    (1) use \exp(...) here not e^{...} the latter is horrible to read. (2) use equation and overwrute the eq number via \tag{...}. – daleif Nov 29 '23 at 08:52
  • Is the intent for (....) to be where the students write in T or F? Would you be open to solutions that move where that spot is? (Perhaps immediately before or immediately after the statement number?) – Willie Wong Nov 29 '23 at 15:31

2 Answers2

2

Your code looks like this:

some text \begin(equation*) x*y \end(equation*) \hfill (...)

but it should be like this:

some text \hfill (...)
\vskip 0pt plus 2pt minus 0pt \relax
\begin(equation*) x*y \end(equation*)

You can omit the plus n minus m part and finish directly with the \relax. It's just, that you have seen it, if you ever encounter it. I just like to put vskips at such places.

If you use LaTeX, you have to think in boxes. Your text before the equation is a box, the whole line. Then, after that, your formula is in a box, that takes the full line width. After that, you have a new line that is filled with white space until the brackets with the three dots. That's, why your example gives you that output. My explanation might not be 100% technically correct, but helps you understanding the concepts of LaTeX.

MaestroGlanz
  • 2,348
2

For item 5 I'd just use

\begin{equation*}
\mu(x)=\exp\biggl(-2\int\frac{1}{x}\,dx\biggr). \tag{...}
\end{equation*}
  • uses \exp(...) instead of the (in this case) unreadable e^{...}
  • uses \tag{...} to give and overwrite the equation number
daleif
  • 54,450