I'd like help with this problem:
I have two integers, x and y so that x &lt; y. How many prime numbers are there between x and y (exclusive). Is there a formula or algorithm to compute?
Retrieving Maxwell's equations from the minimum action principle I'm currently working at the start of Alexei Tsvelik's book Quantum Field Theory in Condensed Matter Physics. I'm kinda stumped on a few essential steps.  Starting with the action:  $$S = \int dt \int d^3 x \mathcal{L}_{\mathrm{EM}} = \int dt \int d^3 x \left( -\frac{1}{4} F_{\mu \nu} F^{\mu \nu} + j_\mu A^{\mu}\right).$$  In the absence of any sources $j_\mu = 0$ and $c=1$, which after pulling in the negative sign implies  $$S = \frac{1}{2}\int dt \int d^3 x  \,\,\left(E^2 - B^2\right)$$ The next step is to take $\vec{E} = -\vec{\nabla} \phi + \partial_t \vec{A}$ and $\vec{B} = \vec{\nabla} \times \vec{A}$. Letting $\phi = 0$ and directly inserting these into the above yields:  $$S = \frac{1}{2} \int dt \int d^3 x  \,\left( (\partial_t \vec{A})^2 - (\vec{\nabla} \times \vec{A})^2 \right) $$  Now considering $\vec{A} = \vec{A}_0 + \delta \vec{A}$ as some minimal change in our vector potential, with $\vec{A}_0$ gives a minimum for the action and putting this into the above expression we have: $$\delta S = \int dt \int d^3 x \left(\partial_0 \vec{A}_0 \partial_0 \delta \vec{A} + \left(\vec{\nabla} \times \vec{A}_0\right)\cdot\left(\vec{\nabla} \times \delta \vec{A} \right) \right)+ \mathcal{O}(A^2)\,\,\,\,\,\,\, (1)$$ where I have the term  $$\mathcal{O}(A^2) = \int dt \int d^3 x \left( (\partial_0 \vec{A}_0)^2 + (\partial_0 \delta \vec{A})^2 - (\vec{\nabla}\times\vec{A}_0)^2-(\vec{\nabla}\times \delta\vec{A})^2\right)$$  The next step is where I lose our author and go from "Oh ok I get this" to "completely clueless". He rewrites $\delta S$ as:  $$\delta S =  \int dt \int d^3 (\delta x) \vec{A} \mathcal{F(\vec{A}_0)}+ \mathcal{O}(A^2)$$  where $\mathcal{F} = \frac{\delta S}{\delta A}$. What is the purpose of $x\to \delta x$ in the above expression? Is the functional derivative $\mathcal{F}$ a vector quantity? He has it bolded with a bolded $\vec{A}$ in the above expression. One last question takes the above expression further. We assume $\delta \vec{A}$ vanishes at infinity, as it should, and integration by parts yields:  $$\delta S =  -\int dt \int d^3 x \left( \partial^2_0 \vec{A}_0 - (\vec{\nabla} \times \vec{\nabla})\times \vec{A}_0  \right)\delta \vec{A}\,\,\,\,\,\,\,\, (2)$$ How exactly did we go from (1) to (2)? Thanks I appreciate your time! Make Bash autocomplete guess the closest approximation I have a somewhat uncomfortable keyboard on my laptop, resulting in that I sometimes misspell things in Bash and when pressing Tab for an auto-completion nothing happens.   Is it possible to have Bash guess what I meant to type, by for example when wanting to change directory to Documents and then mistyping cd ocum[TAB], given no other folder beginning with "ocum" is present, Bash interprets it as cd Documents/ since it is the closest possible action to do?   Or is this idea terribly complicated to achieve? Affiliation for a retiree This question is similar to   and  except that I am a retiree.  I intend to submit a paper to a journal without mentioning any affiliation because I am no longer employeed. I have been thinking about a footnote in the paper indicating I am a retiree from my former employer for two reasons: I am receiving pension from the company pension fund and it is a well-known company in U.S. Using their name may make me look good. On the other hand, I feel like it's cheating because I am not their employee anymore. How to write a function (piecewise) with bracket outside? I'm trying to prove that the characteristic of any field $F$ is either $0$ or a prime number, but I have no idea what to do.  Help? Debugging scripts, what is the difference between -x to set -euxo pipefail? The main way I know to debug scripts is adding -x to the shabang (#!/bin/bash -x).  I recently came across a new way, adding set -euxo pipefail right under the shabang, as in:  #!/bin/bash set -euxo pipefail   What is the main difference between the two ways of debugging? Are there times you would prefer one above the other?  As a freshman, , I couldn't extract such conclusion. Will yearly moderation statistics be published on all sites this year, and future years? How to add multiple relative hyperlinks to single point in ArcGIS for Desktop with Basic level license? Explain what is a transistor in plain English! Mixed DML operation error I am facing Mixed DML error in the following case:  static testmethod void method1() {     User u1 = DataFactory.createUser('testUser','test@user.com','permissionSetAPIname');        Obj1 rec1 = DataFactory.createrec1('Record1');     insert rec1;      Obj2 rec2 = DataFactory.createrec2('Rec2',rec1,system.today()-10, system.today()+10 );     insert rec2;       Obj3 rec3 = DataFactory.createrec3(rec2,'Tester',u1,'US');     insert Role;      test.starttest();         //testing code      test.stoptest();  }   However the following is working fine  static testmethod void method1() {      User u1 = new User(Alias = 'testRole',                   Email             = 'role@test.com',                   EmailEncodingKey  = 'UTF-8',                   LastName          = 'user',                   FirstName         = 'test',                   LanguageLocaleKey = 'en_US',                   LocaleSidKey      = 'en_US',                   ProfileId         = [select Id from Profile where Name = 'Basic User' limit 1].Id,                   TimeZoneSidKey    = 'America/Chicago',                   Username          = 'stakeholder@test' + Math.round(Math.random() * 10000) + '.com',                   UserRoleId        = null,                   Country           = 'Great Britain');     insert u1;         Obj1 rec1 = DataFactory.createrec1('Record1');     insert rec1;      Obj2 rec2 = DataFactory.createrec2('Rec2',rec1,system.today()-10, system.today()+10 );     insert rec2;       Obj3 rec3 = DataFactory.createrec3(rec2,'Tester',u1,'US');     insert Role;      test.starttest();         //testing code      test.stoptest();  }   Please explain the difference. As my understanding is that transaction remains the same in both the cases. Referring to unidimensional motion, it is obvious that it doesn't always make sense to write the speed as a function of position. Seems to me that this is a necessary condition to derive formulas like:  $$v^2=v_0 ^2 +2\int_{x_0}^{x}a\cdot dx$$  In fact, in the first step of the demonstration (the one I saw, but I think that this step is crucial) it's required to write $a=dv/dt=(dv/dx)(dx/dt)$, that doesn't make sense if $v$ isn't a function of $x$.   When can one rigorously write $v=v(x)$? How do I remove duplicate items from an array in Perl? I have an array in Perl:  my @my_array = ("one","two","three","two","three");   How do I remove the duplicates from the array? Long story short  I have two computers: a laptop and a desktop computer. Both have Windows 7 on them.  I buy the Windows 8 Pro upgrade. To see if it screws up anything, I install it on my laptop as a guinea pig. I intend to use Windows 8 for my main computer, my desktop, but I want to test it on the laptop, so I know I don’t risk losing access to my desktop and the data on it. I never use my laptop, and only used it, because it already has a Windows 7 installation on it.  The problem  At some point, I must have entered the license key on my laptop, because when I go to the activation screen on my desktop, I get this:    Uh-oh. I can’t use the key on my desktop. Now how the hell do I transfer the key from my laptop to my desktop computer?  Answers and suggestions so far  Let’s just say that I tried everything possible to get some answers on this matter. The best response I got from Microsoft is this:     To install Windows 8 on your desktop, do the following:         Uninstall Windows 8 on your laptop   Afterwards, install Windows 8 on your desktop   If it won’t activate, call product activation at (...)      I am not a fan of that last point. The error message does allude to such a solution, however:     If you’ve reinstalled Windows or made changes to your hardware recently, you may be able to use your current key.   The question  My main question is this: has anyone been in a similar situation, and if so, what did you do to resolve this?  Failing that, what is the proper way to   uninstall the Windows 8 installation on my laptop, and reinstall the Windows 8 installation on my desktop?   Ad 1  I have already tried using the “reset” feature on my laptop, but that only resulted in a new Windows 8 installation that was already activated. But which is the right way to uninstall the installation in a way that allows me to use the license key on the desktop computer?  Ad 2  Which is the proper way to reinstall the Windows 8 installation on my desktop computer? Why do I even have to reinstall it in the first place?  I won’t get around to do this, until my USB key with 3.0 support arrives in the mail, but it is going to be a while, until I find a assuaging response to the best way to go about this anyway. Possible Duplicate:          Both words seem to be used interchangeably. I generally don't differentiate between them and intuitively pick one over the other. Is there a standardized way to distinguish between the two? I had recently entered the UK without a visa to be with my partner, from 21 July 2016 until 16 December 2016. I hope to return on the 9th of January. We don't meet the income requirement for a Spouse visa. I recently applied to university, and got in, and was intending to return to the UK on a student visa, but my university did not tell me about maintenance fees and my loan wasn't large enough to cover it all, so my visa would have been denied.  Now, I am hoping to attend university in the next semester, and therefore return to the US to apply for that visa. Do you think that if I try to return to the UK without a visa, I will be turned away?  I won't be working or studying during this time, however, I'm afraid that they'll consider it living in the UK illegally; I don't have a criminal record or anything like that. What is ground and what does it do? I read it in Reader's Digest in the seventies. Archaeologists interpreted everyday objects as the TV set and the toilet seat to be sacred and precious. Can comments be used in JSON? What to do with bounty on question which is no longer relevant? Increasing extent of Raster?