3

I am writing some math on a paper i am writing for school, but the limit goes over the margin of the page, and this error occurs: overfull \hbox (73.27896pt too wide) detected at line 133

This is the preamble:

\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{tabularx}
\usepackage{natbib}
\usepackage{blindtext}
\usepackage[T1]{fontenc}
\usepackage{geometry}
\usepackage{titling}
\usepackage[english,italian]{babel}
\usepackage{url}
\geometry{a4paper, left=2.5cm, right=2.5cm, bottom=3.5cm, top=2.5cm}
\usepackage{siunitx}
\usepackage{subfig}
\usepackage[colorlinks=true, allcolors=blue]{hyperref} 
\usepackage{tikz}
\usepackage{circuitikz}
\usepackage{pgfplots}

\begin{document}

\noindent X\dotfill X
\begin{equation*}
    \lim_{h\to 0^\pm} \frac{f(x_0+h)-f(x_0)}{h}=\lim_{h\to 0^\pm} \frac{\sqrt[3]{(0+h)^3-1}-\sqrt[3]{(0)^3-1}}{h}=\lim_{h\to 0^\pm} \frac{\sqrt[3]{(h)^3-1}+1}{h}= \frac{0}{0} 
\end{equation*}
\end{document}

How can i solve it?

3
  • You can use align as Steven just posted but the code posted does not produce the warning that yoiu statem it does fit in the width specified. – David Carlisle May 5 at 19:40
  • Do you think that it's pedagogically good to write h\to0^{\pm}? I'm convinced of the contrary. There is no need, in general, to consider one sided limits. They can be used, but that's not required in all cases. – egreg May 5 at 20:32
  • I am defining left and right derivatives and the derivative at a point, here it's required often during tests. – etnaw May 6 at 19:27
6

Since it isn't a numbered equation, you could simply break up the lines with align*, using either 3 separate lines:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
    \lim_{h\to 0^\pm} \frac{f(x_0+h)-f(x_0)}{h}
  &=\lim_{h\to 0^\pm} \frac{\sqrt[3]{(0+h)^3-1}-\sqrt[3]{(0)^3-1}}{h}\\
  &=\lim_{h\to 0^\pm} \frac{\sqrt[3]{(h)^3-1}+1}{h}\\
  &= \frac{0}{0} 
\end{align*}
\end{document}

enter image description here

or two:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
    \lim_{h\to 0^\pm} \frac{f(x_0+h)-f(x_0)}{h}
  &=\lim_{h\to 0^\pm} \frac{\sqrt[3]{(0+h)^3-1}-\sqrt[3]{(0)^3-1}}{h}\\
  &=\lim_{h\to 0^\pm} \frac{\sqrt[3]{(h)^3-1}+1}{h} = \frac{0}{0} 
\end{align*}
\end{document}

enter image description here

0
4

Your equation is too wide to fit in the space available. LaTeX, unfortunately, is unable to break display math equations so you need to manage this manually. You'll generally do this with the align* environment. Use \\ to indicate line breaks and & for the alignment points. Since you have multiple = in your equation, this is traditionally where you break. Put & before each = and \\ at each line break as follows:

\begin{align*}
    \lim_{h\to 0^\pm} \frac{f(x_0+h)-f(x_0)}{h}&=\lim_{h\to 0^\pm}
                                                 \frac{\sqrt[3]{(0+h)^3-1}-\sqrt[3]{(0)^3-1}}{h}\\
                                               &=\lim_{h\to 0^\pm} \frac{\sqrt[3]{(h)^3-1}+1}{h}\\
                                               &= \frac{0}{0}
\end{align*}
0
3

For the equation at hand, it's easy to make it fit on a single line by letting the material below the \lim operators protrude on both sides.

enter image description here

\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{mathtools} % for \mathclap macro
\usepackage{geometry}
\geometry{a4paper, left=2.5cm, right=2.5cm, bottom=3.5cm, top=2.5cm}
\usepackage{titling}
\usepackage[english,italian]{babel}
\usepackage{xurl}
\usepackage[colorlinks=true, allcolors=blue]{hyperref} 

\begin{document}

\hrule% just to denote width of textblock
\[
 \lim_{\mathclap{h\to 0^\pm}} \frac{f(x_0+h)-f(x_0)}{h}
=\lim_{\mathclap{h\to 0^\pm}} \frac{\sqrt[3]{(0+h)^3-1}-\sqrt[3]{(0)^3-1}}{h}
=\lim_{\mathclap{h\to 0^\pm}} \frac{\sqrt[3]{(h)^3-1}+1}{h}
=\frac{0}{0} % huh?
\]
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.