3
$\begingroup$

$$\int |x|^3 \; dx $$ In my module it is suggest to use integration by parts,

$$ \text{ Set }I = \int (|x|^3 \cdot 1) \; dx = |x|^3 \cdot x - \int \color{red}{\frac {x^3}{|x|^3}3x^2}\cdot x \; dx$$

$$ \implies I = |x|^3 \cdot x - \color{red}{3\int |x|^3\;} dx$$

$$ \implies I = \frac 1 4 |x|^3 \cdot x +C $$

I am having trouble understanding the red parts, to be precise the differentiation of $|x|^3 $. I will also appreciate if somebody wants to share a different approach (if any).

Thanks,

  • 5
    "share a different approach" - split at $x=0$, and treat the two cases separately.2012-04-28
  • 0
    @J. M.: I have never evaluated a definite integral by splitting. However, I would love to know about this technique, could you please point me some (worked out) examples first?2012-04-28
  • 0
    You have two integrals to evaluate, $\int x^3\mathrm dx$ for $x \geq 0$, and $\int (-x^3)\mathrm dx$ for $x < 0$. You get two results. Reconcile them, remembering how the absolute value and the sign function are defined.2012-04-28
  • 0
    @Foool how did you get the red color in your latex? Sorry that is not exactly on topic.2012-04-28
  • 0
    @MaoYiyi: \color{red}{\text{ I am red }}: $\color{red}{\text{ I am red }}$2012-04-28
  • 0
    or you could have just clicked on edit button under the question to see the back stage awesomeness, @MaoYiyi2012-04-28
  • 0
    @SauravTomar I tried that several times, even totally reloading the page, and checking the code of the page, but every time, I got nothing. I have trouble loading non-local websites from the country I am in.2012-05-01
  • 0
    @Foool thanks, that was the detail I was looking for. I don't know why hovering the cursor didn't show the latex code, but this sites half loads for me most of the time.2012-05-01
  • 0
    @MaoYiyi try clicking on the "edit" link just below the answer, there you will see the code , and if you are having some problems with the site then you should ask around in the chat ,I am sure you will get help, :-)2012-05-01

6 Answers 6

4

In retrospect the below is actually not a good answer. Indeed, $x/|x|$ in place of the sign function might have been intended to either avert defining a new function or an attempt to express $\mathrm{sgn}(x)$ purely in terms of elementary functions, but this direction is problematic. The below reasoning works when the region of integration exists strictly on one side of $0$ on the real line, but by its construction it does not work when the region of integration contains $0$; the fundamental theorem of calculus is not valid across singularities.

(More generally, if we remove the appropriate points from the domain to avert the singularities, the FTC only applies on each connected component of the domain individually, and not more than one at a time; the primitive, or antiderivative, associated to each component can be modified by a $+C$ after all.) Technically it is a removable singularity so we can make it work out, but this is an unnecessarily roundabout solution method with no advantage to it.

(Deleting points from the domain and considering $x\mapsto|x|$ a piecewise differentiable function is useful in general for finding an explicit derivative when we have the absolute value composed with other complicated functions, but the same exact caveat applies in the context of integration.)


We can use the chain rule on $f(x)=|x|$ and $g(x)=x^3$, so we reduce to differentiating $|x|$. The derivative does not exist at zero (geometrically, this should be obvious), so we address two possible cases: $x>0$ and $x<0$. In the former, we differentiate as usual and we have $D|x|=1$. In the latter we have $|x|=-x$ so we conclude $D|x|=-1$. (Again this should be obvious, geometrically.) This is the sign function, and it can be written $\mathrm{sgn}(x)=x/|x|$ outside of $x=0$. Applying these facts,

$$\frac{d}{dx}|x|^3=\frac{d}{dx}|x^3|=\mathrm{sgn}(x^3)\cdot \frac{d}{dx}x^3=\frac{x^3}{|x^3|}\cdot3x^2=\frac{x^3}{|x|^3}\cdot3x^2.$$

At least I assume that's what they're getting at.

  • 0
    So, this is how we evaluate $$ \frac{d}{dx}|x|^n=\frac{d}{dx}|x^n|=\mathrm{sgn}(x^n)\cdot n.x^{n-1}=\frac{x^n}{|x|^n}\cdot n.x^{n-1} $$ for all $n >1$?2012-04-28
  • 0
    @Foool: It applies in that case too, yes.2012-04-28
  • 0
    $\space$ Thanks a lot!2012-04-28
  • 1
    To introduce the non differentiable function $f:x\mapsto|x|$ is not necessary. An alternative is to apply the usual integration by parts formula to the differentiable functions $u:x\mapsto|x|^3$ and $v:x\mapsto x$.2012-04-28
  • 0
    @Didier: Indeed. Since the question already provides a function undefined at $x=0$, I figured this route (which attracted me because it is easily amenable to generalization) was thus open for use (and in this case, we have that $|x|$ is differentiable on our domain $(-\infty,0)\cup(0,\infty)$).2012-04-28
  • 0
    Indeed, the question unadvisedly uses the function $x\mapsto x^3/|x|^3$, undefined at $x=0$. Why one should confort the OP in this unfortunate strategy is a mystery to me. It seems much preferable, IMHO, to stress that **here lies the problem** and to expose a proof avoiding it (since there is one).2012-04-28
  • 0
    @Didier: The problem you refer to is in integrating over intervals containing $0$, I take it? \\ I decided to take the unfortunate strategy as a given. Perhaps also ill-adivsed..2012-04-28
  • 0
    Precisely my point: the domain is not $(-\infty,0)\cup(0,+\infty)$ but $(-\infty,+\infty)$ and the singularity at $0$ is only caused by the method. As if, to differentiate the sine function, one suddenly decided to apply the chain rule to the product of the cosine function by the tangent function, only to discover that the tangent function is not defined everywhere.2012-04-28
  • 0
    Didier: I agree, and have updated my answer. Thanks for the help. \\ Might as well ping @Foool too.2012-04-28
  • 0
    Thanks, this explains the differentiation part, but I still don't understand how $\int \frac {x^3}{|x|^3}3x^2\cdot x \; dx = 3\int |x|^3\; dx$ ...2012-04-28
  • 0
    Foool: We still do not know why you are so keen on this $x^3/|x|^3$ thing... Anyway, the identity $(x^3/|x|^3)\cdot3x^3=3|x|^3$ for every nonzero real number $x$ is rather obvious, I would say.2012-04-28
3

Let $u:x\mapsto|x|^3$. Then $u(x)=x^3$ for $x\gt0$ hence $u'(x)=3x^2$ for $x\gt0$. Likewise $u(x)=-x^3$ for $x\lt0$ hence $u'(x)=-3x^2$ for $x\lt0$. Finally, a direct computation yields $u'(0)=0$. To sum up, $u$ is differentiable everywhere and $u'(x)=\mathrm{sgn}(x)\cdot3x^2$ for every $x$, where $\mathrm{sgn}(x)$ is defined as the sign of $x$ if $x\ne0$ and as anything one wants if $x=0$.

Alternative formulations of $\mathrm{sgn}(x)$ when $x\ne0$ are $x/|x|$ or $x^3/|x|^3$ or a number of equivalent other ones, but I fail to see their advantage over the canonical expression of $u'$ given above.

In the end, modulo the odd expression of $u'(x)$, the method in this post is a perfectly legitimate application of the integration by parts formula $\int uv'=\left[uv\right]-\int u'v$, to the functions $u$ as above, and $v:x\mapsto x$ with derivative $v':x\mapsto1$. Note that the functions $u$, $v$, $u'$ and $v'$ used in the integration by parts are defined everywhere, the point $0$ included.

  • 0
    +1; I quite prefer splitting to integration by parts myself for this case...2012-04-28
  • 0
    @J.M. I would not use integration by parts either but this is the method the question asks about and it can be made to work.2012-04-28
1

Recall that $|x| = \sqrt {x^2}$. So $|x|^3 = (\sqrt {x^2}) ^3 = (x^2)^{3/2}$. Differentiating , you get $$\frac{ 3}{2} (x^2)^{1/2}\cdot 2x = 3x |x|.$$

  • 1
    Try to read the question again. (y)2012-04-28
  • 0
    @IshaanSingh: why the down votes? the OP said he needed precisely the differentiation of $|x|^3. no?2012-04-28
  • 1
    I didn't down vote, idk why others down voted it. Hmm yes, he(OP) did. I'll up vote you.2012-04-28
1

Find the primitive of $x^3$ for $x>0$,and the primitive of $-x^3$ for $x<0$. Then the primitive you want is : $\frac{x^4}{4}$ for $x>0$, $\frac{-x^4}{4}$ for $x<0$ and for $x=0$ it must be $0$ since a primitive function is continuous. (But if you have to use integration by parts this solution is not what you want).

1

Let $\displaystyle I= \int|x|^3 dx$

\begin{align*}I =& \int x^2|x| dx \\ =& |x|\int x^2 dx - \int\frac{d}{dx}(|x|)\left(\int x^2 dx \right)dx \\ =&\frac{|x|x^3}{3} - \int\left(\frac{|x|}{x}\cdot\frac{x^3}{3}\right)dx \text{ since } \frac{d}{dx}(|x|) = \frac{|x|}{x} \\ =&\frac{|x|x^3}{3} - \frac{1}{3}\int|x|x^2dx \\ =&\frac{|x|x^3}{3} - \frac{I}{3}\end{align*}

That implies,

\begin{align*}I + \frac{I}{3} =& \frac{|x|x^3}{3} \\ \frac{4I}{3} =& \frac{|x|x^3}{3} \\ 4I =& |x|(x^3)\end{align*}

Therefore $\displaystyle I = \frac{|x|x^3}{4}$

0

Given that $|x|=x \operatorname{sgn}(x)$ have: $|x|^3=x^3\operatorname{sgn}(x)^3$.

Hence we have: \begin{align*} \int |x|^3 ~dx & = \int x^3 \operatorname{sgn}(x)^3 ~dx \\ & = \operatorname{sgn}(x)^3 \int x^3 ~dx \\ & = \operatorname{sgn}(x)^3 \frac{x^4}{4} \\ & = \frac{1}{4}x^3 \operatorname{sgn}(x)^3 x \\ & = \frac{1}{4}|x|^3 x. \end{align*}

  • 0
    -1. Despite the puzzling upvote, this is wrong.2012-07-15