Evaluate integral $int_{-2}^0 x^2+x dx$ using Riemann Sum












2












$begingroup$


Consider the integral $$int_{-2}^0 x^2+x dx.$$



The question says to use Riemann Sum theorem which is $$sum_{i=1}^nf(x_i)delta x$$
I know that $delta x= frac{-2}{n}$ and that $x_i=-2+(frac{2}{n}i)$



After i plug everything in I get $$sum_{i=1}^nfrac{2}{n}left(-2-frac{2}{n}iright)^2+left(-2-frac{2}{n}iright)$$



After completing the square I have $$frac{2}{n}sum_{i=1}left(4-frac{8}{n}iright)+left(frac{4}{n^2}i^2right)+left(-2-frac{2}{n}iright)$$



I know that $i=left(frac{(n+1)}{2}right)$ and $i^2=left(frac{(n+1)(2n+1)}{6}right)$
but how do I manipulate the equation so that I can use them?










share|cite|improve this question











$endgroup$












  • $begingroup$
    $x_i = -2 + left(frac{2}{n} iright) ;Rightarrow.$
    $endgroup$
    – user2661923
    Dec 9 '18 at 21:48












  • $begingroup$
    $x_i = -2 + left(frac{2}{n} iright) ;Rightarrow; (x_i)^2 ;=; 4 ;-; left(frac{8}{n} iright) ;+; left(frac{4}{n^2} i^2right).$
    $endgroup$
    – user2661923
    Dec 9 '18 at 21:54










  • $begingroup$
    shouldn't $(xi)^2$ =4+ $(frac{8}{n}i)+(frac{4}{n^2}i^2)$
    $endgroup$
    – Eric Brown
    Dec 9 '18 at 22:08












  • $begingroup$
    good question. No, your formula for $x_i$ is wrong.
    $endgroup$
    – user2661923
    Dec 9 '18 at 22:11










  • $begingroup$
    where does the $frac{8}{n}i$ come from? wait I got it cause of the $2ab$ in $a^2+2ab+b^2$ right?
    $endgroup$
    – Eric Brown
    Dec 9 '18 at 22:27


















2












$begingroup$


Consider the integral $$int_{-2}^0 x^2+x dx.$$



The question says to use Riemann Sum theorem which is $$sum_{i=1}^nf(x_i)delta x$$
I know that $delta x= frac{-2}{n}$ and that $x_i=-2+(frac{2}{n}i)$



After i plug everything in I get $$sum_{i=1}^nfrac{2}{n}left(-2-frac{2}{n}iright)^2+left(-2-frac{2}{n}iright)$$



After completing the square I have $$frac{2}{n}sum_{i=1}left(4-frac{8}{n}iright)+left(frac{4}{n^2}i^2right)+left(-2-frac{2}{n}iright)$$



I know that $i=left(frac{(n+1)}{2}right)$ and $i^2=left(frac{(n+1)(2n+1)}{6}right)$
but how do I manipulate the equation so that I can use them?










share|cite|improve this question











$endgroup$












  • $begingroup$
    $x_i = -2 + left(frac{2}{n} iright) ;Rightarrow.$
    $endgroup$
    – user2661923
    Dec 9 '18 at 21:48












  • $begingroup$
    $x_i = -2 + left(frac{2}{n} iright) ;Rightarrow; (x_i)^2 ;=; 4 ;-; left(frac{8}{n} iright) ;+; left(frac{4}{n^2} i^2right).$
    $endgroup$
    – user2661923
    Dec 9 '18 at 21:54










  • $begingroup$
    shouldn't $(xi)^2$ =4+ $(frac{8}{n}i)+(frac{4}{n^2}i^2)$
    $endgroup$
    – Eric Brown
    Dec 9 '18 at 22:08












  • $begingroup$
    good question. No, your formula for $x_i$ is wrong.
    $endgroup$
    – user2661923
    Dec 9 '18 at 22:11










  • $begingroup$
    where does the $frac{8}{n}i$ come from? wait I got it cause of the $2ab$ in $a^2+2ab+b^2$ right?
    $endgroup$
    – Eric Brown
    Dec 9 '18 at 22:27
















2












2








2





$begingroup$


Consider the integral $$int_{-2}^0 x^2+x dx.$$



The question says to use Riemann Sum theorem which is $$sum_{i=1}^nf(x_i)delta x$$
I know that $delta x= frac{-2}{n}$ and that $x_i=-2+(frac{2}{n}i)$



After i plug everything in I get $$sum_{i=1}^nfrac{2}{n}left(-2-frac{2}{n}iright)^2+left(-2-frac{2}{n}iright)$$



After completing the square I have $$frac{2}{n}sum_{i=1}left(4-frac{8}{n}iright)+left(frac{4}{n^2}i^2right)+left(-2-frac{2}{n}iright)$$



I know that $i=left(frac{(n+1)}{2}right)$ and $i^2=left(frac{(n+1)(2n+1)}{6}right)$
but how do I manipulate the equation so that I can use them?










share|cite|improve this question











$endgroup$




Consider the integral $$int_{-2}^0 x^2+x dx.$$



The question says to use Riemann Sum theorem which is $$sum_{i=1}^nf(x_i)delta x$$
I know that $delta x= frac{-2}{n}$ and that $x_i=-2+(frac{2}{n}i)$



After i plug everything in I get $$sum_{i=1}^nfrac{2}{n}left(-2-frac{2}{n}iright)^2+left(-2-frac{2}{n}iright)$$



After completing the square I have $$frac{2}{n}sum_{i=1}left(4-frac{8}{n}iright)+left(frac{4}{n^2}i^2right)+left(-2-frac{2}{n}iright)$$



I know that $i=left(frac{(n+1)}{2}right)$ and $i^2=left(frac{(n+1)(2n+1)}{6}right)$
but how do I manipulate the equation so that I can use them?







calculus riemann-sum






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Dec 9 '18 at 22:23







Eric Brown

















asked Dec 9 '18 at 21:19









Eric BrownEric Brown

737




737












  • $begingroup$
    $x_i = -2 + left(frac{2}{n} iright) ;Rightarrow.$
    $endgroup$
    – user2661923
    Dec 9 '18 at 21:48












  • $begingroup$
    $x_i = -2 + left(frac{2}{n} iright) ;Rightarrow; (x_i)^2 ;=; 4 ;-; left(frac{8}{n} iright) ;+; left(frac{4}{n^2} i^2right).$
    $endgroup$
    – user2661923
    Dec 9 '18 at 21:54










  • $begingroup$
    shouldn't $(xi)^2$ =4+ $(frac{8}{n}i)+(frac{4}{n^2}i^2)$
    $endgroup$
    – Eric Brown
    Dec 9 '18 at 22:08












  • $begingroup$
    good question. No, your formula for $x_i$ is wrong.
    $endgroup$
    – user2661923
    Dec 9 '18 at 22:11










  • $begingroup$
    where does the $frac{8}{n}i$ come from? wait I got it cause of the $2ab$ in $a^2+2ab+b^2$ right?
    $endgroup$
    – Eric Brown
    Dec 9 '18 at 22:27




















  • $begingroup$
    $x_i = -2 + left(frac{2}{n} iright) ;Rightarrow.$
    $endgroup$
    – user2661923
    Dec 9 '18 at 21:48












  • $begingroup$
    $x_i = -2 + left(frac{2}{n} iright) ;Rightarrow; (x_i)^2 ;=; 4 ;-; left(frac{8}{n} iright) ;+; left(frac{4}{n^2} i^2right).$
    $endgroup$
    – user2661923
    Dec 9 '18 at 21:54










  • $begingroup$
    shouldn't $(xi)^2$ =4+ $(frac{8}{n}i)+(frac{4}{n^2}i^2)$
    $endgroup$
    – Eric Brown
    Dec 9 '18 at 22:08












  • $begingroup$
    good question. No, your formula for $x_i$ is wrong.
    $endgroup$
    – user2661923
    Dec 9 '18 at 22:11










  • $begingroup$
    where does the $frac{8}{n}i$ come from? wait I got it cause of the $2ab$ in $a^2+2ab+b^2$ right?
    $endgroup$
    – Eric Brown
    Dec 9 '18 at 22:27


















$begingroup$
$x_i = -2 + left(frac{2}{n} iright) ;Rightarrow.$
$endgroup$
– user2661923
Dec 9 '18 at 21:48






$begingroup$
$x_i = -2 + left(frac{2}{n} iright) ;Rightarrow.$
$endgroup$
– user2661923
Dec 9 '18 at 21:48














$begingroup$
$x_i = -2 + left(frac{2}{n} iright) ;Rightarrow; (x_i)^2 ;=; 4 ;-; left(frac{8}{n} iright) ;+; left(frac{4}{n^2} i^2right).$
$endgroup$
– user2661923
Dec 9 '18 at 21:54




$begingroup$
$x_i = -2 + left(frac{2}{n} iright) ;Rightarrow; (x_i)^2 ;=; 4 ;-; left(frac{8}{n} iright) ;+; left(frac{4}{n^2} i^2right).$
$endgroup$
– user2661923
Dec 9 '18 at 21:54












$begingroup$
shouldn't $(xi)^2$ =4+ $(frac{8}{n}i)+(frac{4}{n^2}i^2)$
$endgroup$
– Eric Brown
Dec 9 '18 at 22:08






$begingroup$
shouldn't $(xi)^2$ =4+ $(frac{8}{n}i)+(frac{4}{n^2}i^2)$
$endgroup$
– Eric Brown
Dec 9 '18 at 22:08














$begingroup$
good question. No, your formula for $x_i$ is wrong.
$endgroup$
– user2661923
Dec 9 '18 at 22:11




$begingroup$
good question. No, your formula for $x_i$ is wrong.
$endgroup$
– user2661923
Dec 9 '18 at 22:11












$begingroup$
where does the $frac{8}{n}i$ come from? wait I got it cause of the $2ab$ in $a^2+2ab+b^2$ right?
$endgroup$
– Eric Brown
Dec 9 '18 at 22:27






$begingroup$
where does the $frac{8}{n}i$ come from? wait I got it cause of the $2ab$ in $a^2+2ab+b^2$ right?
$endgroup$
– Eric Brown
Dec 9 '18 at 22:27












1 Answer
1






active

oldest

votes


















1












$begingroup$


I know that $delta x= frac{-2}{n}$




The $delta x$ should be positive. You should think of it as the length of the corresponding rectangle. In this case it is simplest to take $x_i=-frac{2i}{n}$. So you have,



begin{align*}
&int_{-2}^0 x^2+x dx\
=&lim_{nrightarrow+infty}
sum_{i=1}^n left(left(-frac{2i}{n}right)^2+left(-frac{2i}{n}right)right)frac{2}{n}\
=&lim_{nrightarrow+infty}
sum_{i=1}^n left(frac{8i^2}{n^3}-frac{4i}{n^2}right)\
=&lim_{nrightarrow+infty}
frac{8}{n^3}left(sum_{i=1}^n i^2right)
-frac{4}{n^2}left(sum_{i=1}^n iright)\
=&lim_{nrightarrow+infty}
frac{8}{n^3}left(
frac{n^3}{3}+frac{n^2}{2}+frac{n}{6}right)
-frac{4}{n^2}left(frac{1+n}{2}right)\
=&lim_{nrightarrow+infty}
left(
frac{8}{3}+frac{8}{2n}+frac{n}{6n^2}right)
-left(frac{2}{n}+2right)\
=& frac{8}{3}-2
end{align*}






share|cite|improve this answer









$endgroup$













  • $begingroup$
    Didn't know you could write $i^2$ like that, it will be useful on my final. Thanks for you help>
    $endgroup$
    – Eric Brown
    Dec 9 '18 at 22:42













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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3033028%2fevaluate-integral-int-20-x2x-dx-using-riemann-sum%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1












$begingroup$


I know that $delta x= frac{-2}{n}$




The $delta x$ should be positive. You should think of it as the length of the corresponding rectangle. In this case it is simplest to take $x_i=-frac{2i}{n}$. So you have,



begin{align*}
&int_{-2}^0 x^2+x dx\
=&lim_{nrightarrow+infty}
sum_{i=1}^n left(left(-frac{2i}{n}right)^2+left(-frac{2i}{n}right)right)frac{2}{n}\
=&lim_{nrightarrow+infty}
sum_{i=1}^n left(frac{8i^2}{n^3}-frac{4i}{n^2}right)\
=&lim_{nrightarrow+infty}
frac{8}{n^3}left(sum_{i=1}^n i^2right)
-frac{4}{n^2}left(sum_{i=1}^n iright)\
=&lim_{nrightarrow+infty}
frac{8}{n^3}left(
frac{n^3}{3}+frac{n^2}{2}+frac{n}{6}right)
-frac{4}{n^2}left(frac{1+n}{2}right)\
=&lim_{nrightarrow+infty}
left(
frac{8}{3}+frac{8}{2n}+frac{n}{6n^2}right)
-left(frac{2}{n}+2right)\
=& frac{8}{3}-2
end{align*}






share|cite|improve this answer









$endgroup$













  • $begingroup$
    Didn't know you could write $i^2$ like that, it will be useful on my final. Thanks for you help>
    $endgroup$
    – Eric Brown
    Dec 9 '18 at 22:42


















1












$begingroup$


I know that $delta x= frac{-2}{n}$




The $delta x$ should be positive. You should think of it as the length of the corresponding rectangle. In this case it is simplest to take $x_i=-frac{2i}{n}$. So you have,



begin{align*}
&int_{-2}^0 x^2+x dx\
=&lim_{nrightarrow+infty}
sum_{i=1}^n left(left(-frac{2i}{n}right)^2+left(-frac{2i}{n}right)right)frac{2}{n}\
=&lim_{nrightarrow+infty}
sum_{i=1}^n left(frac{8i^2}{n^3}-frac{4i}{n^2}right)\
=&lim_{nrightarrow+infty}
frac{8}{n^3}left(sum_{i=1}^n i^2right)
-frac{4}{n^2}left(sum_{i=1}^n iright)\
=&lim_{nrightarrow+infty}
frac{8}{n^3}left(
frac{n^3}{3}+frac{n^2}{2}+frac{n}{6}right)
-frac{4}{n^2}left(frac{1+n}{2}right)\
=&lim_{nrightarrow+infty}
left(
frac{8}{3}+frac{8}{2n}+frac{n}{6n^2}right)
-left(frac{2}{n}+2right)\
=& frac{8}{3}-2
end{align*}






share|cite|improve this answer









$endgroup$













  • $begingroup$
    Didn't know you could write $i^2$ like that, it will be useful on my final. Thanks for you help>
    $endgroup$
    – Eric Brown
    Dec 9 '18 at 22:42
















1












1








1





$begingroup$


I know that $delta x= frac{-2}{n}$




The $delta x$ should be positive. You should think of it as the length of the corresponding rectangle. In this case it is simplest to take $x_i=-frac{2i}{n}$. So you have,



begin{align*}
&int_{-2}^0 x^2+x dx\
=&lim_{nrightarrow+infty}
sum_{i=1}^n left(left(-frac{2i}{n}right)^2+left(-frac{2i}{n}right)right)frac{2}{n}\
=&lim_{nrightarrow+infty}
sum_{i=1}^n left(frac{8i^2}{n^3}-frac{4i}{n^2}right)\
=&lim_{nrightarrow+infty}
frac{8}{n^3}left(sum_{i=1}^n i^2right)
-frac{4}{n^2}left(sum_{i=1}^n iright)\
=&lim_{nrightarrow+infty}
frac{8}{n^3}left(
frac{n^3}{3}+frac{n^2}{2}+frac{n}{6}right)
-frac{4}{n^2}left(frac{1+n}{2}right)\
=&lim_{nrightarrow+infty}
left(
frac{8}{3}+frac{8}{2n}+frac{n}{6n^2}right)
-left(frac{2}{n}+2right)\
=& frac{8}{3}-2
end{align*}






share|cite|improve this answer









$endgroup$




I know that $delta x= frac{-2}{n}$




The $delta x$ should be positive. You should think of it as the length of the corresponding rectangle. In this case it is simplest to take $x_i=-frac{2i}{n}$. So you have,



begin{align*}
&int_{-2}^0 x^2+x dx\
=&lim_{nrightarrow+infty}
sum_{i=1}^n left(left(-frac{2i}{n}right)^2+left(-frac{2i}{n}right)right)frac{2}{n}\
=&lim_{nrightarrow+infty}
sum_{i=1}^n left(frac{8i^2}{n^3}-frac{4i}{n^2}right)\
=&lim_{nrightarrow+infty}
frac{8}{n^3}left(sum_{i=1}^n i^2right)
-frac{4}{n^2}left(sum_{i=1}^n iright)\
=&lim_{nrightarrow+infty}
frac{8}{n^3}left(
frac{n^3}{3}+frac{n^2}{2}+frac{n}{6}right)
-frac{4}{n^2}left(frac{1+n}{2}right)\
=&lim_{nrightarrow+infty}
left(
frac{8}{3}+frac{8}{2n}+frac{n}{6n^2}right)
-left(frac{2}{n}+2right)\
=& frac{8}{3}-2
end{align*}







share|cite|improve this answer












share|cite|improve this answer



share|cite|improve this answer










answered Dec 9 '18 at 22:31









Jorge AdrianoJorge Adriano

59146




59146












  • $begingroup$
    Didn't know you could write $i^2$ like that, it will be useful on my final. Thanks for you help>
    $endgroup$
    – Eric Brown
    Dec 9 '18 at 22:42




















  • $begingroup$
    Didn't know you could write $i^2$ like that, it will be useful on my final. Thanks for you help>
    $endgroup$
    – Eric Brown
    Dec 9 '18 at 22:42


















$begingroup$
Didn't know you could write $i^2$ like that, it will be useful on my final. Thanks for you help>
$endgroup$
– Eric Brown
Dec 9 '18 at 22:42






$begingroup$
Didn't know you could write $i^2$ like that, it will be useful on my final. Thanks for you help>
$endgroup$
– Eric Brown
Dec 9 '18 at 22:42




















draft saved

draft discarded




















































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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3033028%2fevaluate-integral-int-20-x2x-dx-using-riemann-sum%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

Probability when a professor distributes a quiz and homework assignment to a class of n students.

Aardman Animations

Are they similar matrix