Math & ScienceDisplay math problem

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
chogall
Posts: 2
Joined: Wed Jun 23, 2010 9:33 pm

Display math problem

Post by chogall »

Hi all,

I have a problem with the following latex code :

Code: Select all

\documentclass[11pt,a4paper,oneside]{report}
\usepackage[pdftex]{graphicx}
\usepackage[fleqn]{amsmath}

\setlength{\parindent}{0in}

\begin{document}
\title{Exercices sur le th\'{e}or\`{e}me de Pythagore}
\author{Samuel Gmehlin}
\date{21 juin 2010}
\maketitle

\underline{Exercice 1 :}\\ Notation scientifique

\vspace{5 mm}

47'500'000'000 = ...\\
0.0000456 = ...\\
3728.2955 = ...\\
-11'278.10156 = ...\\
404'000'400.24 = ...\\
-9'288'091.657 = ...\\
-0.0000000027 = ...\\
0.15 = ...


\vspace{5 mm}

\underline{Exercice 2 :}\\ Calculer x

\vspace{5 mm}

\begin{tabular}{l}

3x + 20 = 32\\
12 - \frac{5x}{3} = \frac{1}{3}\\
\frac{7}{6} - 14 + \frac{9}{2} = 6x - \frac{7}{3}\\
\frac{9-4x+7x}{9} = -9\\
4x^2 - 2 = 194\\
3x - 6(3 - 4x) = 9x - 2\\
3x - 2x(x - 1) = -2x^2 + 7x - 12\\
\frac{x - 2}{4} = \frac{5}{4}x - x\\
\frac{2x - 3}{7} = \frac{3x}{7} - 2x\\
\frac{3}{2} - \frac{7x}{4} = \frac{5(2 - x)}{2} - 1

\end{tabular}
\end{document}
It says :

Code: Select all

! Missing $ inserted.
<inserted text>
                $
l.36 12 - $\frac{5x}{3}$ = \frac{1}{3}
                                      \\
?
I really don't understand why. I tried to put $$...$$ around all my math block but still the same!

Any idea ?

thank you!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

josephwright
Site Moderator
Posts: 814
Joined: Tue Jul 01, 2008 2:19 pm

Display math problem

Post by josephwright »

Please read about math mode. You've got stuff that looks like math, but with no $ ... $ around it, and then you've used a tabular where I suspect you want an array. Perhaps

Code: Select all

\documentclass{article}
    \begin{document}
      \[
    \begin{array}{l}

    3x + 20 = 32\\
    12 - \frac{5x}{3} = \frac{1}{3}\\
    \frac{7}{6} - 14 + \frac{9}{2} = 6x - \frac{7}{3}\\
    \frac{9-4x+7x}{9} = -9\\
    4x^2 - 2 = 194\\
    3x - 6(3 - 4x) = 9x - 2\\
    3x - 2x(x - 1) = -2x^2 + 7x - 12\\
    \frac{x - 2}{4} = \frac{5}{4}x - x\\
    \frac{2x - 3}{7} = \frac{3x}{7} - 2x\\
    \frac{3}{2} - \frac{7x}{4} = \frac{5(2 - x)}{2} - 1

    \end{array}
    \]
    \end{document}
Joseph Wright
chogall
Posts: 2
Joined: Wed Jun 23, 2010 9:33 pm

Re: Display math problem

Post by chogall »

it works !

Thank you very much!

I will read about math mode more, but already did it, still not that used to it.
Post Reply