Math & Sciencetoo long numerator of a fraction

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
tabenda
Posts: 13
Joined: Sun Dec 20, 2009 11:42 pm

too long numerator of a fraction

Post by tabenda »

Hello,
I have to write an equation with a fraction. But the problem is that the numerator of the fraction is very long so that i have to break it in two lines. Please let me know how can i do that?

Many thanks and best regards in advance.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

tabenda
Posts: 13
Joined: Sun Dec 20, 2009 11:42 pm

Re: too long numerator of a fraction

Post by tabenda »

Plz let me know the solution to this problem if anybody knows. I need it badly and urgently :( .
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

too long numerator of a fraction

Post by gmedina »

Hi,

please post the problematic equation; give us also some useful information: for example, should the equation be aligned?
tabenda wrote:Plz let me know the solution to this problem if anybody knows. I need it badly and urgently :( .
That kind of message invites me to stall as long as possible. You know, we're busy people too.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
tabenda
Posts: 13
Joined: Sun Dec 20, 2009 11:42 pm

Re: too long numerator of a fraction

Post by tabenda »

Here is the equation code; ofcourse it must be aligned but i think i would be able to handle that issue, right now i just need the solution to the problem with numerator. Many thanks.

\begin{align}
\frac{\partial e_m}{\partial c_i}&=\varepsilon\left(\frac{\left(\sum_{i=1}^R\beta_i\prod_{j=1}^L\exp\left(-\frac{1}{2}\left(\frac{x_j^m-c_j^i}{\sigma_j^i}\right)^2\right)\left(\frac{x_j^m-c_j^i}{(\sigma_j^i)^2}\right)\sum_{i=1}^R\prod_{j=1}^L\exp\left(-\frac{1}{2}\left(\frac{x_j^m-c_j^i}{\sigma_j^i}\right)^2\right)\right)-\left(\sum_{i=1}^R\prod_{j=1}^L\exp\left(-\frac{1}{2}\left(\frac{x_j^m-c_j^i}{\sigma_j^i}\right)^2\right)\left(\frac{x_j^i-c_j^i}{(\sigma_j^i)^2}\right)\left(\sum_{i=1}^R\prod_{j=1}^L\exp\left(-\frac{1}{2}\left(\frac{x_j^m-c_j^i}{\sigma_j^i}\right)^2\right)\right)\right)}{\sum_{i=1}^R\prod_{j=1}^L\exp\left(-\frac{1}{2}\left(\frac{x_j^m-c_j^i}{\sigma_j^i}\right)^2\right)}\right)
\end{align}
php1ic
Posts: 192
Joined: Wed Jan 28, 2009 8:17 pm

too long numerator of a fraction

Post by php1ic »

I would suggest either taking the denominator out as a factor then spliting the line, or creating a 'new' variable to shorten the equation.

Code: Select all

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{align}
\frac{\partial e_m}{\partial c_i}= &\frac{\varepsilon}{\sum_{i=1}^R\prod_{j=1}^L\exp\left[-\frac{1}{2}\left(\frac{x_j^m-c_j^i}{\sigma_j^i}\right)^2\right]}\\
                                   &\left\{\sum_{i=1}^R\beta_i\prod_{j=1}^L\exp\left[-\frac{1}{2}\left(\frac{x_j^m-c_j^i}{\sigma_j^i}\right)^2\right]\left(\frac{x_j^m-c_j^i}{(\sigma_j^i)^2}\right)\sum_{i=1}^R\prod_{j=1}^L\exp\left[-\frac{1}{2}\left(\frac{x_j^m-c_j^i}{\sigma_j^i}\right)^2\right]\right.\notag \\
                                   &\quad\left.-\sum_{i=1}^R\prod_{j=1}^L\exp\left[-\frac{1}{2}\left(\frac{x_j^m-c_j^i}{\sigma_j^i}\right)^2\right]\left(\frac{x_j^i-c_j^i}{(\sigma_j^i)^2}\right)\sum_{i=1}^R\prod_{j=1}^L\exp\left[-\frac{1}{2}\left(\frac{x_j^m-c_j^i}{\sigma_j^i}\right)^2\right]\right\}\notag
\end{align}

\noindent OR

\[
x=\exp\left[-\frac{1}{2}\left(\frac{x_j^m-c_j^i}{\sigma_j^i}\right)^2\right]
\]


\begin{align}
\frac{\partial e_m}{\partial c_i}= \varepsilon
                                   \left\{\frac{\sum_{i=1}^R\beta_i\prod_{j=1}^Lx\left(\frac{x_j^m-c_j^i}{(\sigma_j^i)^2}\right)\sum_{i=1}^R\prod_{j=1}^Lx
                                  -\sum_{i=1}^R\prod_{j=1}^Lx\left(\frac{x_j^i-c_j^i}{(\sigma_j^i)^2}\right)\left(\sum_{i=1}^R\prod_{j=1}^Lx\right)}{\sum_{i=1}^R\prod_{j=1}^Lx}\right\}
\end{align}

\end{document}
Or a combination of the two. I also find using the different types of brackets makes large equations easier to read
tabenda
Posts: 13
Joined: Sun Dec 20, 2009 11:42 pm

Re: too long numerator of a fraction

Post by tabenda »

Thanks alot.
Post Reply