I am (just for fun) trying to calculate the velocity with which the moon would impact the earth if it stopped orbiting and simply headed towards earth.   I know the force is $\frac{G m_1 m_2}{r^2}$.  How do I calculate a final velocity resulting from a varying acceleration which in turn is dependant on a varying force which in turn is dependant on a varying distance.
The Problem For a small mass a distance $R_i$ away from the center of the Earth, how long would it take for the object to fall to the surface of the Earth, assuming that the only force acting upon the object is the Earth's gravitational force?  Relevant Information The following discussion seems to have solved exactly the same problem:   However, upon working out the mathematics, I'm not exactly sure how to evaluate the constant of integration.   A Partial Solution $$ F=\frac {-GMm}{s^2} $$ $$ a=\frac {-GM}{s^2} $$ $$ \frac {dv}{dt} = \frac {-GM}{s^2} $$ Multiplying by $v$ and then integrating by $dt$ on both sides, we have $$\frac {1}{2} v^2=\frac {GM}{s} +c_1$$ where $c_1$ is a constant of integration. Substituting initial conditions of $v=0, s=R$, we have $$\frac {1}{2} v^2=GM(\frac {1}{s}-\frac{1}{R})$$  At this point of time, when I use Wolfram Alpha, I get  $$c_2+\sqrt{\frac{2}{R}}t=\frac{\sqrt{s}(s-R)+R\sqrt{R-s}\times{\tan^{-1}(\sqrt{\frac{s}{R-s}})}}{\sqrt{GM(R-s)}}$$  where $c_2$ is a constant of integration. Substituting initial conditions of s=R, t=0, we find that the term $$\tan^{-1}(\sqrt{\frac{s}{R-s}})$$ is undefined. At this point, I'm stuck. Any ideas on where I've made the mistake here?  (For those interested, this question was inspired by the Greek myth which states that a bronze hammer dropped from heaven would take 9 days to hit the Earth and would reach on the tenth).
I saw a dog.       I have seen a dog.   What are the differences between them? Did these events happen on the same day? How to create script with auto-complete? When I use program like svn and I type in Gnome Terminal:  svn upd   and hit Tab it's autocompleted to:  svn update   Is it possible to do something like that in my custom bash script? Which kind of pointer do I use when? The  (click on your number of helpful flags in your profile) is cool, however some posts have a gray background, some don't. What does it mean?  example: My mother is given a UK tourist visa for 2 years with a duration of stay as 180 days. It is a c type multiple entry visa. Is this 180 days is the total stay she can take or is it duration of stay per visit.  Thanks in advance for your reply. R: Trouble using SMOTE package "invalid 'labels'" Using SMOTE package from DMwR library. After loading the data frame, I try to perform sampling as follows :   crime_bal$target &lt;- as.factor(crime_bal$target) crime_bal &lt;- SMOTE(target ~ .,crime_bal,perc.under = 200, perc.over = 100)   But it always ends up to this error :   Error in factor(newCases[, a], levels = 1:nlevels(data[, a]), labels = levels(data[,  :    invalid 'labels'; length 0 should be 1 or 2 In addition: Warning messages: 1: NAs introduced by coercion  2: NAs introduced by coercion    Details of my dataset :   &gt; summary(crime_bal)      text               url            target    Length:6326        Length:6326        0:5994    Class :character   Class :character   1: 332    Mode  :character   Mode  :character   Why do I always end up with the error? MiKTeX and Perl scripts (and one Python script) Let $\{X_\alpha\}_{\alpha\in J}$ be a family of topological spaces and let $X=\prod_{\alpha\in J}X_\alpha$ be endowed with the product topology. Show that $X$ is path connected if and only if each $X_\alpha$ is path connected.  I know this is true if path coennected is changed by connection but I am very confused with this problem, I have tried to do the following:  $\Rightarrow $ let $x,y \in X_\alpha$ be then $(x_\alpha), (y_\alpha)\in \prod X_\alpha$ where $x_\alpha=x, y_\alpha=y$ and $x_\beta=0, y_\beta=0$ for any $\beta\neq\alpha$, and since P is path connected then there is continuous $f:[0,1]\rightarrow \prod X_\alpha$ such that $f(0)=(x_\alpha)$ and $f(1)=(y_\alpha)$, then if $\pi_\alpha:\prod X_\alpha \rightarrow X_\alpha$ is the projection, which is continuous, we have that $\pi_\alpha f:[0,1]\rightarrow X_\alpha$ is continuous and $\pi_\alpha (f(0))=x$ and $\pi_\alpha (f(1))=y$.  $\Leftarrow$ I do not know how to do this address, could someone help me please? Thank you very much. allow you to create code which defines the methods of classes that implement it. You cannot however add any code to those methods.    allow you to do the same thing, along with adding code to the method.   Now if you can achieve the same goal with abstract classes, why do we even need the concept of interfaces?   I've been told that it has to do with OO theory from C++ to Java, which is what PHP's OO stuff is based on. Is the concept useful in Java but not in PHP? Is it just a way to keep from having placeholders littered in the abstract class? Am I missing something? The temperature and pressure everywhere inside the Sun reach the critical point to start nuclear reactions - there is no reason for it to take such a long time to complete the reaction process.  Just like a nuclear bomb will complete all the reaction within $10^{-6}$seconds.  Why does most of the hydrogen of the Sun still not react even though it reaches the critical point, and why take stars billions of years to run out of fuel? Story about a trip to a Valley of Sound Is it possible to group several objects and then manipulate them (scale, rotate, translate) as one? So this homework question is in the context of $\mathbb{R}$ only, and we are using Lebesgue measure.  The sum $A+B$ is defined to be $A+B=\{a+b|a\in A,b\in B\}$. The question is: If $m(A),m(B)&gt;0$, is it necessarily the case that $A+B$ contains an open interval?  This question is quite annoying, since it is quite difficult to calculate the sum even after you construct an example. However, it seems like no matter how I constructed a set of positive measure, there is a region that have a lot of point in it (yet this region is not necessarily dense). This suggest that when summed up, the holes should be covered up somehow and thus there would be an open interval, and so the answer is yes. Sorry for a rather vague idea, but I'm just not sure what to do with this problem. I have a feeling that somehow topology would have a way to capture precisely the idea above about a region with a lot of point.  (also, I think my middle school teacher mentioned this once, and I remembered the answer to be yes; but that is quite a while ago though)  Thank you. Any help will be appreciated.  EDIT2: So Camilo's answer is gone. I am looking at the convolution method right now. Because the convolution is continuous, if it is nonzero I am done. But then there is no guarantee that the convolution is nonzero even if $x\in A+B$. I still need help with this direction. Can someone give me some hints?  EDIT: Camilo's answer below essentially suggest the method of getting 2 open interval from regularity theorem, one cover a subset of A and one cover a subset of B such that the sum of the measure of these two subset is bigger than the measure of the larger interval. user99680's answer point to a wiki which show a method that essentially simply acquire an open set. After some thinking, I believe that these method simply can't be made to work. I constructed this example in the hope that it would convince you that it is the case:  Let $I_{0},I_{1},\ldots$ be disjoint open interval such that the distance between any 2 of them is nonzero and $m(I_{n})=9^{-n}$ and all of them are inside $[0,2]$. Let $J_{0},J_{1},\ldots$ be disjoint open interval such that the distance between any 2 of them is at least $3$ and $m(J_{3n})=m(J_{3n+1})=m(J_{3n+2})=\frac{m(I_{n})}{3}$. Let $O=\bigcup I_{n}$ and $H=\bigcup J_{n}$. Construct $A\subset O$ such that $m(A\bigcap I_{n})=\frac{3m(I_{n})}{4}$. Construct $B\subset H$ such that $m(B\bigcap J_{n})=\frac{3m(J_{n})}{4}$. Now if you apply Camilo's method, it is possible that your $I$ would be one of the $I_{n}$ above, and your $J$ is one of the $J_{m}$ above. No matter which $I_{n},J_{m}$ you have, the argument does not work. Rewrite $m=3q+r$ where $0\leq r\leq 2$. If $q&lt;n$ then $m(J_{m})&gt;m(I_{n})$ so the longer interval have length $\frac{m(I_{q})}{3}$; $m(A\bigcap I_{n})$ is at most $\frac{3m(I_{q+1})}{4}=\frac{m(I_{q})}{12}$ and $m(B\bigcap J_{m})=\frac{3m(J_{m})}{4}=\frac{m(I_{q})}{4}$. Thus $m(A\bigcap I_{n})+m(B\bigcap J_{m})$ is no larger than the larger interval. If $n\geq q$ then $m(I_{n})&gt;m(J_{m})$ so the larger interval is of length $m(I_{n})$; $m(A\bigcap I_{n})=\frac{3m(I_{n})}{4}$ and $m(B\bigcap J_{m})$ is at most $\frac{3m(J_{3n})}{4}=\frac{m(I_{n})}{4}$. Once again $m(A\bigcap I_{n})+m(B\bigcap J_{m})$ is no larger than the larger interval. Hence the Camilo's argument does not work. user99680's method does not work either, since you get $O$ and $H$ which is even bigger than any interval. When are stopovers permitted on Japan Railways (JR) trains? According to the documentation, the  method uses a round-to-even algorithm which is not common for most applications. So I always end up writing a custom function to do the more natural round-half-up algorithm:  public static decimal RoundHalfUp(this decimal d, int decimals) {     if (decimals &lt; 0)     {         throw new ArgumentException("The decimals must be non-negative",              "decimals");     }      decimal multiplier = (decimal)Math.Pow(10, decimals);     decimal number = d * multiplier;      if (decimal.Truncate(number) &lt; number)     {         number += 0.5m;     }     return decimal.Round(number) / multiplier; }   Does anybody know the reason behind this framework design decision?  Is there any built-in implementation of the round-half-up algorithm into the framework? Or maybe some unmanaged Windows API?  It could be misleading for beginners that simply write decimal.Round(2.5m, 0) expecting 3 as a result but getting 2 instead. Update (March, 2012): This has been rolled out to all sites in the network.    Behind the scenes we've been hard at work making some changes to how we track reputation.  Here are some of the issues we're aiming to address with these changes:   Reputation Skew (your actual reputation doesn't match what's shown) Up/Down votes oddities (mostly with the daily rep cap, the magical +2) Historical Deletes (not impacting rep immediately, contributing to skew) Unaccepts (display issues in the profile) User Deletion (magically missing rep, another skew contributor)   To be clear: reputation values are not changing, every action in the system is still worth the same amount.   Here’s what will be different:   Your reputation will be correct at all times Deletions will have a much more immediate effect on reputation, not waiting on a recalc  (but reputation sync takes up to 5 minutes on a delete/undelete action; as to not block the user's response thread, it's offloaded to a background queue) Recalcs will no longer be necessary Up/Down vote reversals will restore the correct reputation amount Up/Down vote reversals will correctly adjust to the reputation cap The reputation history in your profile will be more detailed and accurate (e.g. when a post is deleted, you'll see that in the reputation tab of your profile)   This means your reputation will go up and down more than it has previously, but it will be in sync.  To think of it more easily: imagine that a recalc will be done after every action in the system.  Probably the biggest impact many will be concerned with is that you may see your reputation drop in cases where it didn't seem like it did before  This was effectively happening before, but the results of that change were not applied immediately, but on the next rep recalc.  Post deletion is the biggest factor here, previously it didn't (immediately) account for the reputation impact...that will no longer be the case.  Reputation changes from the deletion will now be applied within the hour, and most other changes will be instant.  Now the part that will make everyone throw vegetables our way:  this will require a global recalc to get everything in sync.  We'll be rolling it out first here on meta, then the rest of the network...the enabling of the detailed rep view and global recalc on each individual site will coincide.  During the rollout you will see empty reputation tabs on profiles as we transition to the new storage behind the scenes, they'll be restored as the recalc rolls though each user.  We’ll put up a blog post on  before the network-wide rollout.  If you have any questions about this change or details I may have left out, please do so in answers below so that we can clear up as much as possible before this rolls out. Proof of an inequality by induction: $(1 + x_1)(1 + x_2)...(1 + x_n) \ge 1 + x_1 + x_2 + ... + x_n$ Suppose I have this:   $\frac{6^{666}}{2^{6}}$ (mod $125$)  I saw it is possible to reduce only the numerator's power modulo Euler's phi function. Can someone explain why is that possible?  It is essentially this:   $\frac{6^{666 \space (mod \phi(125))}}{2^{6}}$ (mod $125$) Vandermonde identity corollary $\sum_{v=0}^{n}\frac{(2n)!}{(v!)^2(n-v)!^2}={2n \choose n}^2$ How to clear Chocolatey cache in the free version? Installation-file-cleaning is currently only available in  () and .  The package installation files can easily take gigabytes of storage space and to my knowledge they only increase in size as the user updates packages and installs new software, with only your hard drive capacity as the upper limit.   I don't know if Chocolatey stores cache in one central location — something is saved to ~\AppData\Local\Temp but the majority is located in the lib* folders in ~\ProgramData\chocolatey. Also the log files in the logs folder total to over 100 MB on my system. Is there any way to fully clear Chocolatey cache without manually deleting directories?