Monday, November 3, 2014

Derivative of abs(x) and Integrals of abs(x), abs(e^x), abs(e^(a*x) + e^(a*y))

Derivative of abs(x) and Integrals of abs(x), abs(e^x), abs(e^(a*x) + e^(a*y))

For this blog entry, assume that are functions are in terms of x and a, x, y represent real numbers.

Definition of abs(x) (also symbolized as |x|)

Piecewise definition:

abs(x) = x if x > 0
abs(x) = 0 if x = 0
abs(x) = -x if x < 0

Also:

abs(x) = x * sign(x)

Where the sign(x), sometimes labeled sgn(x), is the sign or signum function. It is defined as:

sign(x) = 1 for x > 0
sign(x) = 0 for x = 0
sign(x) = -1 for x < 0

d/dx sign(x)

We can clearly demonstrate that d/dx sign(x) = 0 since:

d/dx sign(x) = 0 for x > 0
d/dx sign(x) = 0 for x = 0
d/dx sign(x) = 0 for x < 0

d/dx abs(x)

Using the chain rule:
d/dx abs(x)
= d/dx (x * sign(x))
= d/dx (x) * sign(x) + x * d/dx (sign(x))
= sign(x)

This can also be done with the piecewise representation:

d/dx abs(x) = 1 if x > 0
d/dx abs(x) = 0 if x = 0
d/dx abs(x) = -1 if x < 0

∫ abs(x) dx

∫ abs(x) dx
= ∫ x * sign(x) dx

Using integration by parts:
where u = sign(x), dv = x dx
Then: du = 0 dx, v = x^2/2

∫ abs(x) dx
= ∫ x * sign(x) dx
= x^2/2 * sign(x) - ∫ 0 dx
= x^2/2 * sign(x) + C

C is the arbitrary integration constant

With the piecewise representation:

∫ abs(x) dx = x^2/2 if x > 0
∫ abs(x) dx = 0 if x = 0
∫ abs(x) dx = -x^2/2 if x <0

Note that this is x^2/2 * sign(x).

∫ abs(e^(a*x)) dx

∫ abs(e^(a*x)) dx
= ∫ e^(a*x) * sign(e^(a*x)) dx
= 1/a * e^(a*x) * sign(e^(a*x)) - ∫ 0 dx
= 1/a * e^(a*x) * sign(e^(a*x)) + C

∫ abs(e^(a*x) + e^(a*y)) dx

∫ abs(e^(a*x) + e^(a*y)) dx
= ∫ (e^(a*x) + e^(a*y)) * sign(e^(a*x) + e^(a*y)) dx
= (e^(a*x)/a + x*e^(a*y)) * sign(e^(a*x) + e^(a*y)) - ∫ 0 dx
= (e^(a*x) + a*x*e^(a*y))/a * sign(e^(a*x) + e^(a*y)) + C

Eddie

This blog is property of Edward Shore. 2014

(Blog Entry # 401)

No comments:

Post a Comment

HP Prime and Casio fx-CG50: Trapezoid Midsegment, Height, Area

HP Prime and Casio fx-CG50:  Trapezoid Midsegment, Height, Area The program TRAPEZ calculates the following: Midsegment leng...