Numerical integration with boundary conditions

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I have $N$ equally spaced samples (hundreds or thousands) of the second derivative of a function. I do not have derivatives of any other order. The second derivative has occasional rapid changes (almost-jumps).



The samples are noisy. A repeated Newton-Cotes integration therefore tends to produce offsets between the beginning and end, as errors tend to accumulate quadratically.



I can choose my sample interval such that the desired function is effectively a constant zero both at the beginning and end.



Is there a numerical integration method that can take these boundary conditions into account? Ideally I wouldn’t mind doing the whole double integration in one step, but I’ll settle for a method that does a single integration (I can then repeat it).







share|cite|improve this question















  • 1




    Integrate once and you get the first derivative plus an unknown constant $c_1$. Integrate again and you get the function plus an unknown linear term $c_1x+c_2$. Solve for $c_1$ and $c_2$ using the two boundary conditions.
    – Rahul
    Jul 23 at 9:45















up vote
0
down vote

favorite












I have $N$ equally spaced samples (hundreds or thousands) of the second derivative of a function. I do not have derivatives of any other order. The second derivative has occasional rapid changes (almost-jumps).



The samples are noisy. A repeated Newton-Cotes integration therefore tends to produce offsets between the beginning and end, as errors tend to accumulate quadratically.



I can choose my sample interval such that the desired function is effectively a constant zero both at the beginning and end.



Is there a numerical integration method that can take these boundary conditions into account? Ideally I wouldn’t mind doing the whole double integration in one step, but I’ll settle for a method that does a single integration (I can then repeat it).







share|cite|improve this question















  • 1




    Integrate once and you get the first derivative plus an unknown constant $c_1$. Integrate again and you get the function plus an unknown linear term $c_1x+c_2$. Solve for $c_1$ and $c_2$ using the two boundary conditions.
    – Rahul
    Jul 23 at 9:45













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I have $N$ equally spaced samples (hundreds or thousands) of the second derivative of a function. I do not have derivatives of any other order. The second derivative has occasional rapid changes (almost-jumps).



The samples are noisy. A repeated Newton-Cotes integration therefore tends to produce offsets between the beginning and end, as errors tend to accumulate quadratically.



I can choose my sample interval such that the desired function is effectively a constant zero both at the beginning and end.



Is there a numerical integration method that can take these boundary conditions into account? Ideally I wouldn’t mind doing the whole double integration in one step, but I’ll settle for a method that does a single integration (I can then repeat it).







share|cite|improve this question











I have $N$ equally spaced samples (hundreds or thousands) of the second derivative of a function. I do not have derivatives of any other order. The second derivative has occasional rapid changes (almost-jumps).



The samples are noisy. A repeated Newton-Cotes integration therefore tends to produce offsets between the beginning and end, as errors tend to accumulate quadratically.



I can choose my sample interval such that the desired function is effectively a constant zero both at the beginning and end.



Is there a numerical integration method that can take these boundary conditions into account? Ideally I wouldn’t mind doing the whole double integration in one step, but I’ll settle for a method that does a single integration (I can then repeat it).









share|cite|improve this question










share|cite|improve this question




share|cite|improve this question









asked Jul 23 at 9:30









user3139990

132




132







  • 1




    Integrate once and you get the first derivative plus an unknown constant $c_1$. Integrate again and you get the function plus an unknown linear term $c_1x+c_2$. Solve for $c_1$ and $c_2$ using the two boundary conditions.
    – Rahul
    Jul 23 at 9:45













  • 1




    Integrate once and you get the first derivative plus an unknown constant $c_1$. Integrate again and you get the function plus an unknown linear term $c_1x+c_2$. Solve for $c_1$ and $c_2$ using the two boundary conditions.
    – Rahul
    Jul 23 at 9:45








1




1




Integrate once and you get the first derivative plus an unknown constant $c_1$. Integrate again and you get the function plus an unknown linear term $c_1x+c_2$. Solve for $c_1$ and $c_2$ using the two boundary conditions.
– Rahul
Jul 23 at 9:45





Integrate once and you get the first derivative plus an unknown constant $c_1$. Integrate again and you get the function plus an unknown linear term $c_1x+c_2$. Solve for $c_1$ and $c_2$ using the two boundary conditions.
– Rahul
Jul 23 at 9:45
















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',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2860171%2fnumerical-integration-with-boundary-conditions%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2860171%2fnumerical-integration-with-boundary-conditions%23new-answer', 'question_page');

);

Post as a guest













































































Comments

Popular posts from this blog

What is the equation of a 3D cone with generalised tilt?

Color the edges and diagonals of a regular polygon

Relationship between determinant of matrix and determinant of adjoint?