Integration of Modulus Functions
What is Modulus function ?
Modulus function also known as absolute value function, is a function that removes the negative sign and returns the non-negative value.
We can also understand in this way that the modulus function is such as machine in which we enter negative or positive numbers, its always gives positive numbers. Modulus function represent by vertical bars surrounding the number i.e. |x|.
Mathematically, for real number,the modulus function is defined as
$$ |x|=\begin{cases} x, & \text{if } x \geq 0 \\ -x, & \text{if } x < 0 \end{cases} $$ Example:- |-5|=5, |6|=6, |-3.5|=3.5
How to integrate the modulus functions ?
To integrate a modulus function (|g(x)|), we need to consider the different cases where the argument of the modulus is positive and where it’s negative. So, we break into three cases-
Case-1.If g(x) ≥ 0 for all x in an interval [a, b], then $$ \int_a^b |g(x)|\,dx=\int_a^b g(x)\,dx $$ .
Case-2.If g(x) ≤ 0 for all x in an interval [a, b], then $$ \int_a^b |g(x)|\,dx=-\int_a^b g(x)\,dx $$ .
Case-3. If g(x) change the sign within the interval, then we break the interval into subinterval
if g(x) ≤ 0 for all x in an interval [a, c], then
$$ \int_a^b |g(x)|\,dx=-\int_a^c g(x)\,dx $$ and
If g(x) ≥ 0 for all x in an interval [c, b], then $$ \int_a^b |g(x)|\,dx=\int_c^b g(x)\,dx $$ then we get
$$ \int_a^b |g(x)|\,dx=-\int_a^c g(x)\,dx +\int_c^b g(x)\,dx $$ where c is critical point and c in an interval [a,b]
Example- Evaluate \(\int_2^7 |x-5|\,dx\).
Solution- First We find the critical points, so x-5=0 ⇒ x=5
$$ |x-5|=\begin{cases} x-5, & \text{if } x \geq 5 \\ -(x-5), & \text{if } x < 5 \end{cases} $$
$$ \int_2^7 |x-5|\,dx = -\int_2^5 (x-5)\,dx +\int_5^7 (x-5)\,dx $$ $$=-[\frac{x^2}{2}-5x]_2^5 + [\frac{x^2}{2}-5x]_5^7 $$ \(=-[(\frac{5^2}{2}-5\times5)-(\frac{2^2}{2}-5\times 2)] \) \(+[(\frac{7^2}{2}-5\times7)-(\frac{5^2}{2}-5\times 5)] \)
\( =-[(\frac{25}{2}-25)-(2-10)]+[(\frac{49}{2}-35)-(\frac{25}{2}-25)]\) $$=-[-\frac{25}{2}+8]+[-\frac{21}{2}+\frac{25}{2}]$$ $$=-[-\frac{9}{2}]+[\frac{4}{2}]=\frac{9}{2}+\frac{4}{2}$$ $$= \frac{13}{2}$$
Example- Evaluate \(\int_{-1}^{1} e^{|x|}\,dx\)
Solution- For critical point |x|=0 ⇒ x=0 in an interval [-1, 1]
\(\int_{-1}^{1} e^{|x|}\,dx\)=\(\int_{-1}^{0} e^{-x}\,dx\) +\(\int_{0}^{1} e^{x}\,dx\)
= \([-e^{-x}]_{-1}^0\)+\([e^{x}]_0^1\) =\((-1+e^1)+(e^1-1)\)\(= 2e-2\)
Questions and Answers on integration of modulus functions
Question.1 Evaluate \(\int_{0}^{1} |5x-3| \, dx\)
Question.2 Evaluate \(\int_{-5}^{5} |x-2| \, dx\)
Question.3 Evaluate \(\int_{0}^{2} |x^2+2x-3| \, dx\)
Question.4 Evaluate \(\int_{0}^{3a} |x^2-a^2| \, dx\) , a>0
Question.5 Evaluate \(\int_{-1}^{2} |x^3-x| \, dx\)
Question.6 Evaluate \(\int_{0}^{6} |x-7| \, dx\)
Answers- (1) \(\frac{13}{10}\) (2) 29 (3) 4 (4) \( \frac{22a^3}{3}\) (5) \(\frac{11}{4}\) (6) 24