Integrating with a max function as denominator.
$begingroup$
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)
definite-integrals
$endgroup$
add a comment |
$begingroup$
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)
definite-integrals
$endgroup$
add a comment |
$begingroup$
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)
definite-integrals
$endgroup$
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)
definite-integrals
definite-integrals
edited Jan 9 at 15:55
Wicpar
asked Jan 9 at 0:35
WicparWicpar
113
113
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3066923%2fintegrating-with-a-max-function-as-denominator%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3066923%2fintegrating-with-a-max-function-as-denominator%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown