Math & ScienceEquation crosses the right boundary

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
pallav
Posts: 170
Joined: Wed Nov 12, 2008 5:53 pm

Equation crosses the right boundary

Post by pallav »

How to tackle with the equation? It crosses the right boundary. Is there any way to write the equation so that it does not cross the barrier.
Attachments
LaTeX1.pdf
pdf file
(19.57 KiB) Downloaded 280 times
LaTeX1.tex
tex file
(1.61 KiB) Downloaded 238 times

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Stefan Kottwitz
Site Admin
Posts: 10359
Joined: Mon Mar 10, 2008 9:44 pm

Equation crosses the right boundary

Post by Stefan Kottwitz »

If you align at the equal signs, it's a problem here, since left side and right side are too wide, together. You could use a multline environment:

Code: Select all

\begin{multline}
 \Re{\left(\left[\frac{d\lambda}{d\tau}\right]^{-2}\right)_{\lambda= i\omega \pi\rho}}
	= \Re\left[{\frac {{{\rm e}^{\lambda\tau}} \left( -2\,\lambda +A\rho \right) }{ \left( B\lambda -C \right) \lambda}}+{\frac {B}{ \left( 
		B\lambda -C \right) \lambda}}\right]_{\lambda= i\omega_0}\nonumber\\
	= \left[{\frac {\left( -CA-2\,B{\omega_0}^{2} \right) \sin \left( \omega_0\,\tau \right) + \left( -B\omega_0\,A+2\,C\omega_0 \right) \cos \left( \omega_0\,\tau
 \right) -{B}^{2}\omega_0}{ \left( {C}^{2}+{B}^{2}{\omega_0}^{2} \rho\right) \omega_0}}\right]\nonumber\\
=\frac{C^2}{\left( C^2+B^2\omega_0^2\right) \omega_0^2\rho}>0.\nonumber
\end{multline}
Stefan
LaTeX.org admin
pallav
Posts: 170
Joined: Wed Nov 12, 2008 5:53 pm

Re: Equation crosses the right boundary

Post by pallav »

It looks like the jpg. Some more attractive alignment is needed.
Attachments
ff.JPG
ff.JPG (26.08 KiB) Viewed 2983 times
User avatar
Stefan Kottwitz
Site Admin
Posts: 10359
Joined: Mon Mar 10, 2008 9:44 pm

Equation crosses the right boundary

Post by Stefan Kottwitz »

If you would like to align at the equal signs, you need to break your wide fraction term. Otherwise, it looks better if you would use \shoveright:

Code: Select all

\begin{multline}
 \Re{\left(\left[\frac{d\lambda}{d\tau}\right]^{-2}\right)_{\lambda= i\omega \pi\rho}}
	= \Re\left[{\frac {{{\rm e}^{\lambda\tau}} \left( -2\,\lambda +A\rho \right) }{ \left( B\lambda -C \right) \lambda}}+{\frac {B}{ \left( 
		B\lambda -C \right) \lambda}}\right]_{\lambda= i\omega_0}\nonumber\\
	= \left[{\frac {\left( -CA-2\,B{\omega_0}^{2} \right) \sin \left( \omega_0\,\tau \right) + \left( -B\omega_0\,A+2\,C\omega_0 \right) \cos \left( \omega_0\,\tau
 \right) -{B}^{2}\omega_0}{ \left( {C}^{2}+{B}^{2}{\omega_0}^{2} \rho\right) \omega_0}}\right]\shoveright\nonumber\\
=\frac{C^2}{\left( C^2+B^2\omega_0^2\right) \omega_0^2\rho}>0.\nonumber
\end{multline}
Stefan
LaTeX.org admin
Post Reply