How Do You Integrate the Function |x|/x?

In summary: But that means that \phi_{y,z}= 0 so the partial derivatives are not, in fact, equal to the partials of -1/\sqrt{x^2+ y^2+ z^2}. But you should have learned the "gradient theorem" in your course on multivariable calculus. If f(x,y,z) is a "potential function" for a vector field, F(x,y,z), that is, if \nabla f= F, then \int_a^b F(x,y,z) dot dr= f(b)- f(a). That's what you should use here. Find a function f(x,y,z) whose gradient is (x, y, z) and
  • #1
Silva_physics
10
0
Hi! Could anybody, please, help me with integrate this: Integrate[ (|x| / x) dx]
Thank you:)
 
Mathematics news on Phys.org
  • #2
You need to understand the function first. What is |x|/x for certain values of x? Think of the cases x>0, x<0, x=0.
 
  • #3
Ok, thanks, I thought about it, so in the cases x>0,x<0 it is 1 and in x=0 it is 0, that's all?
 
  • #4
Welcome to PF!

Hiho Silva! Welcome to PF! :smile:
Silva_physics said:
Ok, thanks, I thought about it, so in the cases x>0,x<0 it is 1 and in x=0 it is 0, that's all?

Yup! :biggrin:

(except that at 0 it's undefined … though that won't affect the integration)
 
  • #5
Oh, Thanks:) I feel here like at home:D
 
  • #6
Silva_physics said:
Ok, thanks, I thought about it, so in the cases x>0,x<0 it is 1 and in x=0 it is 0, that's all?
NO! For x> 0 |x|/x= x/x= 1 but for x< 0, |x|/x= -x/x= -1. At x= 0 it is undefined.


If both a and b are less than 0 then [itex]\int_a^b |x|/x dx= -\int_a^b dx= -(b- a)= a- b[/itex].

If both a and b are larger than 0 then [itex]\int_a^b|x|/x dx= \int_a^b dx= b- a[/itex].

If a< 0 and b> 0 then
[tex]\int_a^b |x|/x dx= -\int_a^0 dx+ \int_0^b dx= -(0- a)+ (b- 0)= a+ b[/tex].
 
  • #7
oops … HallsofIvy is right :smile:
 
  • #8
Thanks a lot for the great answers!:)
 
  • #9
I have a very similar problem and can’t seem to work it out! Ok, here goes:

X/|X|^3 =grad U(X)​

which, when integrated gives

U(X)=- 1/|X|​

But I can’t seem to integrate to get the correct answer. Also, if

U(X)=- 1/|X|^v​

where v is a constant, then what is grad U(X) now? Thanks for reading and any help will be much appreciated!
 
  • #10
Are we to assume that X is a single real number and "grad" is just the derivative?

If that is the case, the, for x< 0, [itex]x/|x|^3= -1/x^2[/itex] and the integral is 1/x. If x> 0, [itex]x/|x|^3= 1/x^2[/itex] and the integral is -1/x.

If, however, X is the vector <x, y, z>, then the problem is not at all the same!
You are looking for a function U(x,y,z) such that
[tex]\left<\frac{\partial U}{\partial x}, \frac{\partial U}{\partial y}, \frac{\partial U}{\partial z}\right>= \left<\frac{x}{(x^2+ y^2+ z^2)^{3/2}}, \frac{y}{(x^2+ y^2+ z^2)^{3/2}}, \frac{z}{(x^2+ y^2+ z^2)^{3/2}}\right>[/tex]

And that's not terribly difficult.
To integrate
[tex]\frac{\partial U}{\partial x}= x(x^2+ y^2+ z^2}^{-3/2}[/tex]
with respect to x, let [itex]W= x^2+ y^2+ z^2[/itex]. Then, treating y and z as constants, dW= 2xdx and we have to integrate
[tex]\frac{1}{2}\int W^{-3/2}dW= -W^{-1/2}+ \phi(y,z)= -(x^2+ y^2+ z^2)^{-1/2}+ \phi(y,z)[/tex]
(Since the integration is done treating y and z as constant, the "constant of integration" may depend on y and z.)

Now, differentiate that with respect to y:
[tex](1/2)(x^2+ y^2+ z^2)^{-1/2}(2y)+ \phi_y= \frac{y}{\sqrt{x^2+ y^2+ z^2}}+ \phi_y[/tex]

Comparing that with the gradient, we see that [itex]\phi_y= 0[/itex] and so does not depend on y. Doing the same with z shows that [itex]\phi_z= 0[/itex] also and so it reallyis a constant.
 
Last edited by a moderator:

FAQ: How Do You Integrate the Function |x|/x?

1. What is the definition of integration?

Integration is a mathematical process used to find the area under a curve. It involves finding the antiderivative of a function and evaluating it at specific bounds.

2. How do you integrate absolute value functions?

To integrate absolute value functions, you can split the function into two parts, one for when the input is positive and one for when it is negative. You can then use the definition of integration to evaluate each part separately.

3. Can you provide an example of integrating |x|/x?

Yes, an example of integrating |x|/x is ∫|x|/x dx. By splitting the function into two parts, we get ∫x/x dx when x is positive and ∫-x/x dx when x is negative. Simplifying these expressions gives us ∫1 dx and ∫-1 dx, which evaluate to x and -x, respectively. Therefore, the overall integral is x + C when x is positive and -x + C when x is negative.

4. What is the purpose of the constant of integration in integration?

The constant of integration, denoted as C, is added to the result of an indefinite integral to account for all possible antiderivatives of a given function. It represents the family of curves that the original function belongs to.

5. How can I check if my integration solution is correct?

You can check your integration solution by taking the derivative of the antiderivative you found and comparing it to the original function. If the derivative matches the original function, then your integration solution is correct.

Similar threads

Replies
1
Views
869
Replies
1
Views
861
Replies
13
Views
2K
Replies
2
Views
1K
Replies
6
Views
4K
Back
Top