3

I have

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\begin{document}

1st period. Year 2011

Time: 3 hours
\newline

\textbf{Question 1.} 

\textbf{a)} Give $z = ln(1-x^2y^2)$ . Calculate $A = x\frac{\partial z}{\partial x} - y\frac{\partial z}{\partial y}$ .

\textbf{b} Find extreme values of function $A = e^y(y + x^3 - 3x^2)$

\textbf{Question 2.} 

\textbf{a)}  Change order of integral $\int_{0}^{2} dx \int_{-x}^{\sqrt{2x - x^2}} f(x,y) dy$

\end{document}

enter image description here

I want like this

enter image description here

(and the same with other formula). How to do this?

  • 3
    Well \int\limits but you probably also want a displaystyle integral, but then you won't want to have that inline with the text – Au101 Jul 15 '18 at 15:33
  • I am new, therefore I don't know so much. Keep everything simple. – Do Nhu Vy Jul 15 '18 at 15:34
  • I try to change \[\int_{0}^{2} dx \int_{-x}^{\sqrt{2x - x^2}} f(x,y) dy\] , It looks better, but still does not like the sample. – Do Nhu Vy Jul 15 '18 at 15:37
  • 3
    \[\int\limits_{0}^{2} dx \int\limits_{-x}^{\sqrt{2x - x^2}} f(x,y) dy\] will look like the sample, but in that case notice how the maths is not on the same line as the words, do you see? It gets put on a new line and it gets centred. Now, you could have $\displaystyle\int\limits_{0}^{2} dx \int\limits_{-x}^{\sqrt{2x - x^2}} f(x,y) dy$ which would give you integrals that look like the sample that are also on the same line as the words. But this is really quite bad because the height of the lines will be all messed up – Au101 Jul 15 '18 at 15:43
  • 1
    This is a long way of saying, if you want your maths in line with your text, then you actually should use the smaller integral signs and you shouldn't really have the limits above and below the signs, it will look bad because you will have to have a huuuuuuuuuuuuuge gap between one line and the next in order to fit it all in – Au101 Jul 15 '18 at 15:44
5

I would not use displaystyle math mode, and I certainly wouldn't place the limits of integration below/above the integral symbol. The integrals and fraction expressions are perfectly legible even in inline math mode. I would, however, fine-tune the spacing inside the integral expressions, and I would especially take care to perform less visual formatting; instead, use the LaTeX machinery to generate a consistent page layout. Oh, and do write \ln, not just ln, to denote the natural logarithm operator, and don't leave space between the $ symbol that terminates inline math mode and a trailing punctuation mark (such as . or ,).

enter image description here

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
%%\usepackage{amsfonts} % is loaded automatically by 'amsymb' package
\usepackage{amssymb}

\usepackage{enumitem}
% create a custom-style enumerated list
\newlist{myenum}{enumerate}{1}
\setlist[myenum]{label=\bfseries\alph*), ref=\alph*),
                 wide=0pt, leftmargin=*}

\begin{document}
\noindent
1st period. Year 2011\\
Time: 3 hours


\subsubsection*{Question 1.} 

\begin{myenum}

\item  Give $z = \ln(1-x^2y^2)$. Calculate 
$A = x\frac{\partial z}{\partial x} - y\frac{\partial z}{\partial y}$.

\item Find extreme values of function $A = e^y(y + x^3 - 3x^2)$. 

\end{myenum}

\subsubsection*{Question 2.} 

\begin{myenum}

\item Change order of integral 
$\int_{0}^{2}\! dx \int_{-x}^{\sqrt{2x - x^2}} \!\! f(x,y)\, dy$.

\end{myenum}

\end{document}
3

Do not forget that the amsmath package offers the intlimits option for those people who want “Russian-style” positioning of the limits of integration:

% My standard header for TeX.SX answers:
\documentclass[a4paper]{article} % To avoid confusion, let us explicitly 
                                 % declare the paper format.

\usepackage[T1]{fontenc}         % Not always necessary, but recommended.
% End of standard header.  What follows pertains to the problem at hand.

\usepackage[intlimits]{amsmath}



\begin{document}

In-line: \( \int_{-\infty}^{+\infty} e^{-t^{2}} dt = \sqrt{\pi} \).
In display:\[ \int_{-\infty}^{+\infty} e^{-t^{2}} dt = \sqrt{\pi} \]

\end{document}

Note that, in this particular situation, it is best to omit the \, before dt.

The result is

Output of the code

2

Thank for comment of @Au101

enter image description here

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\begin{document}

1st period. Year 2011

Time: 3 hours
\newline

\textbf{Question 1.} 

\textbf{a)} Give $\displaystyle z = \ln(1-x^2y^2)$ . Calculate $\displaystyle A = 
\displaystyle x\frac{\partial z}{\partial x} - y\frac{\partial z}{\partial y}$

\textbf{b)} Find extreme values of function 
$\displaystyle A = \displaystyle e^y(y + x^3 - 3x^2)$
\newline

\textbf{Question 2.} 

\textbf{a)}  Change order of integral $\displaystyle\int\limits_{0}^{2} dx 
\int\limits_{-x}^{\sqrt{2x - x^2}} f(x,y) dy$

\end{document}

By using \displaystyle.

  • 2
    if ln is operator (natural algorithm) than you should write it as \ln :-) – Zarko Jul 15 '18 at 15:58

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.