TeX - LaTeX Asked by J.Rodriguez on December 16, 2020
I have the following code:
documentclass[12pt]{article}
usepackage{mathtools}
begin{document}
$$ begin{array}{cl}
f(hat{x}_n) & =displaystyle int_{-1}^{0} hat{x}_n d t - int_{0}^{1} hat{x}_n d t
& = displaystyle int_{-1}^{-frac{1}{n+1}} d t +int_{-frac{1}{n+1}}^{0} -(n+1)t d t +int_{0}^{frac{1}{n+1}} (n+1)t d t +int_{frac{1}{n+1}}^{1} d t
& =frac{n}{n+1} +frac{n}{2n+21} +frac{n}{2n+2} +frac{n}{n+1}
& = frac{2n+1}{n+1}
end{array}
$$
end{document}
And this very ugly, the size of the fractions is too small, if I change it they overlapse, the same space of the lines is very small for the integrals to look good. How can I improve this?
With align
for numbered lines and align*
for unnumbered lines:
documentclass[12pt]{article}
usepackage{mathtools}
begin{document}
begin{align}
f(hat{x}_n) & = int_{-1}^{0} hat{x}_n d t - int_{0}^{1} hat{x}_n d t
& = int_{-1}^{-frac{1}{n+1}} d t +int_{-frac{1}{n+1}}^{0} -(n+1)t d t
+int_{0}^{frac{1}{n+1}} (n+1)t d t +int_{frac{1}{n+1}}^{1} d t
& =frac{n}{n+1} +frac{n}{2n+21} +frac{n}{2n+2} +frac{n}{n+1}
& = frac{2n+1}{n+1}
end{align}
begin{align*}
f(hat{x}_n) & = int_{-1}^{0} hat{x}_n d t - int_{0}^{1} hat{x}_n d t
& = int_{-1}^{-frac{1}{n+1}} d t +int_{-frac{1}{n+1}}^{0} -(n+1)t d t
+int_{0}^{frac{1}{n+1}} (n+1)t d t +int_{frac{1}{n+1}}^{1} d t
& =frac{n}{n+1} +frac{n}{2n+21} +frac{n}{2n+2} +frac{n}{n+1}
& = frac{2n+1}{n+1}
end{align*}
end{document}
Answered by leandriis on December 16, 2020
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP