2

I am having some problem with the following code. It seems that the cube sign on my square root sign is a little out of place, and the first fraction under the square root is a little small. Looking for some help fixing these problems, thanks!

\documentclass{article}
\usepackage{amsmath}
\begin{document}
$$z_{0,1} = \sqrt[\leftroot{-3}\uproot{3}3]{-\tfrac{f}{2}\pm\sqrt{\frac{f^2}{4}+\frac{e^3}{27}}}$$
\end{document}
David Purton
  • 25,884
mt12345
  • 21
  • Welcome to TeX SX! Of course, the first fraction is quite small, since explicitly asked for a text fraction (\tfrac). – Bernard Nov 07 '17 at 01:34

1 Answers1

2

I would use these parameters, and avoid the plain TeX construction with $$ $$:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\[ z_{0,1} = \sqrt[\leftroot{-1}\uproot{2}3]{-\frac{f}{2}\pm\sqrt{\frac{f^2}{4}+\frac{e^3}{27}}} \]

\end{document} 

enter image description here

Bernard
  • 271,350
  • why avoid $$ I have been using them for all mathematical notation? – mt12345 Nov 07 '17 at 01:34
  • It can lead to bad spacing and has some drawbacks. See this question. – Bernard Nov 07 '17 at 01:36
  • You can write a mathematical expresion inline, within the text using a pair of single dollar signs, such as $ y = f(x) $, but when you want to display a mathematical expression outside the text, is very comfortable to use the double pair of dollar signs, but it isn't a good choice in LaTeX because, as Bernard says, it lead a bad spacing. The best in my experience is to use the equation environment or another similar included in the amsmath package. – Aradnix Nov 07 '17 at 01:38