Graduate Integrating definite Heaviside function

Click For Summary
The discussion revolves around integrating a complex triple integral involving a Heaviside function and the function f(x) = x. The user successfully obtains the correct result using symbolic integration in Matlab but struggles to replicate this manually. Key points include the necessity to integrate over different subdomains defined by the Heaviside function and the importance of checking the limits of integration relative to c_4 - a. The manual integration process is detailed, highlighting how to handle cases based on the relationship between c_3, c_4, and a. The conversation emphasizes the complexity of manual integration compared to numerical methods for evaluating the integral.
bfeinberg
Messages
2
Reaction score
0
I am trying to integrate the following triple integral, which has a heaviside function in the inner most integral:$$ \frac{16}{c_{4}^{4}} \int_{0}^{c_{4}} c_{3}dc_{3} \int_{c_{3}}^{c_{4}} \frac{dc_{2}}{c_{2}} \int_{0}^{c_{2}}f(x)\left ( 1-H\left ( x-\left ( c_{4}-a \right ) \right ) \right )dx $$

where f(x)=x. I know ##c_{2}>0, c_{3}>0 , c_{4}>0, x>0 , a>0 ,$c_{4}>a##

I get the right answer (which I know already) using symbolic integration and the heaviside function in Matlab, which is:

$$1-4\frac{a^{2}}{c_{4}^{2}}+4\frac{a^{3}}{c_{4}^{3}}-\frac{a^{4}}{c_{4}^{4}}$$

However, it is not clear to me how to do this manually? I would like to know because I need to integrate this numerically for cases where f(x) is a more complicated function.

Many thanks in advance!
 
Last edited by a moderator:
Physics news on Phys.org
As with any function defined by different formulae on different subdomains, you need to integrate over each subdomain separately. Thus <br /> \int_a^b f(x)~(1 - H(x - c))\,dx = \begin{cases}<br /> 0 &amp; c \leq a, \\<br /> \int_a^c f(x)\,dx &amp; a &lt; c \leq b, \\<br /> \int_a^b f(x)\,dx &amp; b &lt; c. \end{cases}
 
Thanks for the reply. Unfortunately, this still doesn't seem to be giving me the right answer...? It is always true that ## a<c \leq b ## .

$$ \frac{16}{c_{4}^{4}} \int_{0}^{c_{4}} c_{3}dc_{3} \int_{c_{3}}^{c_{4}} \frac{dc_{2}}{c_{2}} \int_{0}^{c_{4}-a}f(x)dx $$

This gives me, upon my attempt at integration,

$$ 2 \frac{a^{2}}{{c_{4}}^2} - 4\frac{a}{c_{4}} + 2 $$

which unfortunately is not the same as the literature answer.
 
You can, of course, do the entire thing numerically because your integrand is just <br /> f(x)(1 - H(x - (c_4 - a))) = \begin{cases} f(x), &amp; 0 &lt; x &lt; c_4 - a \\<br /> 0, &amp; c_4 - a \leq x &lt; c_2\end{cases} which is no more difficult to evaluate numerically than f(x) itself.

Doing it manually requires us always to check where the limits of the integral fall in relation to c_4 - a, which given your constraints must lie between 0 and c_4, ie. within the limits of the outermost integral and therefore conceivably within the limits of the inner integrals.

Thus for f(x) = x we find that the innermost integral is <br /> \int_0^{c_2} x(1 - H(x - (c_4 - a)))\,dx = \frac12 \min\{(c_4 - a)^2, c_2^2\}. The next integral out is then <br /> \int_{c_3}^{c_4} \frac{1}{2c_2} \min\{(c_4 - a)^2, c_2^2\}\,dc_2. Hence if c_3 &lt; c_4 - a then <br /> \int_{c_3}^{c_4} \frac{1}{2c_2} \min\{(c_4 - a)^2, c_2^2\}\,dc_2 =<br /> \int_{c_3}^{c_4 - a} \frac{1}{2c_2} c_2^2\,dc_2 + \int_{c_4 - a}^{c_4} \frac{1}{2c_2} (c_4 - a)^2\,dc_2 \\ =<br /> \frac14 ((c_4 - a)^2 - c_3^2) + \frac{(c_4 - a)^2}{2} \log \left( \frac{c_4}{c_4 - a}\right)<br /> but if c_4 - a &lt; c_3 then <br /> \int_{c_3}^{c_4} \frac{1}{2c_2} \min\{(c_4 - a)^2, c_2^2\}\,dc_2 = \frac{(c_4 - a)^2}{2} \log \left( \frac{c_4}{c_3}\right). Now we can do the outermost integral which is <br /> \frac{16}{c_4^4} \int_0^{c_4 - a} \frac{c_3}4 ((c_4 - a)^2 - c_3^2) + \frac{c_3(c_4 - a)^2}{2} \log \left( \frac{c_4}{c_4 - a}\right)\,dc_3 +<br /> \frac{16}{c_4^4} \int_{c_4 - a}^{c_4}\frac{c_3(c_4 - a)^2}{2} \log \left( \frac{c_4}{c_3}\right)\,dc_3.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
1K
Replies
4
Views
3K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 7 ·
Replies
7
Views
1K
  • · Replies 20 ·
Replies
20
Views
4K
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
4
Views
2K