2

I have a long equation and I am trying to wrap it. Here is the code I am using.

\begin{eqnarray}
\begin{aligned}
0 = A f_d V_d C_x^d - A f_d V_d C_{x+\Delta x}^d \\
+ A \Delta k_m(C^b-C^d) 
+A\left(-D_e\frac{dC^d}{dx}\right)_x - A\left(-D_e\frac{dC^d}{dx}\right)_{x+\Delta x} \\
+ A\Delta\rho_c(1-f_b)(1-\varepsilon_d)R_A
\end{aligned}
\end{eqnarray}

The output is as follows:

image

I would like to move equation to left

Thanks in advance

  • Welcome to TeX.SX! Can you please expand the code snippet that you have posted to a full minimal working example. A MWE should compile and be as small as possible to demonstrate your problem. it's much easier to help you if we have full working code to start from. – Andrew Nov 15 '17 at 18:02
  • you have used the align environment for multiple lines, but i don't see any & indicating alignment points. (& is ordinarily placed before signs of relation, and, with a \quad space following the &, before signs of operation.) since the second line is very long, it may just exceed the specified page width; in that case, breaking the second line earlier is probably a good idea. – barbara beeton Nov 15 '17 at 18:07
5

You should never use eqnarray, see eqnarray vs align. Here the solution seems to be multline:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{multline}
0 = A f_d V_d C_x^d - A f_d V_d C_{x+\Delta x}^d \\
+ A \,\Delta k_m(C^b-C^d)
+A\left(-D_e\frac{dC^d}{dx}\right)_{\!x} - A\left(-D_e\frac{dC^d}{dx}\right)_{\!x+\Delta x} \\
+ A\,\Delta\rho_c(1-f_b)(1-\varepsilon_d)R_A
\end{multline}

\end{document}

I've made a couple of manual adjustments: \! in front of the subscripts following \right), so they are placed nearer the bottom of the parenthesis; I also added \, in front of \Delta when it follows a factor, in order to make clearer it is not a multiplier, but an operator.

enter image description here

You may want to define a command for this, so \Delta as an operator is distinguished from the letter.

\documentclass{article}
\usepackage{amsmath}

\newcommand{\opDelta}{\mathop{}\!\Delta}

\begin{document}

\begin{multline}
0 = A f_d V_d C_x^d - A f_d V_d C_{x+\opDelta x}^d \\
+ A \opDelta k_m(C^b-C^d)
+A\left(-D_e\frac{dC^d}{dx}\right)_{\!x} - A\left(-D_e\frac{dC^d}{dx}\right)_{\!x+\opDelta x} \\
+ A\opDelta\rho_c(1-f_b)(1-\varepsilon_d)R_A
\end{multline}

\end{document}

A similar treatment should be used for the “differential d”:

\newcommand{\diff}{\mathop{}\!d}

Finally your image suggests the formula before “reads” is typed in as

$x$+$\Delta x$

which is wrong and should be

$x+\Delta x$

or, with the new command

$x+\opDelta x$
|improve this answer|||||
2

Unless your textblock is unusually narrow, I can't see a (good) reason for using more than two lines to typeset the equation.

I suggest using a split environment inside an equation environment.

enter image description here

\documentclass{article}
\usepackage{amsmath} % for 'split' environment
\begin{document}
\begin{equation}
\begin{split}
0 &= A f^{}_d V^{}_d C_x^d 
   - A f^{}_d V^{}_d C_{x+\Delta x}^d 
   + A \Delta k_m(C^b-C^d) \\
&\quad + A\Bigl(\!-D_e\frac{dC^d}{dx}\Bigr)_{\!x} 
       - A\Bigl(\!-D_e\frac{dC^d}{dx}\Bigr)_{\!x+\Delta x} 
       + A\Delta\rho_c(1-f_b)(1-\varepsilon_d)R_A
\end{split}
\end{equation}
\end{document}
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.