# How to write this long square-root equation in LaTeX

√{[√(6x-9)+√(4x-4)+√(2x-1)][√(6x-9)+√(4x-4)-√(2x-1)][√(4x-4)+√(2x-1)-√(6x-9)][√(6x-9)+√(2x-1)-√(4x-4)]}={(x-3)×√(6x-9)}+{(x-2)×√(4x-4)}+{(x-1)×√(2x-1)}


It is something like this. When I use latex this is what I get

$$\small \sqrt{ (\sqrt{6x-9} + \sqrt{4x-4} + \sqrt{2x-1})(\sqrt{6x-9} + \sqrt{4x-4} - \sqrt{2x-1})(\sqrt{4x-4} + \sqrt{2x-1} - \sqrt{6x-9})(\sqrt{6x-9} + \sqrt{2x-1} - \sqrt{4x-4})}=(x-3)\sqrt{6x-9}+(x-2)\sqrt{4x-4}+(x-1)×\sqrt{2x-1}$$


Could someone help me?

• Welcome to TeX.SE.
– Mico
Commented Jun 11, 2020 at 4:36
• Off-topic: \small is text-mode command; hence, it shouldn't be use in math mode. To render the entire equation environment at a smaller fontsize, one would have to write \begingroup\small $$...$$\endgroup.
– Mico
Commented Jun 11, 2020 at 4:43
• @Mico thank you very much Commented Jun 11, 2020 at 5:18
• This is my first time post in here, I dun know that I can't write any equation. Thanks for help editing Commented Jun 11, 2020 at 5:26
• If you want to reproduce the confusing version, use \surd instead of \sqrt. Commented Jun 11, 2020 at 15:11

Here's a solution that splits the full equation across three lines, with the help of a multline environment. The long square-root expression to the left of the = symbol is typeset using (...)^{1/2} notation in order to allow a line break. And, of course, \sqrt{...} constructs replace the √{...} inputs.

\documentclass{article}
\usepackage{amsmath} % for 'multline' environment
\begin{document}
\begin{multline}
\smash[b]{\Bigl\{}
\bigl[\sqrt{6x-9}+\sqrt{4x-4}+\sqrt{2x-1}\,\bigr]
\bigl[\sqrt{6x-9}+\sqrt{4x-4}-\sqrt{2x-1}\,\bigr]\\
\times\bigl[\sqrt{4x-4}+\sqrt{2x-1}-\sqrt{6x-9}\,\bigr]
\bigl[\sqrt{6x-9}+\sqrt{2x-1}-\sqrt{4x-4}\,\bigr]
\smash[t]{\Bigr\}^{1/2}} \\
=(x-3)\sqrt{6x-9}+(x-2)\sqrt{4x-4}+(x-1)\sqrt{2x-1}
\end{multline}
\end{document}


Personally, I would prefer a style which rephrases this expression as follows:

\documentclass{article}
\begin{document}
$$\sqrt{(a+b+c)(a+b-c)(a-b+c)(-a+b+c)} = a(x-3) + b(x-2) + c(x-1)$$
where $a = \sqrt{6x - 9}$, $b = \sqrt{4x-4}$, and $c = \sqrt{2x-1}$.
\end{document}


which gives

If you prefer to use the expanded out form with \sqrt{...} instead of {...}^{1/2}, here is a variation of @Mico's answer:

\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{multline}
\sqrt{\begin{lgathered}
\bigl[\sqrt{6x-9}+\sqrt{4x-4}+\sqrt{2x-1}\,\bigr]
\bigl[\sqrt{6x-9}+\sqrt{4x-4}-\sqrt{2x-1}\,\bigr]\\
\times\bigl[\sqrt{4x-4}+\sqrt{2x-1}-\sqrt{6x-9}\,\bigr]
\bigl[\sqrt{6x-9}+\sqrt{2x-1}-\sqrt{4x-4}\,\bigr]
\end{lgathered}}
\\
=(x-3)\sqrt{6x-9}+(x-2)\sqrt{4x-4}+(x-1)\sqrt{2x-1}
\end{multline}
\end{document}


which gives

• Yeah haha, it is Heron formula for the left hand and for the right hand it is the sum area in the triangle. I put original equation in Wolfram Alpha ( of course, I dun want to solve this disturbing looking equation ) and afterward I need to write it properly but I can't...hahahha. Maybe using ur simplify form is better Commented Jun 11, 2020 at 5:24
• What do you mean by "it doesn't work"? Do you get a compilation error or do you get an output which looks visually different. Are you trying the example that I provided in my answer, or copy pasting it in a bigger document? Note that the second example requires the mathtools package. Commented Jun 11, 2020 at 5:41
• As I have asked multiple times, can you explain what you mean by 'it is not working'. Do you get a compile error? If so, what is the error message. Commented Jun 11, 2020 at 5:52
• I have no clue how you could possibly get the latex code in the output PDF in the above example. Perhaps, you can create another question which explains the output you are seeing and someone else might be able to help. Commented Jun 11, 2020 at 5:55
• It may be better to ask a separate question on the forum. Commented Jun 11, 2020 at 5:57