Skip to main content
Home
plus.maths.org

Secondary menu

  • My list
  • About Plus
  • Sponsors
  • Subscribe
  • Contact Us
  • Log in
  • Main navigation

  • Home
  • Articles
  • Collections
  • Podcasts
  • Maths in a minute
  • Puzzles
  • Videos
  • Topics and tags
  • For

    • cat icon
      Curiosity
    • newspaper icon
      Media
    • graduation icon
      Education
    • briefcase icon
      Policy

    Popular topics and tags

    Shapes

    • Geometry
    • Vectors and matrices
    • Topology
    • Networks and graph theory
    • Fractals

    Numbers

    • Number theory
    • Arithmetic
    • Prime numbers
    • Fermat's last theorem
    • Cryptography

    Computing and information

    • Quantum computing
    • Complexity
    • Information theory
    • Artificial intelligence and machine learning
    • Algorithm

    Data and probability

    • Statistics
    • Probability and uncertainty
    • Randomness

    Abstract structures

    • Symmetry
    • Algebra and group theory
    • Vectors and matrices

    Physics

    • Fluid dynamics
    • Quantum physics
    • General relativity, gravity and black holes
    • Entropy and thermodynamics
    • String theory and quantum gravity

    Arts, humanities and sport

    • History and philosophy of mathematics
    • Art and Music
    • Language
    • Sport

    Logic, proof and strategy

    • Logic
    • Proof
    • Game theory

    Calculus and analysis

    • Differential equations
    • Calculus

    Towards applications

    • Mathematical modelling
    • Dynamical systems and Chaos

    Applications

    • Medicine and health
    • Epidemiology
    • Biology
    • Economics and finance
    • Engineering and architecture
    • Weather forecasting
    • Climate change

    Understanding of mathematics

    • Public understanding of mathematics
    • Education

    Get your maths quickly

    • Maths in a minute

    Main menu

  • Home
  • Articles
  • Collections
  • Podcasts
  • Maths in a minute
  • Puzzles
  • Videos
  • Topics and tags
  • Audiences

    • cat icon
      Curiosity
    • newspaper icon
      Media
    • graduation icon
      Education
    • briefcase icon
      Policy

    Secondary menu

  • My list
  • About Plus
  • Sponsors
  • Subscribe
  • Contact Us
  • Log in
  • Intriguing integrals: Part II

    by
    Chris Sangwin
    1 March, 2010
    March 2010

    You might also like to read the first part of this article.

    This article is about the integral of $x^k$, given by calculus using the formula \begin{equation} \label{eq:int_xk} \int x^k\mathrm{d}x = \frac{x^{k+1}}{k+1}. \end{equation} Of course, this equation is only correct for $k\neq -1$. If we try to take $k=-1$ the right hand side is meaningless because we have a zero on the denominator of the fraction, that is $\frac{1}{0}$. But in this case we actually know the answer is given by \begin{equation}\label{eq:int_log} \int x^{-1}\mathrm{d}x = \int \frac{1}{x}\mathrm{d}x = \ln(x).%\ln(|x|).\end{equation} In the first part of this article we derived (1) from first principles, but in this part we are going to examine the somewhat surprising suggestion that really, at a symbolic level, the answer to $\int x^k\mathrm{d}x$ might better be written as \begin{equation}\label{eq:int_xk2} \int x^k\mathrm{d}x = \frac{x^{k+1}-1}{k+1}. \end{equation}

    This suggestion was made rather cryptically in the article [1] referenced below. So why is (3) better than (1)?

    First consider the (easy) case $k\neq -1$. If we fix $k$ and differentiate $\frac{x^{k+1}-1}{k+1}$ then we obtain \[ \frac{\mathrm{d}}{\mathrm{d}x}\frac{x^{k+1}-1}{k+1} = x^k.\] So $$\frac{x^{k+1}-1}{k+1}=\frac{x^{k+1}}{k+1}-\frac{1}{k+1}$$ is an anti-derivative of $x^k$. When $k$ is fixed, the term $-\frac{1}{k+1}$ is a number, and so disappears when we differentiate with respect to $x$. In fact, when we integrate we should really add a constant of integration, so it is arguably better to write (1) as \[ \int x^k\mathrm{d}x = \frac{x^{k+1}}{k+1}+c. \] In formula (3) we have simply chosen a slightly different constant of integration than in (1), but that shouldn't cause any difficulties. What then is the point of (3)? Turning now to the case $k=-1$, whereas in (1) we had $$\frac{x^{0}}{0}=\frac{1}{0},$$ in (3) we obtain $$\frac{x^{0}-1}{0}=\frac{0}{0}.$$ Is this any more meaningful, and if so in what way? These are the questions we hope to answer.

    Does it matter?

    Leonhard Euler, 1707-1783, made significant contributions to the development of calculus.

    Leonhard Euler, 1707-1783, made significant contributions to the development of calculus.

    First let us consider why the exceptional case $k=-1$ matters. After all, it is only one point out of an infinity of other values for $k$. The formula (1) is valid for all $k\neq -1$, so why not just ignore this singular awkward case? Intriguingly, in mathematics such exceptional cases occur rather more often than you might expect if you just stuck a pin in the number line, or even if you chose an integer $k$ at random. The article [1], where the suggestion that (3) might be better than (1) appears, is concerned with computer algebra systems, which are rather like advanced calculators. They can manipulate algebraic expressions and perform symbolic manipulations such as differentiation and integration. They work at a symbolic level — just as we are when we are manipulating expressions containing letters to represent numbers — rather than by using approximate numerical values. In a symbolic machine that does not know a value for $k$, automatically using the formula (1) might result in an error creeping into a much longer calculation. Mistakes like this are very hard to track down and can lead to serious malfunctioning of the whole program.

    The special case k=-1 and Euler's special formula

    If we try to substitute $k=-1$ into the right hand side of $$ \int x^k\mathrm{d}x = \frac{x^{k+1}-1}{k+1}, $$ we end up with the indeterminant form \[ \frac{x^0-1}{0}=\frac{0}{0},\] which is essentially meaningless. To understand what is going on, we need to look at this expression for $k$ close to $-1$ and take a limit, that is \[ \lim_{k\rightarrow -1} \frac{x^{k+1}-1}{k+1}.\] If we can make sense of this limit, then we will define the value of the expression at $k=-1$ by the value of the limit, thus removing the exceptional case in a meaningful way. This sort of thing is a standard mathematician's move.

    To do this we shall make use of a formula discovered by Leonhard Euler. Euler showed that $$ e^x = \lim_{n\rightarrow\infty} \left( 1+\frac{x}{n}\right)^n. $$ You can see that this is true in the applet below: use the slider to increase the value of $n$ and see the graphs of $$\left( 1+\frac{x}{n}\right)^n$$ get closer and closer to the graph of $e^x$, given by the dotted red line.

    Sorry, the GeoGebra Applet could not be started. Please make sure that Java 1.4.2 (or later) is installed and active in your browser (Click here to install Java now)

    Use the slider to increase n and see the curves converge. Created with GeoGebra

    If you are still skeptical, here is a proof of this identity.

    At first glance, the limit $$ \lim_{n\rightarrow\infty}\left( 1+\frac{x}{n}\right)^n$$ appearing in this formula looks very different from the limit we're after, namely \[ \lim_{k\rightarrow -1} \frac{x^{k+1}-1}{k+1}.\] But it turns out that we can transform one into the other. Let's start by considering $$ x = \left( 1+\frac{y}{n}\right)^n. $$ Rearranging this we have \[ x^{\frac{1}{n}} = 1 + \frac{y}{n}\] and then \[ y = n \left(x^{\frac{1}{n}} -1\right).\] Let $m=\frac{1}{n}$ so \[ y = \frac{1}{m} \left(x^{m}-1\right)=\frac{x^m-1}{m}.\] Now, set $m=k+1$, to give \[ y =\frac{x^{k+1}-1}{k+1}\] and we are coming somewhat closer to the right hand side of (3). If $k\rightarrow -1$, then $m\rightarrow 0$ and $n=\frac{1}{m}\rightarrow \infty$. But if $n\rightarrow \infty$ then we may apply Euler's formula to the expression $$ x = \left( 1+\frac{y}{n}\right)^n. $$ and conclude that $x=e^y$. Taking the inverse gives $y=\ln(x)$. Hence \[ \lim_{k\rightarrow -1} \frac{x^{k+1}-1}{k+1} = \ln(x).\] The applet below shows how as $k\rightarrow -1$, the graphs of $\frac{x^{k+1}-1}{k+1}$ converge to the graph of $\ln(x)$, given by the red dotted line.

    Sorry, the GeoGebra Applet could not be started. Please make sure that Java 1.4.2 (or later) is installed and active in your browser (Click here to install Java now)

    Use the slider to change the value of k and see the curves converge. Created with GeoGebra

    So we can say that (3) is indeed valid for all $k$, including the special case $k=-1$, when we define the value of (3) in this case by the limit $\lim_{k\rightarrow -1}.$ This limit happens to give the right answer to the integral for $k=-1.$ In this sense (3) is indeed somewhat better than (1). The key to all of this is to choose the constant of integration in (1) so that the resulting formula also holds in the awkward limiting case, $k=-1.$ This sort of arbitrary choice looks like a "wizard's trick" the first time you see it, but like many tricks in mathematics it is a technique which occasionally has useful applications elsewhere.

    Have a go yourself

    If this article has inspired you to do some calculus, here is a problem for you:

    Write $\frac{1}{x} = \frac{1}{x^3}x^2$. Integrate the right hand side by parts. Explain why this, and any similar method, fails to find the integral of $\frac{1}{x}$.


    Reference

    [1] D.R. Stoutemyer, Crimes and misdemeanors in the computer algebra trade, Notices of the American Mathematical Society, 38(7):778--785, September 1991.



    Chris Sangwin is a member of staff in the School of Mathematics at the University of Birmingham. He has written the popular mathematics books Mathematics Galore!, with Chris Budd, and How round is your circle? with John Bryant, and edited Euler's Elements of Algebra.

    • Log in or register to post comments

    Read more about...

    calculus
    integration

    Our Podcast: Maths on the Move

    Our Maths on the Move podcast brings you the latest news from the world of maths, plus interviews and discussions with leading mathematicians and scientists about the maths that is changing our lives.

    Apple Podcasts
    Spotify
    Podbean

    Plus delivered to you

    Keep up to date with Plus by subscribing to our newsletter or following Plus on X or Bluesky.

    University of Cambridge logo

    Plus is part of the family of activities in the Millennium Mathematics Project.
    Copyright © 1997 - 2025. University of Cambridge. All rights reserved.

    Terms