1

Im a fresh new user of LaTex and I have to write a short mathematic report. I found a solution reading my manual but I can't solve the following problem, this is the interested piece of code

Sia \textbf{$\delta$b$\in$$\mathbb{R}$$^{n}$} 
il vettore delle perturbazioni dei termini noti del sistema

\begin{equation} \label{sys_eq} A(x)=b \end{equation}

e si indichi con

x + $\delta$x

la soluzione del sistema perturbato, avremo

\begin{displaymath} $$ A(x+$\delta$x)=b+$\delta$b $$ \end{displaymath}

And this is the result:

enter image description here

As you can see the first equation is properly centered, but I tried everything to center the second one without success. Can someone help me with this problem?

Sergio
  • 13
  • 2
  • 1
    displaymath is a math environment delete all the $ – David Carlisle Mar 05 '21 at 15:47
  • You are switching in and out of math mode a lot. In general you want to write one logical term/one equation in one math environment. \begin{displaymath} $$ A(x+$\delta$x)=b+$\delta$b $$ \end{displaymath} should just be \begin{displaymath} A(x+ \delta x)=b+ \delta b \end{displaymath}. Similarly x + $\delta$x should be $x + \delta x$. – moewe Mar 05 '21 at 15:49
  • @moewe yep I have deleted my comment as I noticed that!! – David Carlisle Mar 05 '21 at 15:51
  • \textbf{$\delta$b$\in$$\mathbb{R}$$^{n}$} also looks wrong. I'm not quite sure what you want to achieve, but I'm guessing it is more like $\delta \mathbf{b} \in \mathbb{R}^{n}$. – moewe Mar 05 '21 at 15:53
  • The reason why the second equation (a) isn't centered and (b) is placed far away from the material that precedes it is because \begin{displaymath} is cancelled by the first instance of $$, while the second instance of $$ cancels out \end{displaymath}. For more information on the properties of $$, \begin{displaymath}, and \end{displaymath} see, e.g., this answer -- shameless self-citation alert! -- to the question What are the differences between $$, [, align, equation and displaymath? – Mico Mar 05 '21 at 16:04

1 Answers1

2

If you delete most of the blank lines and $ then you get

enter image description here

\documentclass{article}
\usepackage{amsfonts}
\begin{document}

Sia $\delta b \in \mathbb{R}^{n}$ il vettore delle perturbazioni dei termini noti del sistema \begin{equation} \label{sys_eq} A(x)=b \end{equation} e si indichi con $x + \delta x$ la soluzione del sistema perturbato, avremo \begin{displaymath} A(x+\delta x)=b+\delta b \end{displaymath} \end{document}

Although perhaps you wanted to make b bold, it was not clear from the original markup.

David Carlisle
  • 757,742