Math & ScienceFormulation

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
alehandro
Posts: 1
Joined: Thu Aug 13, 2015 5:03 pm

Formulation

Post by alehandro »

I have a problem wiyh this formula,

i need to write this formulation on more than 1 line, the problem is tat the last \right], don't appear in pdf file... i don't know why...

the script is that:

Code: Select all

\documentclass[a4paper, 11pt]{book}
\usepackage{amsmath, amssymb, amsfonts, amsthm}		

\begin{equation} \begin{align}
\Phi_{visc} & =\eta \left[ 2\left( \frac{\partial u_x}{\partial x}\right)^2+2\left( \frac{\partial u_y}{\partial y}\right)^2+2\left( \frac{\partial u_z}{\partial z}\right)^2+\\
& +\left( \frac{\partial u_x}{\partial y}+\frac{\partial u_y}{\partial x}\right)^2+\left( \frac{\partial u_x}{\partial z}+\frac{\partial u_z}{\partial x}\right)^2+\left( \frac{\partial u_y}{\partial z}+\frac{\partial u_z}{\partial y}\right)^2 \right]
\end{align} \end{equation}

thanks a lot for the help
Last edited by Stefan Kottwitz on Thu Aug 13, 2015 5:39 pm, edited 1 time in total.

Recommended reading 2024:

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

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

Stefan Kottwitz
Site Admin
Posts: 10340
Joined: Mon Mar 10, 2008 9:44 pm

Formulation

Post by Stefan Kottwitz »

Hi Alehandro,

welcome to the forum!

It's nice that you post a nearly complete minimal example. Just \begin{document} and \end{document} are missing for people, who would test it.

align and equation should not be nested. align is a standalone displayed math environment.

With classic amsmath environments, we cannot span a pair \left \right over lines. It can be fixed manually, but a possibility with automatic line breaks which supports those auto-sizing delimiters would be breqn.

Here's is it used with your code:

Code: Select all

\documentclass[a4paper, 11pt]{book}
\usepackage{amsmath, amssymb, amsfonts, amsthm}         
\usepackage{breqn}
\begin{document}
\begin{dmath}
\Phi_{\text{visc}} =\eta \left[ 2\left(
    \frac{\partial u_x}{\partial x}\right)^2
  + 2\left( \frac{\partial u_y}{\partial y}\right)^2
  + 2\left( \frac{\partial u_z}{\partial z}\right)^2
  + \left( \frac{\partial u_x}{\partial y}
  + \frac{\partial u_y}{\partial x}\right)^2
  + \left( \frac{\partial u_x}{\partial z}
  + \frac{\partial u_z}{\partial x}\right)^2
  + \left( \frac{\partial u_y}{\partial z}
  + \frac{\partial u_z}{\partial y}\right)^2 \right]
\end{dmath}
\end{document}
equation.png
equation.png (17.01 KiB) Viewed 3191 times
Stefan
LaTeX.org admin
Post Reply