How to find the indefinite integral of $\sqrt{x^2}$ with respect to $x$ without simplifying it to $|x|$ (which would be wrong in a complex setting)?

What I wanted to know generally how to integrate symbolically a power of a power without simplifying it with the power-rule. Mathematica is giving:

$\int{(x^n)^a}{dx} = \frac{x(x^n)^a}{1+an}$

How does Mathematica find this formula? With substitution, table lookup or another technique?

  • $\begingroup$ Can you please give more information. Do you want a definite or indefinite integral? $\endgroup$ – Fly by Night Apr 1 '14 at 20:14
  • $\begingroup$ indefinite integral $\endgroup$ – Andrei Kh Apr 1 '14 at 20:16
  • $\begingroup$ You might like to add that to your question... $\endgroup$ – Fly by Night Apr 1 '14 at 20:17
  • 2
    $\begingroup$ In a complex setting $\sqrt{x^2}$ is either $x$ or $-x$, depending on which branch of the square root you choose. Each of these is simple to integrate. If you have a domain where both branches are used at different points, there will not be any antiderivative to find! $\endgroup$ – hmakholm left over Monica Apr 1 '14 at 21:47

Some ideas:

Method 1: Define $$g(x) = \frac{1}{2}x\sqrt{x^2}$$ and show that $$\lim_{h\rightarrow 0}\frac{g(a+h)-g(h)}{h}=\sqrt{a^2}$$ for every $a$. That is, $g^\prime(x) = \sqrt{x^2}$. Then invoke the Fundamental Theorem of Calculus.

Method 2 (physics): Integrate $$\int{\sqrt{x^2+c^2}} = \frac{1}{2}x\sqrt{x^2+c^2}+\frac{1}{2}c^2\log(x+\sqrt{x^2+c^2})$$ and put $c=0$.



$$\int \left(x^\frac{2}{2}\right) dx=\frac{2x^\frac{4}{2}}{4}=\frac{x^\frac{4}{2}}{2}$$

$$\therefore \frac{x^\frac{4}{2}}{2}=\frac{\sqrt{x^4}}{2}=\frac{x\sqrt{x^2}}{2}$$

(You don't take out the $x^2$, that's the only difference)

Here's a visual:

enter image description here

The curved one is the derivative. The slope is negative when $x$ is negative, and positive when $x$ is positive. If you just had $\frac{x^2}{2}$, it would be wrong because it would show that the slope is only positive.

  • 1
    $\begingroup$ Not sure whether you can do $\sqrt{x^2}=x^\frac{2}{2}$... Most people would say $x^\frac{2}{2}=x$, even if told $\exists x\neq\sqrt{x^2}$. $\endgroup$ – JMCF125 Apr 1 '14 at 20:26
  • 1
    $\begingroup$ @JMCF125 It's very unconventional but I don't think it's mathematically wrong. Plus, helps visualize the process of taking the integral. $\endgroup$ – Shahar Apr 1 '14 at 20:32
  • $\begingroup$ I guess you're right. +1 then. $\endgroup$ – JMCF125 Apr 1 '14 at 20:37
  • 1
    $\begingroup$ I think this is more sleight-of-hand than an actual derivation. Never mind the $\frac22$ -- how do you argue in a principled way that you can do $\sqrt{x^4}=x\sqrt{x^2}$ in the last step without also allowing $\sqrt{x^2}=x\sqrt{1}$? $\endgroup$ – hmakholm left over Monica Apr 1 '14 at 21:55
  • $\begingroup$ @HenningMakholm You need it to be negative when $x$ is negative. I showed a picture, check it. $\endgroup$ – Shahar Apr 1 '14 at 21:57

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.