Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

enter image description here

Tried the equation in the image below with the following codes, but was encountering errors. Please can anybody be kind enough to help. Thanks.

\begin{array}
{p^'}_0\left( t \right) =  - \lambda {p_0}\left( t \right) + \mu {p_1}\left( t \right),\\
{p^'}_j\left( t \right) = \lambda {p_{j - 1}}\left( t \right) - \left( {\lambda  + j\mu } \right){p_j}\left( t \right) + \mu \left( {j + 1} \right){p_{j + 1}}\left( t \right)
\end{array}
share|improve this question

4 Answers 4

there are several problems with the code used:

  • array must be inside a math environment; this could be fixed by enclosing it in \[ ... \]

  • the alignment within the array must be specified; for this, \begin{array}{l} would work.

  • the primes (input as apostrophes) are defined to be superscripts, so the explicit ^ is unwanted.

  • the \left ... \right for the parentheses isn't needed anywhere, since everything within them is "normal" size

  • extra grouping with braces isn't needed except around the multi-element subscripts

it would be equally appropriate, and perhaps simpler, to use the align* environment from amsmath:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
p'_0 (t) &= -\lambda p_0 (t) + \mu p_1 (t),\\
p'_j (t) &=  \lambda p_{j-1} (t) - (\lambda + j\mu) p_j (t) + \mu (j+1) p_{j+1} (t)
\end{align*}
\end{document}

output of example code

share|improve this answer

it's not really an array, so i rewrote it as a pair of aligned equations -- which is nearer to the mark (to my way of thinking).

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
p'_0( t ) &=  -\lambda {p_0}( t ) + \mu {p_1}( t ),\\
p'_j( t ) &=   \lambda {p_{j - 1}}( t ) - ( {\lambda  + j\mu } ){p_j}
               ( t ) + \mu ( {j + 1} ){p_{j + 1}} t )
\end{align}
\end{document}

note, i've taken off all your \left/\right things, which aren't necessary here.

share|improve this answer

No need for \left(...\right) for simple expressions:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{concrete}
\usepackage{amsmath}
\begin{document}

\begin{align*}
p^\prime_0(t) &=  -\lambda p_0(t) + \mu p_1(t),\\
p^\prime_j(t) &=   \lambda p_{j-1}(t) - (\lambda  + j\mu)p_j(t) + \mu (j+1)p_{j+1}(t)
\end{align*}

\end{document}

enter image description here

share|improve this answer
\begin{array}{l} % Here is the change
{p^'}_0\left( t \right) =  - \lambda {p_0}\left( t \right) + \mu {p_1}\left( t \right),\\
{p^'}_j\left( t \right) = \lambda {p_{j - 1}}\left( t \right) - \left( {\lambda  + j\mu } \right){p_j}\left( t \right) + \mu \left( {j + 1} \right){p_{j + 1}}\left( t \right)
\end{array}

l means one column with left aligned entries. BTW: \left and \right are unnecessary here.

share|improve this answer
1  
p^' should be p' –  egreg Mar 18 at 15:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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