1

I'm learning Latex and I have some warnings and I don't know how to solve. It's about enviorment newtheorem and just later begin a equation*:

\documentclass[a4paper, 11pt]{article}

\usepackage[utf8]{inputenc} %alternativa: [latin1] \usepackage[T1]{fontenc} \usepackage[catalan]{babel} %alternativa: altres idiomes \usepackage{amsmath, amssymb, amsthm} \usepackage[margin=1in]{geometry} \usepackage[hidelinks]{hyperref} \usepackage{enumerate} \usepackage{array} \usepackage{graphicx} \usepackage{overpic} \usepackage{epstopdf} \usepackage{subcaption}

\author{OrPe a} \title{Successions i sèries de} \date{\today}

\newtheorem{defin}{Definició}[subsection] %Definició, exemple i teorema amb \newtheorem{exe}{Exemple}[subsection] \newtheorem{teo}{Teorema}[subsection]

\providecommand{\abs}[1]{\lvert#1\rvert} %Definició d'instrucció valor absolut.

\begin{document}

\maketitle %Títol i autor.

\begin{exe}

\begin{equation*}

f_n(x)=\frac{x}{1+nx}, \thickspace x>0. 

\end{equation*}  **WARNING: bad box underfull \hbox (badness 10000)**

\upshape
Estudiem el limit puntual de la successió de funcions, fixem $x>0$ i fem n gran: \newline

\begin{equation*}   

\lim_{n\to\infty}\frac{x}{1+nx}=x\lim_{n\to\infty}\frac{1}{1+nx}=0.

\end{equation*}

\upshape

Llavors, la successió de funcions $f_n$ convergeix puntualment a zero en $(0, +\infty)$.

Estudiem ara la convergència uniforme en aquest interval: $\displaystyle sup_{x\in (0, +\infty)} \abs{f_n(x)-0}<\epsilon?$\newline 

Estudiar aquest suprem és el mateix que trobar els màxims absoluts de les funcions $f_n$, derivem $f_n$:\newline

$\displaystyle f'_n(x)=\frac{1}{(1+nx)^2}>0\thickspace \forall x$, per tant les funcions $f_n(x)$ són estrictament creixents en aquest interval i estan acotades si x és gran. Conseqüentment: 

\begin{equation*}

    \lim_{n\to\infty} sup_{x\in(0, +\infty)}\abs{f_n(x)}= 0.

    \pagebreak

\end{equation*}     **SAME WARNING**

Per tant, $f_n$ convergeix uniformament a $f\equiv 0$ en $(0, +\infty)$. Observem que el gràfic$\thickspace$\ref{fig:grafic} a mida que n és gran les funcions s'aproximant més a zero.\\\\ %Referència a material flotant(gràfic).
\begin{figure}[h]

\centering
\includegraphics[scale=0.6]{conv.jpg} %Imatge d'una gràfica utilitzant \includegraphics
\caption{Gràfica de les funcions $f_n$.}
\label{fig:grafic}      
\end{figure}
    \end{exe}       

\end{document}

KersouMan
  • 1,850
  • 3
  • 13
  • 15
Oriol
  • 13
  • The solution for overfull boxes I employ is usually to adjust the text so that it breaks better between lines. LaTeX complains because the word that comes last in the line is not quite short enough to fit comfortably into its line, but breaking before makes the line too empty and breaking after the word even more too full. I usually ignore underfull boxes unless they are inside full text because in my experience I will get this complaint even when typesetting requirements dictate "underfull" boxes, such as on title pages and in environments, but otherwise employ same solution as for overfull – Plergux Dec 10 '20 at 10:53
  • 1
    @Plergux the underfill boxes here are clearly due to marku errors misplaced \newline so rewording will not help – David Carlisle Dec 10 '20 at 13:45
  • @DavidCarlisle Fair enough. – Plergux Dec 10 '20 at 13:56
  • see https://tex.stackexchange.com/questions/334246/what-does-the-phrase-underfull-hbox-badness-10000-in-paragraph-actually-mea/334249#334249 – David Carlisle Dec 10 '20 at 14:48

1 Answers1

1

Remove all your \newlines and \\s. You almost never need those in text. Leaving a blank line in the source code automatically generates a new paragraph; ending those lines also manually as you did was the cause of all the warnings.

Some miscellaneous comments:

  • Don't put manually \upshape everywhere. If the text of the examples should be upright then use a theorem style which employs upright text, as e.g.definition.
  • Don't leave blank lines before and after a displayed equation unless a new paragraph starts.
  • gràfic$\thickspace$\ref{...} should be gràfic~\ref{...}
  • if the math variables n and x occur in the middle of a sentence you must put also them in math mode with $n$, $x$.

A slightly better code (I removed the packages irrelevant to the issue):

\documentclass[a4paper, 11pt]{article}

\usepackage[utf8]{inputenc} %alternativa: [latin1] \usepackage[T1]{fontenc} \usepackage[catalan]{babel} %alternativa: altres idiomes \usepackage{mathtools}% loads amsmath \usepackage{amssymb,amsthm} \usepackage[margin=1in]{geometry}

\theoremstyle{definition} \newtheorem{exe}{Exemple}[subsection]

\DeclarePairedDelimiter{\abs}{\lvert}{\rvert} %Definició d'instrucció valor absolut.

\begin{document}

\begin{exe} \begin{equation} f_n(x)=\frac{x}{1+nx}, \quad x>0. \end{equation} Estudiem el limit puntual de la successió de funcions, fixem $x>0$ i fem $n$ gran: \begin{equation}
\lim_{n\to\infty}\frac{x}{1+nx}=x\lim_{n\to\infty}\frac{1}{1+nx}=0. \end{equation
} Llavors, la successió de funcions $f_n$ convergeix puntualment a zero en $(0, +\infty)$.

% Should this be really a paragraph on its own? Estudiem ara la convergència uniforme en aquest interval: $\sup_{x\in (0, +\infty)} \abs{f_n(x)-0}<\epsilon?$

Estudiar aquest suprem és el mateix que trobar els màxims absoluts de les funcions $f_n$, derivem $f_n$: \begin{equation} f'_n(x)=\frac{1}{(1+nx)^2}>0 \quad \forall x , \end{equation} per tant les funcions $f_n(x)$ són estrictament creixents en aquest interval i estan acotades si $x$ és gran. Conseqüentment: \begin{equation} \lim_{n\to\infty} \sup_{x\in(0, +\infty)} \abs{f_n(x)}= 0. \end{equation} Per tant, $f_n$ convergeix uniformament a $f\equiv 0$ en $(0, +\infty)$. Observem que el gràfic~\ref{fig:grafic} a mida que $n$ és gran les funcions s'aproximant més a zero.

\begin{figure} \centering \includegraphics[scale=0.3]{example-image} \caption{Gràfica de les funcions $f_n$.} \label{fig:grafic}
\end{figure}

\end{exe}

\end{document}

enter image description here

campa
  • 31,130