\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\begin{document}
First find how many days between July 22 and Nov 4
\[\begin{tabular}{|ccc|}
\hline
Month & & days \\
\hline \hline
July & 31-22 & 9 \\
August & & 31 \\
September & & 30 \\
October &&31\\
November&&4\\
\hline \hline
\multicolumn{2}{|c}{total } & 105 days \\
\hline
\end{tabular}\]
\begin{flalign*}
PV &= \frac{FV}{1+r \times t} \\\\
&= \frac{1000}{\left(1+0.07 \times \frac{105}{365}\right)} \\\\
&= \dfrac{2000}{1.020137}\\\\
&= \$980.26
\end{flalign*}
\end{document}
I would like to keep everything to the left, but currently the table is centred.
Best Answer
Since you have defined a table inside a display equation(!), you may use
fleqn
as the option for thedocumentclass
.Update:
Now it is time to do things in right way.
tabular
need not be used inside\[...\]
. And as noted by Gonzalo, instead of using double\\
to leave some extra vertical space between equations, one can use the optional argument like\\[<len>]
, where<len>
can be\jot
or any unit of length likept
orcm
or multiples ofbaselineskip
as in this example, where nothing is changed in the preamble: