Approximating $pi$ with arctangent












1












$begingroup$


Use the fact that $frac{pi}{4} = text{arctangent}(frac{1}{2}) + text{arctangent}(frac{1}{3})$ to determine the number of terms summed to ensure an approximation to $pi$ less than $10^{-3}$.



So far I've got



begin{align*}
pi = 4Bigg(sum_{i=1}^{infty} (-1)^{i+1}frac{1}{2^{2i-1}(2i-1)} + sum_{i=1}^{n} (-1)^{i+1}frac{1}{3^{2i-1}(2i-1)}Bigg)
end{align*}



from the given identity. But I don't know how to proceed.










share|cite|improve this question











$endgroup$








  • 1




    $begingroup$
    Welcome to MSE. What you've "got so far" is false; it's only true for sums to infinity. So the real story is $pi = 4(sum^n ldots + E_1(n) + sum^n ldots + E_2(n))$, where $E_1(n)$ and $E_2(n)$ are the "error terms" for those two power series. What you need to do is find a value $n$ large enough that $|E_1(n)| + |E_2(n)| < 10^{-3}$. (You should ask yourself why I put in those absolute-value brackets, too). When you've found the error terms and tried to work with them, if you're still stuck, you can show your work by clicking "edit" below your question; then we can help further.
    $endgroup$
    – John Hughes
    Jan 23 at 18:01


















1












$begingroup$


Use the fact that $frac{pi}{4} = text{arctangent}(frac{1}{2}) + text{arctangent}(frac{1}{3})$ to determine the number of terms summed to ensure an approximation to $pi$ less than $10^{-3}$.



So far I've got



begin{align*}
pi = 4Bigg(sum_{i=1}^{infty} (-1)^{i+1}frac{1}{2^{2i-1}(2i-1)} + sum_{i=1}^{n} (-1)^{i+1}frac{1}{3^{2i-1}(2i-1)}Bigg)
end{align*}



from the given identity. But I don't know how to proceed.










share|cite|improve this question











$endgroup$








  • 1




    $begingroup$
    Welcome to MSE. What you've "got so far" is false; it's only true for sums to infinity. So the real story is $pi = 4(sum^n ldots + E_1(n) + sum^n ldots + E_2(n))$, where $E_1(n)$ and $E_2(n)$ are the "error terms" for those two power series. What you need to do is find a value $n$ large enough that $|E_1(n)| + |E_2(n)| < 10^{-3}$. (You should ask yourself why I put in those absolute-value brackets, too). When you've found the error terms and tried to work with them, if you're still stuck, you can show your work by clicking "edit" below your question; then we can help further.
    $endgroup$
    – John Hughes
    Jan 23 at 18:01
















1












1








1





$begingroup$


Use the fact that $frac{pi}{4} = text{arctangent}(frac{1}{2}) + text{arctangent}(frac{1}{3})$ to determine the number of terms summed to ensure an approximation to $pi$ less than $10^{-3}$.



So far I've got



begin{align*}
pi = 4Bigg(sum_{i=1}^{infty} (-1)^{i+1}frac{1}{2^{2i-1}(2i-1)} + sum_{i=1}^{n} (-1)^{i+1}frac{1}{3^{2i-1}(2i-1)}Bigg)
end{align*}



from the given identity. But I don't know how to proceed.










share|cite|improve this question











$endgroup$




Use the fact that $frac{pi}{4} = text{arctangent}(frac{1}{2}) + text{arctangent}(frac{1}{3})$ to determine the number of terms summed to ensure an approximation to $pi$ less than $10^{-3}$.



So far I've got



begin{align*}
pi = 4Bigg(sum_{i=1}^{infty} (-1)^{i+1}frac{1}{2^{2i-1}(2i-1)} + sum_{i=1}^{n} (-1)^{i+1}frac{1}{3^{2i-1}(2i-1)}Bigg)
end{align*}



from the given identity. But I don't know how to proceed.







numerical-methods approximation






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Jan 30 at 2:02







mXdX

















asked Jan 23 at 17:53









mXdXmXdX

898




898








  • 1




    $begingroup$
    Welcome to MSE. What you've "got so far" is false; it's only true for sums to infinity. So the real story is $pi = 4(sum^n ldots + E_1(n) + sum^n ldots + E_2(n))$, where $E_1(n)$ and $E_2(n)$ are the "error terms" for those two power series. What you need to do is find a value $n$ large enough that $|E_1(n)| + |E_2(n)| < 10^{-3}$. (You should ask yourself why I put in those absolute-value brackets, too). When you've found the error terms and tried to work with them, if you're still stuck, you can show your work by clicking "edit" below your question; then we can help further.
    $endgroup$
    – John Hughes
    Jan 23 at 18:01
















  • 1




    $begingroup$
    Welcome to MSE. What you've "got so far" is false; it's only true for sums to infinity. So the real story is $pi = 4(sum^n ldots + E_1(n) + sum^n ldots + E_2(n))$, where $E_1(n)$ and $E_2(n)$ are the "error terms" for those two power series. What you need to do is find a value $n$ large enough that $|E_1(n)| + |E_2(n)| < 10^{-3}$. (You should ask yourself why I put in those absolute-value brackets, too). When you've found the error terms and tried to work with them, if you're still stuck, you can show your work by clicking "edit" below your question; then we can help further.
    $endgroup$
    – John Hughes
    Jan 23 at 18:01










1




1




$begingroup$
Welcome to MSE. What you've "got so far" is false; it's only true for sums to infinity. So the real story is $pi = 4(sum^n ldots + E_1(n) + sum^n ldots + E_2(n))$, where $E_1(n)$ and $E_2(n)$ are the "error terms" for those two power series. What you need to do is find a value $n$ large enough that $|E_1(n)| + |E_2(n)| < 10^{-3}$. (You should ask yourself why I put in those absolute-value brackets, too). When you've found the error terms and tried to work with them, if you're still stuck, you can show your work by clicking "edit" below your question; then we can help further.
$endgroup$
– John Hughes
Jan 23 at 18:01






$begingroup$
Welcome to MSE. What you've "got so far" is false; it's only true for sums to infinity. So the real story is $pi = 4(sum^n ldots + E_1(n) + sum^n ldots + E_2(n))$, where $E_1(n)$ and $E_2(n)$ are the "error terms" for those two power series. What you need to do is find a value $n$ large enough that $|E_1(n)| + |E_2(n)| < 10^{-3}$. (You should ask yourself why I put in those absolute-value brackets, too). When you've found the error terms and tried to work with them, if you're still stuck, you can show your work by clicking "edit" below your question; then we can help further.
$endgroup$
– John Hughes
Jan 23 at 18:01












2 Answers
2






active

oldest

votes


















1












$begingroup$

Rewrite the equality as:
begin{array}{}
pi = 4left[sumlimits_{i=0}^{n-1} (-1)^{i}left(frac{1}{2^{2i+1}(2i+1)} +frac{1}{3^{2i+1}(2i+1)}right)+sumlimits_{i=n}^{infty} (-1)^{i}left(frac{1}{2^{2i+1}(2i+1)} +frac{1}{3^{2i+1}(2i+1)}right)right]
end{array}

to obtain the inequality to be solved for $n$:
$$
begin{array}{}
4left|sumlimits_{i=n}^{infty} (-1)^{i}left(frac{1}{2^{2i+1}(2i+1)} +frac{1}{3^{2i+1}(2i+1)}right)right|<epsilon=10^{-3}.tag1
end{array}$$



Observe now that the series (1) is alternating with monotonously decreasing terms, and thus the absolute value of the series is less than that of its first term.






share|cite|improve this answer











$endgroup$













  • $begingroup$
    Solving that thing for $n$ seemed pretty tedious. I just plugged in values and got $n=4$. Does that seem correct?
    $endgroup$
    – mXdX
    Jan 30 at 2:03










  • $begingroup$
    @mXdX My initial answer was intended as a hint and I am really happy that you have completed the task. Your step is correct. I have added it now in the answer for certainity.
    $endgroup$
    – user
    Jan 30 at 18:46



















1












$begingroup$

The sums are alternating and the terms decreasing in absolute value. This implies that the error is lesser or equal to the first discarded term. The error summing up to $n$ is then lesser or equal to
$$
4Bigl(frac{1}{2^{2n+1}(2,n+1)}+frac{1}{3^{2n+1}(2,n+1)}Bigr).
$$

Now choose $n$ so that the above is $<10^{-3}$.






share|cite|improve this answer









$endgroup$













  • $begingroup$
    This is the result I got. From here, it seemed best to just try values for $n$. Looks like it's $n=4$, yes?
    $endgroup$
    – mXdX
    Jan 30 at 2:00










  • $begingroup$
    Yes, that is correct.
    $endgroup$
    – Julián Aguirre
    Jan 30 at 5:55











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%2f3084828%2fapproximating-pi-with-arctangent%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









1












$begingroup$

Rewrite the equality as:
begin{array}{}
pi = 4left[sumlimits_{i=0}^{n-1} (-1)^{i}left(frac{1}{2^{2i+1}(2i+1)} +frac{1}{3^{2i+1}(2i+1)}right)+sumlimits_{i=n}^{infty} (-1)^{i}left(frac{1}{2^{2i+1}(2i+1)} +frac{1}{3^{2i+1}(2i+1)}right)right]
end{array}

to obtain the inequality to be solved for $n$:
$$
begin{array}{}
4left|sumlimits_{i=n}^{infty} (-1)^{i}left(frac{1}{2^{2i+1}(2i+1)} +frac{1}{3^{2i+1}(2i+1)}right)right|<epsilon=10^{-3}.tag1
end{array}$$



Observe now that the series (1) is alternating with monotonously decreasing terms, and thus the absolute value of the series is less than that of its first term.






share|cite|improve this answer











$endgroup$













  • $begingroup$
    Solving that thing for $n$ seemed pretty tedious. I just plugged in values and got $n=4$. Does that seem correct?
    $endgroup$
    – mXdX
    Jan 30 at 2:03










  • $begingroup$
    @mXdX My initial answer was intended as a hint and I am really happy that you have completed the task. Your step is correct. I have added it now in the answer for certainity.
    $endgroup$
    – user
    Jan 30 at 18:46
















1












$begingroup$

Rewrite the equality as:
begin{array}{}
pi = 4left[sumlimits_{i=0}^{n-1} (-1)^{i}left(frac{1}{2^{2i+1}(2i+1)} +frac{1}{3^{2i+1}(2i+1)}right)+sumlimits_{i=n}^{infty} (-1)^{i}left(frac{1}{2^{2i+1}(2i+1)} +frac{1}{3^{2i+1}(2i+1)}right)right]
end{array}

to obtain the inequality to be solved for $n$:
$$
begin{array}{}
4left|sumlimits_{i=n}^{infty} (-1)^{i}left(frac{1}{2^{2i+1}(2i+1)} +frac{1}{3^{2i+1}(2i+1)}right)right|<epsilon=10^{-3}.tag1
end{array}$$



Observe now that the series (1) is alternating with monotonously decreasing terms, and thus the absolute value of the series is less than that of its first term.






share|cite|improve this answer











$endgroup$













  • $begingroup$
    Solving that thing for $n$ seemed pretty tedious. I just plugged in values and got $n=4$. Does that seem correct?
    $endgroup$
    – mXdX
    Jan 30 at 2:03










  • $begingroup$
    @mXdX My initial answer was intended as a hint and I am really happy that you have completed the task. Your step is correct. I have added it now in the answer for certainity.
    $endgroup$
    – user
    Jan 30 at 18:46














1












1








1





$begingroup$

Rewrite the equality as:
begin{array}{}
pi = 4left[sumlimits_{i=0}^{n-1} (-1)^{i}left(frac{1}{2^{2i+1}(2i+1)} +frac{1}{3^{2i+1}(2i+1)}right)+sumlimits_{i=n}^{infty} (-1)^{i}left(frac{1}{2^{2i+1}(2i+1)} +frac{1}{3^{2i+1}(2i+1)}right)right]
end{array}

to obtain the inequality to be solved for $n$:
$$
begin{array}{}
4left|sumlimits_{i=n}^{infty} (-1)^{i}left(frac{1}{2^{2i+1}(2i+1)} +frac{1}{3^{2i+1}(2i+1)}right)right|<epsilon=10^{-3}.tag1
end{array}$$



Observe now that the series (1) is alternating with monotonously decreasing terms, and thus the absolute value of the series is less than that of its first term.






share|cite|improve this answer











$endgroup$



Rewrite the equality as:
begin{array}{}
pi = 4left[sumlimits_{i=0}^{n-1} (-1)^{i}left(frac{1}{2^{2i+1}(2i+1)} +frac{1}{3^{2i+1}(2i+1)}right)+sumlimits_{i=n}^{infty} (-1)^{i}left(frac{1}{2^{2i+1}(2i+1)} +frac{1}{3^{2i+1}(2i+1)}right)right]
end{array}

to obtain the inequality to be solved for $n$:
$$
begin{array}{}
4left|sumlimits_{i=n}^{infty} (-1)^{i}left(frac{1}{2^{2i+1}(2i+1)} +frac{1}{3^{2i+1}(2i+1)}right)right|<epsilon=10^{-3}.tag1
end{array}$$



Observe now that the series (1) is alternating with monotonously decreasing terms, and thus the absolute value of the series is less than that of its first term.







share|cite|improve this answer














share|cite|improve this answer



share|cite|improve this answer








edited Jan 30 at 18:41

























answered Jan 23 at 18:06









useruser

5,31511030




5,31511030












  • $begingroup$
    Solving that thing for $n$ seemed pretty tedious. I just plugged in values and got $n=4$. Does that seem correct?
    $endgroup$
    – mXdX
    Jan 30 at 2:03










  • $begingroup$
    @mXdX My initial answer was intended as a hint and I am really happy that you have completed the task. Your step is correct. I have added it now in the answer for certainity.
    $endgroup$
    – user
    Jan 30 at 18:46


















  • $begingroup$
    Solving that thing for $n$ seemed pretty tedious. I just plugged in values and got $n=4$. Does that seem correct?
    $endgroup$
    – mXdX
    Jan 30 at 2:03










  • $begingroup$
    @mXdX My initial answer was intended as a hint and I am really happy that you have completed the task. Your step is correct. I have added it now in the answer for certainity.
    $endgroup$
    – user
    Jan 30 at 18:46
















$begingroup$
Solving that thing for $n$ seemed pretty tedious. I just plugged in values and got $n=4$. Does that seem correct?
$endgroup$
– mXdX
Jan 30 at 2:03




$begingroup$
Solving that thing for $n$ seemed pretty tedious. I just plugged in values and got $n=4$. Does that seem correct?
$endgroup$
– mXdX
Jan 30 at 2:03












$begingroup$
@mXdX My initial answer was intended as a hint and I am really happy that you have completed the task. Your step is correct. I have added it now in the answer for certainity.
$endgroup$
– user
Jan 30 at 18:46




$begingroup$
@mXdX My initial answer was intended as a hint and I am really happy that you have completed the task. Your step is correct. I have added it now in the answer for certainity.
$endgroup$
– user
Jan 30 at 18:46











1












$begingroup$

The sums are alternating and the terms decreasing in absolute value. This implies that the error is lesser or equal to the first discarded term. The error summing up to $n$ is then lesser or equal to
$$
4Bigl(frac{1}{2^{2n+1}(2,n+1)}+frac{1}{3^{2n+1}(2,n+1)}Bigr).
$$

Now choose $n$ so that the above is $<10^{-3}$.






share|cite|improve this answer









$endgroup$













  • $begingroup$
    This is the result I got. From here, it seemed best to just try values for $n$. Looks like it's $n=4$, yes?
    $endgroup$
    – mXdX
    Jan 30 at 2:00










  • $begingroup$
    Yes, that is correct.
    $endgroup$
    – Julián Aguirre
    Jan 30 at 5:55
















1












$begingroup$

The sums are alternating and the terms decreasing in absolute value. This implies that the error is lesser or equal to the first discarded term. The error summing up to $n$ is then lesser or equal to
$$
4Bigl(frac{1}{2^{2n+1}(2,n+1)}+frac{1}{3^{2n+1}(2,n+1)}Bigr).
$$

Now choose $n$ so that the above is $<10^{-3}$.






share|cite|improve this answer









$endgroup$













  • $begingroup$
    This is the result I got. From here, it seemed best to just try values for $n$. Looks like it's $n=4$, yes?
    $endgroup$
    – mXdX
    Jan 30 at 2:00










  • $begingroup$
    Yes, that is correct.
    $endgroup$
    – Julián Aguirre
    Jan 30 at 5:55














1












1








1





$begingroup$

The sums are alternating and the terms decreasing in absolute value. This implies that the error is lesser or equal to the first discarded term. The error summing up to $n$ is then lesser or equal to
$$
4Bigl(frac{1}{2^{2n+1}(2,n+1)}+frac{1}{3^{2n+1}(2,n+1)}Bigr).
$$

Now choose $n$ so that the above is $<10^{-3}$.






share|cite|improve this answer









$endgroup$



The sums are alternating and the terms decreasing in absolute value. This implies that the error is lesser or equal to the first discarded term. The error summing up to $n$ is then lesser or equal to
$$
4Bigl(frac{1}{2^{2n+1}(2,n+1)}+frac{1}{3^{2n+1}(2,n+1)}Bigr).
$$

Now choose $n$ so that the above is $<10^{-3}$.







share|cite|improve this answer












share|cite|improve this answer



share|cite|improve this answer










answered Jan 23 at 18:50









Julián AguirreJulián Aguirre

69.4k24096




69.4k24096












  • $begingroup$
    This is the result I got. From here, it seemed best to just try values for $n$. Looks like it's $n=4$, yes?
    $endgroup$
    – mXdX
    Jan 30 at 2:00










  • $begingroup$
    Yes, that is correct.
    $endgroup$
    – Julián Aguirre
    Jan 30 at 5:55


















  • $begingroup$
    This is the result I got. From here, it seemed best to just try values for $n$. Looks like it's $n=4$, yes?
    $endgroup$
    – mXdX
    Jan 30 at 2:00










  • $begingroup$
    Yes, that is correct.
    $endgroup$
    – Julián Aguirre
    Jan 30 at 5:55
















$begingroup$
This is the result I got. From here, it seemed best to just try values for $n$. Looks like it's $n=4$, yes?
$endgroup$
– mXdX
Jan 30 at 2:00




$begingroup$
This is the result I got. From here, it seemed best to just try values for $n$. Looks like it's $n=4$, yes?
$endgroup$
– mXdX
Jan 30 at 2:00












$begingroup$
Yes, that is correct.
$endgroup$
– Julián Aguirre
Jan 30 at 5:55




$begingroup$
Yes, that is correct.
$endgroup$
– Julián Aguirre
Jan 30 at 5:55


















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%2f3084828%2fapproximating-pi-with-arctangent%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

MongoDB - Not Authorized To Execute Command

Npm cannot find a required file even through it is in the searched directory

in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith