As I know gravitational potential energy of an object relative to $U=0$ point is defined as $U(h)=mgh$ and this came from work-energy theorem.  But In my book, there is another definition for it.  Consider that we have 2 objects that can interract with each other by gravitational force. Set the first object steady. Now, there is $\vec{r_{0}}$ distance between these two objects. Move the second object $d\vec{r}$ in direction $\vec{r_{0}}$/$\hat{r_{0}}$. Let's call $\vec{r}$ to new distance.  Work done by us (agent),  $$\vec{F}_{g}=-G\frac{M_{1}M_{2}}{r^2}\hat{r}$$  $$\vec{F}_{ag}=-\vec{F}_{g}=G\frac{M_{1}M_{2}}{r^2}\hat{r}$$  $$W(\text{done by us})=W_{ag}=\int_{r_{0}}^{r}\vec{F}_{ag}.d\vec{r}$$  $$W_{ag}=\int_{r_{0}}^{r}{G\frac{M_{1}M_{2}}{r^2}\hat{r}.dr\hat{r}}$$  $$W_{ag}=GM_{1}M_{2}\int_{r_{0}}^{r}{\frac{1}{r^2}dr}$$  $$W_{ag}=GM_{1}M_{2}(-\frac{1}{r}+\frac{1}{r_{0}})$$  $$W_{ag}=-G\frac{M_{1}M_{2}}{r}+G\frac{M_{1}M_{2}}{r_{0}}$$  $$r_{0}\to\infty\Rightarrow G\frac{M_{1}M_{2}}{r_{0}}=0$$  $$U(r)=-G\frac{M_{1}M_{2}}{r}$$  This is it. What is the difference?
Newton's Law of Universal Gravitation tells us that the potential energy of object in a gravitational field is $$U ~=~ -\frac{GMm}{r}.\tag{1}$$  The experimentally verified near-Earth gravitational potential is  $$U ~=~ mgh.\tag{2}$$  The near-Earth potential should be an approximation for the general potential energy when $r\approx r_{\text{Earth}}$, but the problem I'm having is that they scale differently with distance.  $(1)$ scales as $\frac 1r$.  So the greater the distance from the Earth, the less potential energy an object should have.  But $(2)$ scales proportionally to distance.  So the greater the distance from the Earth, the more potential energy an object should have.  How is this reconcilable?
What is the limit of:  $$\lim_{n\to \infty} \frac{n^1+\dots+n^n}{1^n+\dots+n^n} = ?$$  I did some computation with big numbers, I guess it is in the interval $\left(\frac{1}{2},1\right)$. I have two screens on my Windows 8.1 computer (with Classic Shell Start Menu installed). The thing is that I would like to have the taskbar's  (where the clock and all the icons like Skype or Spotify are, at the right) on both of my screens, and not only on the primary one.  Could you help me ? I would like not to install a heavy and paid software like DisplayFusion. Why isn’t the definite article used in "The commission commanded that work [...] should cease"? In this sentence:     The commission commanded that work on the building should cease.   Why isn't the used before the word work? It seems that the work is specified by on the building.  Another example is,     Construction of the building will start next week.   I understand construction here is something like putting up the building, and so the construction isn’t general in meaning. But the definite article isn’t used here, either.  I’ve asked about this several times, but none gave me a good answer. How do I generate random integers within a specific range in Java? How many objects are being created? What's the Best Way to Shuffle an NSMutableArray? If you have an NSMutableArray, how do you shuffle the elements randomly?  (I have my own answer for this, which is posted below, but I'm new to Cocoa and I'm interested to know if there is a better way.)    Update: As noted by @Mukesh, as of iOS 10+ and macOS 10.12+, there is an -[NSMutableArray shuffledArray] method that can be used to shuffle. See  for details. (But note that this creates a new array, rather than shuffling the elements in place.) This should be a fairly trivial problem. I'm trying to open an ofstream using a std::string (or std::wstring) and having problems getting this to work without a messy conversion.  std::string path = ".../file.txt";  ofstream output;  output.open(path);   Ideally I don't want to have to convert this by hand or involve c-style char pointers if there's a nicer way of doing this? What is Kirito's relationship with the girls of SAO? For simple linear regression, the regression coefficient is calculable directly from the variance-covariance matrix $C$, by  $$ C_{d, e}\over C_{e,e} $$ where $d$ is the dependent variable's index, and $e$ is the explanatory variable's index.  If one only has the covariance matrix, is it possible to calculate the coefficients for a model with multiple explanatory variables?   ETA: For two explanatory variables, it appears that $$\beta_1 = \frac{Cov(y,x_1)var(x_2) - Cov(y,x_2)Cov(x_1,x_2)}{var(x_1)var(x_2) - Cov(x_1,x_2)^2} $$ and analogously for $\beta_2$. I'm not immediately seeing how to extend this to three or more variables. Can someone point me to a proof that the set of irrational numbers is uncountable? I know how to show that the set $\mathbb{Q}$ of rational numbers is countable, but how would you show that the irrationals are uncountable? How much energy does lowering an object into a black hole generate? An object of mass m is slowly lowered into a black hole of mass 1000 m. Is the amount of braking energy larger than $0.6 mc^2$?   Now what if, after lowering the mass close to the event horizon, we wait the black hole to shrink to mass 100 m, by emitting Hawking radiation, and then we lower the mass some more? Is the braking energy of the second lowering process larger than $0.5 mc^2$?   I wonder can we extract more than $E=mc^2$ energy from mass m?  (In this thought experiment we use a wire and a winch, or anything that works) Suppose that I have a group $G$ of order $p^{2}q$ for two distinct primes $p$ and $q$.  I need to first show that one of its Sylow subgroups is normal.  I start by letting $H$ be a Sylow $p$-subgroup and $K$ be a Sylow $q$-subgroup.  If $K$ is not normal, then letting $r$ denote the number of Sylow $q$-subgroups, I have that $r|p^{2}$ and $r\equiv 1$(mod $q$).  I also have by the second Sylow theorem that $r\neq 1$.  So $r = p$ or $p^{2}$.  If $r = p^{2}$, I can write out the Sylow $q$-subgroups, and count their combined elements to show that $H$ is uniquely determined and then again imply Sylow number $2$ to obtain that $H$ is normal.  But if $r = p$, then I cannot see how to proceed.  Can anyone give any advice?  Thank you.  ( I am happy to provide more detail for the $r = p^{2}$ case if it is desired or appropriate. ) cd into all directories, execute command on files in that directory, and return to previous current directory I'm attempting to write a script that will be run in a given directory with many single level sub directories. The script will cd into each of the sub directories, execute a command on the files in the directory, and cd out to continue onto the next directory. What is the best way to do this? Why does gulp.src not like being passed an array of complete paths to files? let a,b be real  numbers and $\varepsilon&gt;0$. prove the above inequality. I dont know how to even start. please, I need your help. Is a DNA molecule a single strand of polynucleotide or two of them linked together? 10 hour layover in Moscow Russia, do I need a transit visa? On June 29th 2015, I will be traveling for the first time to Italy from USA. I will have a 10 hour layover in Moscow Russia. My question is, do I need a visa to visit the city? Why don't Jedi (or Sith) use the Force to snap their foes' necks? I understand that the Jedi use the Force for self defence, but still, couldn't they just use the Force to snap their foes' necks and be done with it? Like when Jaina Solo was hunting down Darth Caedus. Or even when Caedus was duelling Grand Master Skywalker. If he just used the Force to snap Skywalker's neck (like he did to poor Lieutenant Tebut), it will all be over very fast.  Is there a canon reason why Jedi and Sith don't use their powers to directly harm their opponents? What are the prerequisites for studying mathematical logic? I am looking to study mathematical logic, however, I find that introductory books are very daunting, which kind of disheartens me. You see, slowly but surely, I started to realize that the maths which I have learned did not just pop out of thin air, but is a collection of systems, which must of been developed via some other system, i.e, maths did not develop itself.  So I began to look into the origins of mathematics, and read that it was developed via a type of logic, which exists sort of by 'default', via a set of axioms, and then of course I looked up the definition of axioms.   So given that I'd be studying a type of logic whose origins are self evident axioms, naturally I believed there would be no prerequisites. However, in looking up mathematical logic, I have come across things such as Boolean algebra, sets, first order logic, some other type of logic, called 'traditional logic', as well as references to a sort of calculus, though not in a mathematical sense, I think.  So all in all, I am trying to develop a type of mental spider web, and I am trying to find out the strands which lye at the absolute bounds so that I may learn this mystique logic. Though I have no idea where to start.  Side note: This is the book I have started reading:   Credit goes to Wolfgang Rautenberg. What does a resistor do? OK, very basic question here.  I read lots of books, searched quite a bit, and every description I read seemed to talk about the flow of electrons and right away go too deep in theory for me to grasp the basic principle of their use.  I understand a resistor limits the "flow", so that an LED doesn't blow up for example. But I fail to understand exactly what a resistor does to current and voltage...  Do resistors affect both current and voltage? In what manner?