2

Can anyone please provide or guide me to write the latex code for the given system of equation?

enter image description here

2

It's quite hard to fit this in a standard line width.

I used a few tricks for minimizing the amount of input:

  1. \w[x] typesets \mathbf{w}_{jx};
  2. \r[x] typesets \mathbf{r}_{jx};
  3. \? is used to push the object right or left.

Don't use \w and \r generally in your document.

In order to pretend the diagram isn't really as wide as the line, I added some negative spacing.

\documentclass[leqno]{article}
\usepackage{amsmath,array}

\begin{document}

\begin{equation}
\mbox{\hspace*{-2em}%
  \footnotesize % reduce the font size
  $
  \renewcommand{\arraystretch}{1.5}
  \setlength{\arraycolsep}{0pt}
  \newcommand{\?}{\hspace*{\fill}}% temporary command
  \newcommand{\w}[1][]{\mathbf{w}_{j#1}}% temporary command
  \renewcommand{\r}[1][]{\mathbf{r}_{j#1}}% temporary command
  \begin{array}{ *{9}{ c >{{}}c<{{}} } l }
  \?\w[-4] &+& B\w[-3] &+& C\w[-2] &+& B\w[-1] &+& \w[]\? && && && && &=& \r[-2] \\
  %
  && \?\w[-3] &+& B\w[-2] &+& C\w[-1] &+& B\w[] &+& \w[+1]\? && && && &=& \r[-1] \\
  %
  && && \?\w[-2] &+& B\w[-1] &+& C\w[] &+& B\w[+1] &+& \w[+2]\? && && &=& \r[] \\
  %
  && && && \?\w[-1] &+& B\w[] &+& C\w[+1] &+& B\w[+2] &+& \w[+3]\? && &=& \r[+1] \\
  %
  && && && && \?\w[] &+& B\w[+1] &+& C\w[+2] &+& B\w[+3] &+& \w[+4]\?&=& \r[+2] \\
  \end{array}
$\hspace*{-2em}}
\end{equation}

\end{document}

You might perhaps go with \small instead of \footnotesize, depending on the line width in your document.

First try without the two \hspace*{-2em} to see whether it really fits.

enter image description here

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.