Average Distances From The Origin












0












$begingroup$



Consider all points $(m,n)$ where $m$ and $n$ are natural numbers,
$mleq10$, and $nleq5$. What is the average distances from each point
to the origin $(0,0)$?




I know how to find the distance $d$ between the points $(x_1,y_1)$ and $(x_2,y_2)$;
$d=sqrt{(x_1-x_2)^2+(y_1-y_2)^2}$.



In this case, the first point is $(m,n)$ and the second point is the origin, therefore the distance, $d=sqrt{m^2+n^2}$.



It is annoying to find all distances, summing them, and dividing them by the number of distances, is not it annoying?



What if the given conditions, $mleq10$ and $nleq5$, were changed to $mleq49$ and $nleq36$?!










share|cite|improve this question









$endgroup$












  • $begingroup$
    I don't think there's a quick way, It's easy with a computer program. For very large $m$ and $n$ you could get an approximation using calculus.
    $endgroup$
    – Ethan Bolker
    Dec 5 '18 at 16:04










  • $begingroup$
    Even with small values of $m$ and $n$, it is annoying. Say $mleq5$, and $nleq2$. You will calculate $10$ distances. As you said it is easy by programming, but without that, can not we? :(
    $endgroup$
    – Hussain-Alqatari
    Dec 5 '18 at 16:08
















0












$begingroup$



Consider all points $(m,n)$ where $m$ and $n$ are natural numbers,
$mleq10$, and $nleq5$. What is the average distances from each point
to the origin $(0,0)$?




I know how to find the distance $d$ between the points $(x_1,y_1)$ and $(x_2,y_2)$;
$d=sqrt{(x_1-x_2)^2+(y_1-y_2)^2}$.



In this case, the first point is $(m,n)$ and the second point is the origin, therefore the distance, $d=sqrt{m^2+n^2}$.



It is annoying to find all distances, summing them, and dividing them by the number of distances, is not it annoying?



What if the given conditions, $mleq10$ and $nleq5$, were changed to $mleq49$ and $nleq36$?!










share|cite|improve this question









$endgroup$












  • $begingroup$
    I don't think there's a quick way, It's easy with a computer program. For very large $m$ and $n$ you could get an approximation using calculus.
    $endgroup$
    – Ethan Bolker
    Dec 5 '18 at 16:04










  • $begingroup$
    Even with small values of $m$ and $n$, it is annoying. Say $mleq5$, and $nleq2$. You will calculate $10$ distances. As you said it is easy by programming, but without that, can not we? :(
    $endgroup$
    – Hussain-Alqatari
    Dec 5 '18 at 16:08














0












0








0





$begingroup$



Consider all points $(m,n)$ where $m$ and $n$ are natural numbers,
$mleq10$, and $nleq5$. What is the average distances from each point
to the origin $(0,0)$?




I know how to find the distance $d$ between the points $(x_1,y_1)$ and $(x_2,y_2)$;
$d=sqrt{(x_1-x_2)^2+(y_1-y_2)^2}$.



In this case, the first point is $(m,n)$ and the second point is the origin, therefore the distance, $d=sqrt{m^2+n^2}$.



It is annoying to find all distances, summing them, and dividing them by the number of distances, is not it annoying?



What if the given conditions, $mleq10$ and $nleq5$, were changed to $mleq49$ and $nleq36$?!










share|cite|improve this question









$endgroup$





Consider all points $(m,n)$ where $m$ and $n$ are natural numbers,
$mleq10$, and $nleq5$. What is the average distances from each point
to the origin $(0,0)$?




I know how to find the distance $d$ between the points $(x_1,y_1)$ and $(x_2,y_2)$;
$d=sqrt{(x_1-x_2)^2+(y_1-y_2)^2}$.



In this case, the first point is $(m,n)$ and the second point is the origin, therefore the distance, $d=sqrt{m^2+n^2}$.



It is annoying to find all distances, summing them, and dividing them by the number of distances, is not it annoying?



What if the given conditions, $mleq10$ and $nleq5$, were changed to $mleq49$ and $nleq36$?!







geometry coordinate-systems






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Dec 5 '18 at 15:58









Hussain-AlqatariHussain-Alqatari

3217




3217












  • $begingroup$
    I don't think there's a quick way, It's easy with a computer program. For very large $m$ and $n$ you could get an approximation using calculus.
    $endgroup$
    – Ethan Bolker
    Dec 5 '18 at 16:04










  • $begingroup$
    Even with small values of $m$ and $n$, it is annoying. Say $mleq5$, and $nleq2$. You will calculate $10$ distances. As you said it is easy by programming, but without that, can not we? :(
    $endgroup$
    – Hussain-Alqatari
    Dec 5 '18 at 16:08


















  • $begingroup$
    I don't think there's a quick way, It's easy with a computer program. For very large $m$ and $n$ you could get an approximation using calculus.
    $endgroup$
    – Ethan Bolker
    Dec 5 '18 at 16:04










  • $begingroup$
    Even with small values of $m$ and $n$, it is annoying. Say $mleq5$, and $nleq2$. You will calculate $10$ distances. As you said it is easy by programming, but without that, can not we? :(
    $endgroup$
    – Hussain-Alqatari
    Dec 5 '18 at 16:08
















$begingroup$
I don't think there's a quick way, It's easy with a computer program. For very large $m$ and $n$ you could get an approximation using calculus.
$endgroup$
– Ethan Bolker
Dec 5 '18 at 16:04




$begingroup$
I don't think there's a quick way, It's easy with a computer program. For very large $m$ and $n$ you could get an approximation using calculus.
$endgroup$
– Ethan Bolker
Dec 5 '18 at 16:04












$begingroup$
Even with small values of $m$ and $n$, it is annoying. Say $mleq5$, and $nleq2$. You will calculate $10$ distances. As you said it is easy by programming, but without that, can not we? :(
$endgroup$
– Hussain-Alqatari
Dec 5 '18 at 16:08




$begingroup$
Even with small values of $m$ and $n$, it is annoying. Say $mleq5$, and $nleq2$. You will calculate $10$ distances. As you said it is easy by programming, but without that, can not we? :(
$endgroup$
– Hussain-Alqatari
Dec 5 '18 at 16:08










1 Answer
1






active

oldest

votes


















-1












$begingroup$

There is a quick solution for a related problem, even though it's not quite what you are asking. If you are willing to compute squares of distances of all points, then you get
$$
begin{split}
f(m,n)
&= sum_{i=1}^m sum_{k=1}^n left(i^2 + k^2right) \
&= sum_{i=1}^m sum_{k=1}^n i^2 + sum_{i=1}^m sum_{k=1}^n k^2 \
&= n sum_{i=1}^m i^2 + m sum_{k=1}^n k^2 \
&= n frac{m(m+1)(2m+1)}{6} + m frac{n(n+1)(2n+1)}{6} \
&= frac{mn}{6} left[(m+1)(2m+1) + (n+1)(2n+1)right]
end{split}
$$



As expected, $f(m,n)$ is symmetric in $m,n$, in other words, $f(m,n) = f(n,m)$...






share|cite|improve this answer









$endgroup$













  • $begingroup$
    This is not related. However, it is new for me, I like it. But should not it be $f(m-1,n-1)$ since $m$ and $n$ are natural numbers (non-zero positive integers)?
    $endgroup$
    – Hussain-Alqatari
    Dec 5 '18 at 16:17










  • $begingroup$
    @Hussain-Alqatari do you mean you want to include $0$? It is easy to change the above to accommodate for that if you like
    $endgroup$
    – gt6989b
    Dec 5 '18 at 16:37










  • $begingroup$
    What you have posted (including $0$). My problem (excluding $0$ because they are natural numbers). So, should it be $f(m-1,n-1)$?
    $endgroup$
    – Hussain-Alqatari
    Dec 5 '18 at 16:41










  • $begingroup$
    @Hussain-Alqatari I don't understand. My post does not include zero, since both sums start with min index $1$, so the points $(1,1),(1,2),(2,1)$ are included but $(0,x),(x,0)$ are not included
    $endgroup$
    – gt6989b
    Dec 5 '18 at 16:45










  • $begingroup$
    Yes, you are right. What about my original problem? No way? :(
    $endgroup$
    – Hussain-Alqatari
    Dec 5 '18 at 16:46











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%2f3027238%2faverage-distances-from-the-origin%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$

There is a quick solution for a related problem, even though it's not quite what you are asking. If you are willing to compute squares of distances of all points, then you get
$$
begin{split}
f(m,n)
&= sum_{i=1}^m sum_{k=1}^n left(i^2 + k^2right) \
&= sum_{i=1}^m sum_{k=1}^n i^2 + sum_{i=1}^m sum_{k=1}^n k^2 \
&= n sum_{i=1}^m i^2 + m sum_{k=1}^n k^2 \
&= n frac{m(m+1)(2m+1)}{6} + m frac{n(n+1)(2n+1)}{6} \
&= frac{mn}{6} left[(m+1)(2m+1) + (n+1)(2n+1)right]
end{split}
$$



As expected, $f(m,n)$ is symmetric in $m,n$, in other words, $f(m,n) = f(n,m)$...






share|cite|improve this answer









$endgroup$













  • $begingroup$
    This is not related. However, it is new for me, I like it. But should not it be $f(m-1,n-1)$ since $m$ and $n$ are natural numbers (non-zero positive integers)?
    $endgroup$
    – Hussain-Alqatari
    Dec 5 '18 at 16:17










  • $begingroup$
    @Hussain-Alqatari do you mean you want to include $0$? It is easy to change the above to accommodate for that if you like
    $endgroup$
    – gt6989b
    Dec 5 '18 at 16:37










  • $begingroup$
    What you have posted (including $0$). My problem (excluding $0$ because they are natural numbers). So, should it be $f(m-1,n-1)$?
    $endgroup$
    – Hussain-Alqatari
    Dec 5 '18 at 16:41










  • $begingroup$
    @Hussain-Alqatari I don't understand. My post does not include zero, since both sums start with min index $1$, so the points $(1,1),(1,2),(2,1)$ are included but $(0,x),(x,0)$ are not included
    $endgroup$
    – gt6989b
    Dec 5 '18 at 16:45










  • $begingroup$
    Yes, you are right. What about my original problem? No way? :(
    $endgroup$
    – Hussain-Alqatari
    Dec 5 '18 at 16:46
















-1












$begingroup$

There is a quick solution for a related problem, even though it's not quite what you are asking. If you are willing to compute squares of distances of all points, then you get
$$
begin{split}
f(m,n)
&= sum_{i=1}^m sum_{k=1}^n left(i^2 + k^2right) \
&= sum_{i=1}^m sum_{k=1}^n i^2 + sum_{i=1}^m sum_{k=1}^n k^2 \
&= n sum_{i=1}^m i^2 + m sum_{k=1}^n k^2 \
&= n frac{m(m+1)(2m+1)}{6} + m frac{n(n+1)(2n+1)}{6} \
&= frac{mn}{6} left[(m+1)(2m+1) + (n+1)(2n+1)right]
end{split}
$$



As expected, $f(m,n)$ is symmetric in $m,n$, in other words, $f(m,n) = f(n,m)$...






share|cite|improve this answer









$endgroup$













  • $begingroup$
    This is not related. However, it is new for me, I like it. But should not it be $f(m-1,n-1)$ since $m$ and $n$ are natural numbers (non-zero positive integers)?
    $endgroup$
    – Hussain-Alqatari
    Dec 5 '18 at 16:17










  • $begingroup$
    @Hussain-Alqatari do you mean you want to include $0$? It is easy to change the above to accommodate for that if you like
    $endgroup$
    – gt6989b
    Dec 5 '18 at 16:37










  • $begingroup$
    What you have posted (including $0$). My problem (excluding $0$ because they are natural numbers). So, should it be $f(m-1,n-1)$?
    $endgroup$
    – Hussain-Alqatari
    Dec 5 '18 at 16:41










  • $begingroup$
    @Hussain-Alqatari I don't understand. My post does not include zero, since both sums start with min index $1$, so the points $(1,1),(1,2),(2,1)$ are included but $(0,x),(x,0)$ are not included
    $endgroup$
    – gt6989b
    Dec 5 '18 at 16:45










  • $begingroup$
    Yes, you are right. What about my original problem? No way? :(
    $endgroup$
    – Hussain-Alqatari
    Dec 5 '18 at 16:46














-1












-1








-1





$begingroup$

There is a quick solution for a related problem, even though it's not quite what you are asking. If you are willing to compute squares of distances of all points, then you get
$$
begin{split}
f(m,n)
&= sum_{i=1}^m sum_{k=1}^n left(i^2 + k^2right) \
&= sum_{i=1}^m sum_{k=1}^n i^2 + sum_{i=1}^m sum_{k=1}^n k^2 \
&= n sum_{i=1}^m i^2 + m sum_{k=1}^n k^2 \
&= n frac{m(m+1)(2m+1)}{6} + m frac{n(n+1)(2n+1)}{6} \
&= frac{mn}{6} left[(m+1)(2m+1) + (n+1)(2n+1)right]
end{split}
$$



As expected, $f(m,n)$ is symmetric in $m,n$, in other words, $f(m,n) = f(n,m)$...






share|cite|improve this answer









$endgroup$



There is a quick solution for a related problem, even though it's not quite what you are asking. If you are willing to compute squares of distances of all points, then you get
$$
begin{split}
f(m,n)
&= sum_{i=1}^m sum_{k=1}^n left(i^2 + k^2right) \
&= sum_{i=1}^m sum_{k=1}^n i^2 + sum_{i=1}^m sum_{k=1}^n k^2 \
&= n sum_{i=1}^m i^2 + m sum_{k=1}^n k^2 \
&= n frac{m(m+1)(2m+1)}{6} + m frac{n(n+1)(2n+1)}{6} \
&= frac{mn}{6} left[(m+1)(2m+1) + (n+1)(2n+1)right]
end{split}
$$



As expected, $f(m,n)$ is symmetric in $m,n$, in other words, $f(m,n) = f(n,m)$...







share|cite|improve this answer












share|cite|improve this answer



share|cite|improve this answer










answered Dec 5 '18 at 16:11









gt6989bgt6989b

33.9k22455




33.9k22455












  • $begingroup$
    This is not related. However, it is new for me, I like it. But should not it be $f(m-1,n-1)$ since $m$ and $n$ are natural numbers (non-zero positive integers)?
    $endgroup$
    – Hussain-Alqatari
    Dec 5 '18 at 16:17










  • $begingroup$
    @Hussain-Alqatari do you mean you want to include $0$? It is easy to change the above to accommodate for that if you like
    $endgroup$
    – gt6989b
    Dec 5 '18 at 16:37










  • $begingroup$
    What you have posted (including $0$). My problem (excluding $0$ because they are natural numbers). So, should it be $f(m-1,n-1)$?
    $endgroup$
    – Hussain-Alqatari
    Dec 5 '18 at 16:41










  • $begingroup$
    @Hussain-Alqatari I don't understand. My post does not include zero, since both sums start with min index $1$, so the points $(1,1),(1,2),(2,1)$ are included but $(0,x),(x,0)$ are not included
    $endgroup$
    – gt6989b
    Dec 5 '18 at 16:45










  • $begingroup$
    Yes, you are right. What about my original problem? No way? :(
    $endgroup$
    – Hussain-Alqatari
    Dec 5 '18 at 16:46


















  • $begingroup$
    This is not related. However, it is new for me, I like it. But should not it be $f(m-1,n-1)$ since $m$ and $n$ are natural numbers (non-zero positive integers)?
    $endgroup$
    – Hussain-Alqatari
    Dec 5 '18 at 16:17










  • $begingroup$
    @Hussain-Alqatari do you mean you want to include $0$? It is easy to change the above to accommodate for that if you like
    $endgroup$
    – gt6989b
    Dec 5 '18 at 16:37










  • $begingroup$
    What you have posted (including $0$). My problem (excluding $0$ because they are natural numbers). So, should it be $f(m-1,n-1)$?
    $endgroup$
    – Hussain-Alqatari
    Dec 5 '18 at 16:41










  • $begingroup$
    @Hussain-Alqatari I don't understand. My post does not include zero, since both sums start with min index $1$, so the points $(1,1),(1,2),(2,1)$ are included but $(0,x),(x,0)$ are not included
    $endgroup$
    – gt6989b
    Dec 5 '18 at 16:45










  • $begingroup$
    Yes, you are right. What about my original problem? No way? :(
    $endgroup$
    – Hussain-Alqatari
    Dec 5 '18 at 16:46
















$begingroup$
This is not related. However, it is new for me, I like it. But should not it be $f(m-1,n-1)$ since $m$ and $n$ are natural numbers (non-zero positive integers)?
$endgroup$
– Hussain-Alqatari
Dec 5 '18 at 16:17




$begingroup$
This is not related. However, it is new for me, I like it. But should not it be $f(m-1,n-1)$ since $m$ and $n$ are natural numbers (non-zero positive integers)?
$endgroup$
– Hussain-Alqatari
Dec 5 '18 at 16:17












$begingroup$
@Hussain-Alqatari do you mean you want to include $0$? It is easy to change the above to accommodate for that if you like
$endgroup$
– gt6989b
Dec 5 '18 at 16:37




$begingroup$
@Hussain-Alqatari do you mean you want to include $0$? It is easy to change the above to accommodate for that if you like
$endgroup$
– gt6989b
Dec 5 '18 at 16:37












$begingroup$
What you have posted (including $0$). My problem (excluding $0$ because they are natural numbers). So, should it be $f(m-1,n-1)$?
$endgroup$
– Hussain-Alqatari
Dec 5 '18 at 16:41




$begingroup$
What you have posted (including $0$). My problem (excluding $0$ because they are natural numbers). So, should it be $f(m-1,n-1)$?
$endgroup$
– Hussain-Alqatari
Dec 5 '18 at 16:41












$begingroup$
@Hussain-Alqatari I don't understand. My post does not include zero, since both sums start with min index $1$, so the points $(1,1),(1,2),(2,1)$ are included but $(0,x),(x,0)$ are not included
$endgroup$
– gt6989b
Dec 5 '18 at 16:45




$begingroup$
@Hussain-Alqatari I don't understand. My post does not include zero, since both sums start with min index $1$, so the points $(1,1),(1,2),(2,1)$ are included but $(0,x),(x,0)$ are not included
$endgroup$
– gt6989b
Dec 5 '18 at 16:45












$begingroup$
Yes, you are right. What about my original problem? No way? :(
$endgroup$
– Hussain-Alqatari
Dec 5 '18 at 16:46




$begingroup$
Yes, you are right. What about my original problem? No way? :(
$endgroup$
– Hussain-Alqatari
Dec 5 '18 at 16:46


















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%2f3027238%2faverage-distances-from-the-origin%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

Le Mesnil-Réaume

Ida-Boy-Ed-Garten

web3.py web3.isConnected() returns false always