In the book I'm writing there are some parts with math-mode spaces and math-mode inline spaces that are too excessive for me. The first and the second image that I am reporting are taken directly from the textbook that makes the idea of excessive spacing (see some annotates red arrows).
Real first image taken from my book
Real second image taken from my book
Here there is a compilable MWE that reproduces the similar problem. I was asking myself if the spacing is normal or if there is something that I should fix either in the text or in the preamble.
\documentclass[a4paper,12pt]{article}
\usepackage[top=2.5cm,bottom=2.2cm,
left=3.2cm,right=1.5cm,headsep=10pt,
a4paper]{geometry}
\usepackage{amsmath,amssymb,mathrsfs}
\usepackage{newtxtext,newtxmath}
\showhyphens{matematica}
\begin{document}
\noindent Ovviamente deve essere $1-c^2>0$ e cioè $|c|<1$ perchè sia lecita la relazione \ldots. La costante arbitraria $c$ può avere segno qualsiasi; deve aversi cioè $\forall x\in ]a,b[, \,y'(x)=c/\sqrt{1-c^2}$ oppure $y'(x)=-c/\sqrt{1-c^2}$. Potrebbe essere $c=0$ compatibile solo con $y(a) = y(b)$, segmento parallelo all'asse $x$. Se $c\ne 0$, allora anche $c/\sqrt{1-c^2}\ne 0$, e dovendo $y'$ essere continua non può accadere che per certi $x\in ]a, b[$ valga il segno $+$ e per altri il segno $-$ (altrimenti $y'$ salterebbe senza assumere i valori intermedi fra $c/\sqrt{1-c^2}$ e $-c/\sqrt{1-c^2}$). Deve quindi valere $y'(x)=c/\sqrt{1-c^2}$ per ogni $x\in]a,b[$, oppure $y'(x)=-c/\sqrt{1-c^2}$ sempre per ogni $x\in]a,b[$: dato che $c$ è, come detto prima, costante di integrazione indeterminata, non si perde nulla a scrivere $y'(x)=c/\sqrt{1-c^2}$ qualunque sia $c$. Posto
$m=c/\sqrt{1-c^2}\in \mathbb{R}$, ed essendo $c$ variabile in $]-1,1[$ allora $m=c/\sqrt{1-c^2}$ assumerà tutti i valori reali. La soluzione generale dell'equazione di Eulero è $y(x)=mx+k$; dovendo essere $y(a)=\alpha$ ed $y(b)=\beta$ si ricava $ma+k=\alpha$ ed $mb+k=\beta$, da cui $m=(\beta-\alpha)/(b-a)$ e $k=\alpha-a(\beta-\alpha)/(b-a)$. Ma ci si poteva fermare una volta scoperto che $y'$ deve essere costante: questo prova che le uniche soluzioni sono segmenti di rette come il percorso più breve, e ce n'è uno solo che passa per due punti dati $(a,\alpha)$ e $(b,\beta)$, come ben sappiamo. La funzione integranda non dipende esplicitamente da $x$ quindi il funzionale è del tipo
\[\mathscr{F}(y)=\int_{a}^{b}f(y,y')\,dx\]
In questo caso l'equazione di Eulero-Lagrange
\[\frac d{dx} \frac{\partial f(y,y')}{\partial y'}-\frac{\partial f(y,y')}{\partial y}=0\]
Se poi $y$ è di classe $\mathcal{C}^2$ in $[a,b]$ diventa, dalla \eqref{elfd2}, per il teorema di derivazione delle funzioni composte,
\begin{equation}\label{edex}
f_{y}(y,y')-f_{y'y}(y,y')y'-f_{y'y'}(y,y')y''=0
\end{equation}
Moltiplicando la \eqref{edex} per $y'$, otteniamo l'equazione di Eulero-Lagrange è
\[\dfrac d{dx}(f-y'\,f_{y'})=0.\]
Infatti si ha
\[\begin{split}\dfrac d{dx}(f-y'\,f_{y'})&=f_y\,y'+f_{y'}\,y''-y''\,f_{y'}-(y')^2\,f_{yy'}-y'\,y''\,f_{y'y'}=\\
&=y'(f_y-y'\,f_{yy'}-y''f_{y'y'})=y'\cdot 0=0.\end{split}\]
\end{document}
The two outputs are:





\,. Those should be examined to see if they are really intended. – barbara beeton Jul 09 '19 at 20:16\,. Note that if you use the (horrible) French notation for intervals, it should be\mathopen]a,b\mathclose[– egreg Jul 09 '19 at 20:17\,and change every]a,b[to\mathopen]a,b\mathclose[. also use\fracnot\dfrac– David Carlisle Jul 09 '19 at 20:27