Integrating definite Heaviside function

Click For Summary

Discussion Overview

The discussion revolves around the integration of a triple integral involving a Heaviside function, specifically in the context of numerical and symbolic integration. Participants explore methods to evaluate the integral manually and compare results with known answers from literature.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant presents a triple integral with a Heaviside function and seeks clarification on manual integration methods, noting that symbolic integration in Matlab yields a specific result.
  • Another participant suggests integrating over subdomains defined by the Heaviside function, providing a piecewise approach to the integral.
  • A subsequent reply indicates that the proposed piecewise integration does not yield the expected result, despite the assumption that \( a < c \leq b \) holds true.
  • Another participant proposes a numerical approach to the integration, emphasizing the need to check the limits of the integral in relation to \( c_4 - a \) and providing detailed steps for evaluating the innermost integral.
  • This participant also outlines how to handle cases where \( c_3 < c_4 - a \) and \( c_4 - a < c_3 \), detailing the resulting integrals and their evaluations.

Areas of Agreement / Disagreement

Participants express differing views on the correct method for manual integration, with no consensus reached on the validity of the approaches discussed. The results of the integration attempts also vary, indicating ongoing disagreement.

Contextual Notes

The discussion highlights the complexity of integrating functions defined by piecewise conditions, particularly when involving Heaviside functions. Participants note the importance of understanding the limits of integration and the behavior of the integrand across different domains.

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
2K
Replies
4
Views
3K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 7 ·
Replies
7
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 20 ·
Replies
20
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
4
Views
2K