How to fit equations with numbering into a table

equationstables

I would like to put multiple equations in a table like below.

solved for x solved for y
x = a + b (1.1) y = d + e (1.2)
x = d + b * k (1.3) y= j^2 (1.4)

the equation should be aligned to the left and the numbering to the right. I've not been able to fit the equation envrioment into a table so the equations will be numbered.

Best Answer

Update
As pointed out in the comments, the first version did not add an option to refer to equations. Hence, \addtag was redesigned and moved directly inside the cells making numbering optional. Additionally, an argument of \addtag[<label>] is optional. It is a label name and is required only if the equation needs to be referenced.

enter image description here

The new code

\documentclass{article}
\usepackage{array}
\usepackage{etoolbox}
\newcommand\addtag[1][]{%
  \refstepcounter{equation}\hfill(\theequation)%
  \notblank{#1}{\label{#1}}{}}
\counterwithin[\arabic]{equation}{section}


\begin{document}
\section{First section}
\begin{table}[tbh]
  \renewcommand*{\arraystretch}{1.5}
  \centering
  \caption{Equations}\label{tab:equations}
  \begin{tabular}{| *2{>{\(}p{5cm}<{\)}|}}
    \hline
    \textbf{Solved for $x$} & \textbf{Solved for $y$} \\
    \hline
    x = a + b          \addtag[a] & y = d + e \addtag[b] \\ 
    x = d + b \times k            & y = j^2   \addtag[c] \\ 
    \hline
  \end{tabular}
\end{table}

References: Euqation~\ref{a}, Equation~\ref{b}, and Equation~\ref{c}.
\end{document}

EDIT.
Note the equation numbers. The document class article defines equations as single numbers, whereas report and book will add a chapter to form a combined tag, that is (2.1) etc. as long as \chapter is used. If you wish to have the same effect using just article, add the following code to preamble:

 \counterwithin[\arabic]{equation}{section}

EDIT2. (display style)
Inline equations by default are typeset using a text style, which is a more compact form to fit expressions between texts. This can be changed by appending \displaystyle to each expression. However, >{...} can do that automatically per each cell in the column. See the snippet below. You just need to add \displaystyle after \(

  \begin{tabular}{| *2{>{\(\displaystyle}p{5cm}<{\)}|}}
    % ...
  \end{tabular}

Equations may no longer fit the rows after the change. In that case, increase the stretching factor of \arraystretch to something larger than 1.8, e.g.

\renewcommand*{\arraystretch}{1.85}

Here's a simple solution

enter image description here

\documentclass[12pt]{article}
\usepackage{array}
\newcommand\addtag{\;\refstepcounter{equation}(\theequation)}
\begin{document}
\begin{table}[tbh]
  \renewcommand*{\arraystretch}{1.5}
  \centering
  \caption{Equations}\label{tab:equations}
  \begin{tabular}{| *2{>{\(}p{5cm}<{\hfill\addtag\)}|}}
    \hline
    \multicolumn{1}{|l|}{\textbf{Solved for $x$}}
    & \multicolumn{1}{l|}{\textbf{Solved for $y$}} \\
    \hline
    x = a + b          & y = d + e \\
    x = d + b \times k & y = j^2 \\
    \hline
  \end{tabular}
\end{table}
\end{document}
Related Question