# other terms in equation to the same size as tfrac terms

How do I make other terms in equation to the same size as tfrac terms

$$X=\tfrac{2J^2}{4J^2+U^2/4}\sin^2\big(({\sqrt{4J^2+U^2/4}})t\big)$$


looks like

How do I adjust the size of the term inside sin^2 to match with the tfrac terms ?

Do you mean like this?

\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[ascii]{inputenc}
\usepackage{amsmath}

\begin{document}
$$X=\tfrac{2J^2}{4J^2+U^2/4} \scriptstyle \sin^2\bigl(({\sqrt{4J^2+U^2/4}})t\bigr)$$
\end{document}


Or maybe you prefer this (bigger “sin”, amended spacing, resized parentheses…):

\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[ascii]{inputenc}
\usepackage{amsmath}

\begin{document}
$$X=\tfrac{2J^2}{4J^2+U^2\!/4} \sin^2\Bigl({\scriptstyle \bigl(\sqrt{4J^2+U^2\!/4}\bigr)\,t}\Bigr)$$
\end{document}


Output (of the second code sample):

Addendum: @egreg criticism about the above parentheses being “awful” is too much for me to cope with: I must post some other attempt. Perhaps this one could be regarded as acceptable:

\documentclass[a4paper]{article}
\usepackage{amsmath}

\begin{document}
$$X=\tfrac{2J^2}{4J^2+U^2\!/4} \sin^2({\scriptstyle \sqrt{4J^2+U^2\!/4}\:\cdot\:t})$$
\end{document}


This is the corresponding output:

• I can understand keeping the t at the end; but the size of the parentheses is awful. – egreg Apr 18 '16 at 23:07

Why not :

\documentclass[a4paper]{article}
\usepackage{amsmath}

\begin{document}
$$X=\tfrac{2J^2}{4J^2+U^2\!/4} \sin^2\bigl({\scriptstyle t\,\sqrt{4J^2+U^2\!/4}}\bigr)$$
\end{document}

• Welcome to TeX.SE! A quick hint: If you highlight the lines of code and click on the {} "button" in the row above the editing window, the lines will be indented by four spaces and, importantly, will be pretty-printed by the site software. – Mico Apr 18 '16 at 3:46
• I find this the best answer in the lot: moving the t avoids the need for additional parentheses and \, commands are tastefully applied. I'd suggest a \, more, just before the closing parenthesis, though. I also removed two lines: they're not needed for the example and might be confusing readers. – egreg Apr 18 '16 at 8:28
• I like this, but I think you dropped a factor of 2? – wchargin Apr 18 '16 at 12:11
• @egreg: I too was tempted to move the “t” before the square root, but I decided to respect the OP’s preference for the ordering of the factors: I think (s)he deliberately put what is presumably the variable for t ime at the end, to keep the pattern of \sin^2(\omega t). Also, the two line you removed are mine! ;-) – GuM Apr 18 '16 at 23:01
• @GustavoMezzetti An inexperienced reader might think that the solution depends on this package option. – egreg Apr 18 '16 at 23:21

I think maybe you'll have too great a contrast betwwen different parts of your formula. I suggest using the\medmath command, from nccmath, which reduces displaymath by about 80 %. Compare:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{mathtools, nccmath}

\begin{document}

\begin{align*}
X & =\medmath{\frac{2J²}{4J²+U²/4}\sin²\Bigl(\Bigl({√{4J²+U²/4}}\Bigr)t\Bigr)}
\\
X & =\tfrac{2J²}{4J²+U²/4}\sin²{\scriptstyle\Bigl(\Bigl({√{4J²+U²/4}}\Bigr)t\Bigr)}
\\
X & =\frac{2J²}{4J²+U²/4}\sin²\Bigl(\Bigl({√{4J²+U²/4}}\Bigr)t\Bigr)
\end{align*}

\end{document}


• the inner parentheses for the \sin would look better if they "covered" the radical sign more completely; the relative size of the outer parens looks good, so if the inner parens get larger, the outer ones should also, – barbara beeton Apr 18 '16 at 0:59
• @barbara beeton: You're right. I wasn't in a (sentimental?) mood to tackle this problem, and I left this part of the O.P.'s code as is. I'll change that in a moment – Bernard Apr 18 '16 at 1:04

Actually, I think that the problem is that you are "misusing" \tfrac because it is meant to fractions in in-line text. If instead you use \frac then the latex markup is simpler your problem goes away:

The code:

\documentclass{amsart}
\begin{document}

\textbf{With tfrac}
$$X=\tfrac{2J^2}{4J^2+U^2/4}\sin^2\big(({\sqrt{4J^2+U^2/4}})t\big)$$

\textbf{With frac}
$$X=\frac{2J^2}{4J^2+U^2/4}\sin^2\big(({\sqrt{4J^2+U^2/4}})t\big)$$

\end{document}

• thanx. there are long multiple equations involved and each terms are little lengthy, so if I use \frac it takes whole lot of space and it does not look nice. \scriptstyle with \tfrac solved the problem. – ss1729 Apr 18 '16 at 5:08