2

I am trying to integrate forces over an area for a personal project of mine. I simplified and extracted the integrals that i could, but i ended with these:

$$0.5 \int_0^1 \frac{x}{max(x(P_{1y} - P_{2y}) + P_{2y} - w, 0) + h} dx$$ that i try to resolve in the form of: $$ y = x(P_{1y} - P_{2y}) + P_{2y} - w $$ $$\int_0^1 \frac{x}{y(1 + sgn(y)) + 2h}dx$$ or $$\int_0^1 \frac{x}{y + abs(y) + 2h}dx$$

I also have other integrals where there is $x^2$, $x^3$ and $x^4$ instead of $x$ the numerator.

$P$ being the two points of a segment (x is between 0 and 1 and represents the linear interpolation between the two)

$w, P \in \mathbb{R} $ and $h \in \mathbb{R_{>0}}$

That is clearly defined over $\mathbb{R}$ and should have a fully defined result right?

But whatever i try i fall onto the derivative which isn't fully defined and yields odd results that make it unusable.

Integration over separate ranges could work, but the check for the intersection is $\frac{w-P_{2y}}{P_{1y} - P_{2y}}$ and is undefined when the two points are on the same y position, and checking it would require more checks which i am trying to avoid because it is used on a GPU simulation and it would slow down things significantly.

What methods are there solve these beyond the basic integration by parts or by substitution? (this is a personal project so as long as it works even with magic i'm a taker)

Wicpar
  • 21

0 Answers0