2
$$\frac{S \epsilon  \text{Cos}[\tau ]}{\sqrt{\lambda }}+\frac{\text{g2} S^2 \epsilon ^2 (-3+\text{Cos}[2 \tau ])}{6 \lambda }+\epsilon ^3 \left(\frac{\left(-\frac{1}{54} \text{g2}^2 S \left(32+19 S^2\right) \lambda +Z \left(\frac{35 \text{g2}^4}{27}-\frac{7 \text{g2} \text{g4}}{4}+\frac{5 \text{g5}}{8}-\frac{\text{g2}^2 \lambda }{6}+\frac{\lambda ^2}{24}\right)\right) \text{Cos}[\tau ]}{\lambda ^{5/2}}+\frac{S^3 \left(4 \text{g2}^2-3 \lambda \right) \text{Cos}[3 \tau ]}{72 \lambda ^{3/2}}\right)$$

I have copied this from Mathematica as tex file. But the problem is I need to write the $\cos[x]$ as $\cos x$. How can I do it?enter image description here

Complex Guy
  • 1,711

1 Answers1

4

How about the following?

I've replaced the \text{Cos} (my eyes!) by \cos.

You can use a gathered environment to break the equation in multiple, centered lines.

Make sure that each line containing an opening \left... also contains a closing \right....

Also, use \[ and \] to open and close an unnumbered displayed equation, not $$; see Why is \[ ... \] preferable to $$ ... $$?.

enter image description here

\documentclass{article}

\usepackage{amsmath}

\begin{document}
\[
\begin{gathered}
  \frac{S \epsilon  \cos \tau}{\sqrt{\lambda }}
+ \frac{\text{g2} S^2 \epsilon ^2 (-3+\cos 2 \tau)}{6 \lambda }\\
+ \epsilon ^3 \left(\frac{\left(-\frac{1}{54} \text{g2}^2 S \left(32+19 S^2\right) \lambda
+ Z \left(\frac{35 \text{g2}^4}{27}-\frac{7 \text{g2} \text{g4}}{4}
+ \frac{5 \text{g5}}{8}-\frac{\text{g2}^2 \lambda }{6}
+ \frac{\lambda ^2}{24}\right)\right) \cos \tau}{\lambda ^{5/2}}\right.\\
\left.+\frac{S^3 \left(4 \text{g2}^2-3 \lambda \right) \cos 3 \tau}{72 \lambda ^{3/2}}\right)
\end{gathered}
\]
\end{document}
David Carlisle
  • 757,742
jub0bs
  • 58,916