I've looked at many different methods to split this VERY long formula into several lines but I always get an error but I can't even see where, the formula works - i think the issue is with the splitting method. Can somebody provide a code that works? Many thanks!
\frac{\left(\sqrt{\frac{a\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}}{a\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}\ +\left(1-b\right)\left(1-\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}\right)}ab\frac{b\left(1-\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}\right)}{b\left(1-\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}\right)+\left(1-a\right)\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}}}-\sqrt{\left(1-\frac{a\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}}{a\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}\ +\left(1-b\right)\left(1-\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}\right)}\right)\left(1-a\right)\left(1-b\right)\left(1-\frac{b\left(1-\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}\right)}{b\left(1-\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}\right)+\left(1-a\right)\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}}\right)}\right)}{\left(\sqrt{\sqrt{\frac{a}{1-b}}\frac{\sqrt{1-b}}{\sqrt{a}+\sqrt{1-b}}ab\frac{b\left(1-\frac{\sqrt{1-b}}{\sqrt{a}+\sqrt{1-b}}\right)}{b\left(1-\frac{\sqrt{1-b}}{\sqrt{a}+\sqrt{1-b}}\right)+\left(1-a\right)\frac{\sqrt{1-b}}{\sqrt{a}+\sqrt{1-b}}}}-\sqrt{\left(1-\sqrt{\frac{a}{1-b}}\frac{\sqrt{1-b}}{\sqrt{a}+\sqrt{1-b}}\right)\left(1-a\right)\left(1-b\right)\left(1-\frac{b\left(1-\frac{\sqrt{1-b}}{\sqrt{a}+\sqrt{1-b}}\right)}{b\left(1-\frac{\sqrt{1-b}}{\sqrt{a}+\sqrt{1-b}}\right)+\left(1-a\right)\frac{\sqrt{1-b}}{\sqrt{a}+\sqrt{1-b}}}\right)}\right)}
Text Formatting ⇒ How can I split this long equation into multiple lines?
-
- Posts: 1
- Joined: Sat Dec 18, 2021 5:03 pm
NEW: TikZ book now 40% off at Amazon.com for a short time.
How can I split this long equation into multiple lines?
Please try to publish a
minimal working example marked as code.
You could write the quotient as a product:

You could write the quotient as a product:
Code: Select all
\documentclass{article}
\usepackage{mathtools}% loads amsmath
\usepackage[hmargin=1.5cm, showframe]{geometry}
\begin{document}
\begin{equation}
\begin{split}
&\left(\sqrt{\frac{a\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}}
{a\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}+\left(1-b\right)
\left(1-\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}\right)}ab
\frac{b\left(1-\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}\right)}
{b\left(1-\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}\right)+\left(1-a\right)
\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}}}\right.\\
&\left.-\sqrt{\left(1-\frac{a\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}}
{a\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}+\left(1-b\right)
\left(1-\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}\right)}\right)\left(1-a\right)
\left(1-b\right)\left(1-\frac{b\left(1-\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}\right)}
{b\left(1-\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}\right)+\left(1-a\right)
\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}}\right)}\right)\\
&\left(\sqrt{\sqrt{\frac{a}{1-b}}\frac{\sqrt{1-b}}{\sqrt{a}+\sqrt{1-b}}ab
\frac{b\left(1-\frac{\sqrt{1-b}}{\sqrt{a}+\sqrt{1-b}}\right)}
{b\left(1-\frac{\sqrt{1-b}}{\sqrt{a}+\sqrt{1-b}}\right)+\left(1-a\right)
\frac{\sqrt{1-b}}{\sqrt{a}+\sqrt{1-b}}}}\right.\\
&\left.-\sqrt{\left(1-\sqrt{\frac{a}{1-b}}\frac{\sqrt{1-b}}{\sqrt{a}+\sqrt{1-b}}\right)
\left(1-a\right)\left(1-b\right)
\left(1-\frac{b\left(1-\frac{\sqrt{1-b}}{\sqrt{a}+\sqrt{1-b}}\right)}
{b\left(1-\frac{\sqrt{1-b}}{\sqrt{a}+\sqrt{1-b}}\right)+\left(1-a\right)
\frac{\sqrt{1-b}}{\sqrt{a}+\sqrt{1-b}}}\right)}\right)^{-1}
\end{split}
\end{equation}
\end{document}
- Ijon Tichy
- Posts: 640
- Joined: Mon Dec 24, 2018 10:12 am
How can I split this long equation into multiple lines?
Or you can use
or at the begin of a line:
\Bigg/
, either at the end of line:
Code: Select all
\documentclass{article}
\usepackage{mathtools}% loads amsmath
\usepackage[hmargin=1.5cm, showframe]{geometry}
\begin{document}
\begin{equation}
\begin{split}
&\left(\sqrt{\frac{a\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}}
{a\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}+\left(1-b\right)
\left(1-\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}\right)}ab
\frac{b\left(1-\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}\right)}
{b\left(1-\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}\right)+\left(1-a\right)
\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}}}\right.\\
&\left.-\sqrt{\left(1-\frac{a\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}}
{a\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}+\left(1-b\right)
\left(1-\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}\right)}\right)\left(1-a\right)
\left(1-b\right)\left(1-\frac{b\left(1-\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}\right)}
{b\left(1-\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}\right)+\left(1-a\right)
\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}}\right)}\right)\Bigg/\\
&\left(\sqrt{\sqrt{\frac{a}{1-b}}\frac{\sqrt{1-b}}{\sqrt{a}+\sqrt{1-b}}ab
\frac{b\left(1-\frac{\sqrt{1-b}}{\sqrt{a}+\sqrt{1-b}}\right)}
{b\left(1-\frac{\sqrt{1-b}}{\sqrt{a}+\sqrt{1-b}}\right)+\left(1-a\right)
\frac{\sqrt{1-b}}{\sqrt{a}+\sqrt{1-b}}}}\right.\\
&\left.-\sqrt{\left(1-\sqrt{\frac{a}{1-b}}\frac{\sqrt{1-b}}{\sqrt{a}+\sqrt{1-b}}\right)
\left(1-a\right)\left(1-b\right)
\left(1-\frac{b\left(1-\frac{\sqrt{1-b}}{\sqrt{a}+\sqrt{1-b}}\right)}
{b\left(1-\frac{\sqrt{1-b}}{\sqrt{a}+\sqrt{1-b}}\right)+\left(1-a\right)
\frac{\sqrt{1-b}}{\sqrt{a}+\sqrt{1-b}}}\right)}\right)
\end{split}
\end{equation}
\end{document}
Code: Select all
\documentclass{article}
\usepackage{mathtools}% loads amsmath
\usepackage[hmargin=1.5cm, showframe]{geometry}
\begin{document}
\begin{equation}
\begin{split}
&\left(\sqrt{\frac{a\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}}
{a\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}+\left(1-b\right)
\left(1-\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}\right)}ab
\frac{b\left(1-\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}\right)}
{b\left(1-\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}\right)+\left(1-a\right)
\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}}}\right.\\
&\left.-\sqrt{\left(1-\frac{a\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}}
{a\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}+\left(1-b\right)
\left(1-\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}\right)}\right)\left(1-a\right)
\left(1-b\right)\left(1-\frac{b\left(1-\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}\right)}
{b\left(1-\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}\right)+\left(1-a\right)
\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}}\right)}\right)\\
\Bigg/&\left(\sqrt{\sqrt{\frac{a}{1-b}}\frac{\sqrt{1-b}}{\sqrt{a}+\sqrt{1-b}}ab
\frac{b\left(1-\frac{\sqrt{1-b}}{\sqrt{a}+\sqrt{1-b}}\right)}
{b\left(1-\frac{\sqrt{1-b}}{\sqrt{a}+\sqrt{1-b}}\right)+\left(1-a\right)
\frac{\sqrt{1-b}}{\sqrt{a}+\sqrt{1-b}}}}\right.\\
&\left.-\sqrt{\left(1-\sqrt{\frac{a}{1-b}}\frac{\sqrt{1-b}}{\sqrt{a}+\sqrt{1-b}}\right)
\left(1-a\right)\left(1-b\right)
\left(1-\frac{b\left(1-\frac{\sqrt{1-b}}{\sqrt{a}+\sqrt{1-b}}\right)}
{b\left(1-\frac{\sqrt{1-b}}{\sqrt{a}+\sqrt{1-b}}\right)+\left(1-a\right)
\frac{\sqrt{1-b}}{\sqrt{a}+\sqrt{1-b}}}\right)}\right)
\end{split}
\end{equation}
\end{document}
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. 

- Ijon Tichy
- Posts: 640
- Joined: Mon Dec 24, 2018 10:12 am
How can I split this long equation into multiple lines?
You could also use
\splitdfrac
:
Code: Select all
\documentclass{article}
\usepackage{mathtools}% loads amsmath
\usepackage[hmargin=1.5cm, showframe]{geometry}
\begin{document}
\begin{equation}
\frac{\left(\splitdfrac{\sqrt{\frac{a\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}}
{a\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}+\left(1-b\right)
\left(1-\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}\right)}ab
\frac{b\left(1-\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}\right)}
{b\left(1-\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}\right)+\left(1-a\right)
\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}}}}
{-\sqrt{\left(1-\frac{a\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}}
{a\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}+\left(1-b\right)
\left(1-\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}\right)}\right)\left(1-a\right)
\left(1-b\right)\left(1-\frac{b\left(1-\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}\right)}
{b\left(1-\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}\right)+\left(1-a\right)
\frac{\sqrt{b}}{\sqrt{1-a}+\sqrt{b}}}\right)}}\right)}
{\left(\splitdfrac{\sqrt{\sqrt{\frac{a}{1-b}}\frac{\sqrt{1-b}}{\sqrt{a}+\sqrt{1-b}}ab
\frac{b\left(1-\frac{\sqrt{1-b}}{\sqrt{a}+\sqrt{1-b}}\right)}
{b\left(1-\frac{\sqrt{1-b}}{\sqrt{a}+\sqrt{1-b}}\right)+\left(1-a\right)
\frac{\sqrt{1-b}}{\sqrt{a}+\sqrt{1-b}}}}}
{-\sqrt{\left(1-\sqrt{\frac{a}{1-b}}\frac{\sqrt{1-b}}{\sqrt{a}+\sqrt{1-b}}\right)
\left(1-a\right)\left(1-b\right)
\left(1-\frac{b\left(1-\frac{\sqrt{1-b}}{\sqrt{a}+\sqrt{1-b}}\right)}
{b\left(1-\frac{\sqrt{1-b}}{\sqrt{a}+\sqrt{1-b}}\right)+\left(1-a\right)
\frac{\sqrt{1-b}}{\sqrt{a}+\sqrt{1-b}}}\right)}}\right)}
\end{equation}
\end{document}
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. 
