2
$\begingroup$

In the PSQ Show that $f(x,y) = x \sin \left( \frac{1}{y} \right) + y \sin \left( \frac{1}{x} \right)$ is not differentiable at origin?, the question title contains the MathJax code

(x,y) = x \sin \left( \frac{1}{y} \right) + y \sin \left( \frac{1}{x} \right)

which is rendered as $(x,y) = x \sin \left( \frac{1}{y} \right) + y \sin \left( \frac{1}{x} \right)$.

The first pair of brackets is much bigger than the 2nd pair. Is there a way to make them look even?

$\endgroup$
5
  • 1
    $\begingroup$ Putting the equation on its own line fixes this issue for me. (Alternatively, use \dfrac. Except, don't use \dfrac.) $\endgroup$
    – user1729
    Jan 26 at 15:25
  • $\begingroup$ @user1729 I confirm your observation after testing this equation with displayed style in Firefox 84.0.2 (64-bit) on Ubuntu 20.04 that comes with the OS. Yes for sure. If I see a recent post containing a displayed style math expression, I usually edit them so that it's inline. $\endgroup$ Jan 26 at 15:31
  • $\begingroup$ The word "nonuniform" in the title would give a more conventional appearance. $\endgroup$
    – hardmath
    Jan 28 at 5:38
  • $\begingroup$ I am unable to see the difference on my devices. (I assume you are talking about the brackets on the right of the equals sign, the one to the left is the smallest) $\endgroup$ Jan 29 at 4:50
  • $\begingroup$ May be it is just my taste, but those parens look too large to me. I would prefer simple $$\sin\frac1x+\sin\frac1y$$ or even $$\sin(\frac1x)+\sin(\frac1y),$$ if judged that clarity requires some kind of parens wrapping the fraction. In my opinion \left...\right produces boxes that are too large in comparison to $\sin$. $\endgroup$ Jan 29 at 7:29
3
$\begingroup$

Note that \big does not need to be left/right paired, you can type \big(\frac 1x\big) $\big(\frac 1x\big)$.

I also use the whole hierarchy in place of \left and \right because it gives more consistent results \Bigg(\bigg(\Big(\big(( $\Bigg(\bigg(\Big(\big(($

$\endgroup$
2
  • 1
    $\begingroup$ related TeX.SE answer: tex.stackexchange.com/a/1233/126386 \big without l or r give more spacing, but the other answer suggests that it's a good practice to include that or use \mathopen{}. $\endgroup$ Jan 28 at 7:50
  • $\begingroup$ I started using \big and variants recently after finding some less than ideal behavior from \left/\right regarding whitespace. It's not as fool-proof, but it will create a more uniform look in your formulae. $\endgroup$ Jan 30 at 14:11
6
$\begingroup$

I have tried using \vphantom.

Although I have to admit that:
a) I am not sure whether there are some adverse effects (e.g., for screenreaders).
b) I do not know whether there is a guarantee that it will be displayed the same for everybody.
c) It seems to me that there is difference between displaying math online and, e.g., in textbooks or papers - I would expect looking at various typesetting issues mostly in the latter case.

I tried $(x,y) = x \sin \left( \frac{1}{y}\vphantom{\frac1x} \right) + y \sin \left( \frac{1}{x}\vphantom{\frac1y} \right)$ to get this:
$(x,y) = x \sin \left( \frac{1}{y}\vphantom{\frac1x} \right) + y \sin \left( \frac{1}{x}\vphantom{\frac1y} \right)$.

Or, as Asaf Karagila suggests in the comment, it might be better to put exactly the same thing into vphantom: $(x,y) = x \sin \left( \frac{1}{y}\vphantom{\frac1{xy}} \right) + y \sin \left( \frac{1}{x}\vphantom{\frac1{xy}} \right)$ gives $(x,y) = x \sin \left( \frac{1}{y}\vphantom{\frac1{xy}} \right) + y \sin \left( \frac{1}{x}\vphantom{\frac1{xy}} \right)$.

$\endgroup$
2
  • 1
    $\begingroup$ If you want a truly uniform size, you might as well use \frac1{xy} in your phantom text. $\endgroup$
    – Asaf Karagila Mod
    Jan 26 at 15:31
  • $\begingroup$ This has the advantage over the other methods that no trial-and-error is needed, as the sizing is done automatically. It is more in-keeping with the TeX "ideal". $\endgroup$
    – user1729
    Jan 27 at 21:31
3
$\begingroup$

Just a suggestion:

$(x,y) = x \sin \bigl( \frac{1}{y} \bigr) + y \sin \bigl( \frac{1}{x} \bigr)$

gives $(x,y) = x \sin \bigl( \frac{1}{y} \bigr) + y \sin \bigl( \frac{1}{x} \bigr)$.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .