Sum of Absolute Differences Inequality
Inequality involving rearrangement: $ \sum_{i=1}^n |x_i - y_{\sigma(i)}| \ge \sum_{i=1}^n |x_i - y_i|. $
Time ordering operator if commutator is $c$-number function incoming mail just sits in the drop folder $\sqrt{c+\sqrt{c+\sqrt{c+\cdots}}}$, or the limit of the sequence $x_{n+1} = \sqrt{c+x_n}$ (Fitzpatrick Advanced Calculus 2e, Sec. 2.4 #12)  For $c \gt 0$, consider the quadratic equation $x^2 - x - c = 0, x &gt; 0$.  Define the sequence $\{x_n\}$ recursively by fixing $|x_1| \lt c$ and then, if $n$ is an index for which $x_n$ has been defined, defining  $$x_{n+1} = \sqrt{c+x_n}$$  Prove that the sequence $\{x_n\}$ converges monotonically to the solution of the above equation.  Note: The answers below might assume $x_1 \gt 0$, but they still work, as we have $x_3 \gt 0$.    This is being repurposed in an effort to cut down on duplicates, see here: .  and here: . How do you use Excel server-side? A client wants to "Web-enable" a spreadsheet calculation -- the user to specify the values of certain cells, then show them the resulting values in other cells.  (They do NOT want to show the user a "spreadsheet-like" interface. This is not a UI question.)  They have a huge spreadsheet with lots of calculations over many, many sheets.  But, in the end, only two things matter -- (1) you put numbers in a couple cells on one sheet, and (2) you get corresponding numbers off a couple cells in another sheet.  The rest of it is a black box.  I want to present a UI to the user to enter the numbers they want, then I'd like to programatically open the Excel file, set the numbers, tell it to re-calc, and read the result out.  Is this possible/advisable?  Is there a commercial component that makes this easier?  Are their pitfalls I'm not considering?  (I know I can use Office Automation to do this, but I know it's not recommended to do that server-side, since it tries to run in the context of a user, etc.)  A lot of people are saying I need to recreate the formulas in code.  However, this would be staggeringly complex. Theme Image Style for image located in module directory Exit strategies for "chameleon questions" I'm not sure if there's already an existing term for this, so I'm inventing my own. (tl;dr: I call them &quot;chameleon questions&quot; because they change every time you submit or edit an answer.  If you're already intimately familiar with the phenomenon, please skip past the first set of bullet points to where I ask for recommendations.)  I think many of us have experienced this on occasion:  You open up a narrow-looking question, usually dealing with some specific error message.  The question probably contains a snippet of sloppy but not quite awful code; code indicating that the author, typically a new/low-rep user, possibly a , doesn't really know what they're doing.  I'm not trying to be condescending here, they're probably very intelligent and hardworking, but in this specific case, they're clearly in way over their head.  However, as a question, it's not really too bad.  The goal and problem are both clearly stated.  The code is formatted (sort of).  Mort was polite and checked their spelling.  The question looks answerable, although from a rep perspective* it's an obvious dead-end, it's had maybe 3 views in the past 30 minutes.  So you decide, you know what, this person took the time to write up the question properly, they deserve an answer, put on your good citizen hat and throw them a bone.  You slog through the ugly code, find the offending line, direct their attention to it and explain why it's wrong and how it needs to be fixed.  Later, they leave a comment saying that yes, that was indeed the problem and your answer helped them fix it (great!).  Oh, but, now there's another problem (uh-oh...). Something else is broken.  After letting out a long sigh, you read the comment and/or edited question, roll up your sleeves, and write up Take 2, hoping that's the end of it.  And of course it's not the end.  Now maybe the error is gone, but it's not doing what it's supposed to.  If you're anything like me, your patience is now starting to wear thin. It's lousy code and you didn't volunteer to help them rewrite their whole app.  And of course, the question still only has 12 views, and nobody has upvoted either the question or your answer, including the person you're helping, so this is turning out to be a genuinely thankless task in all respects.  Welcome to &quot;Family Tech Support&quot;, Web 2.0 Edition.   * Which is of course just an arbitrary number that none of us care about. Not really, anyway. Not very much, at least.  So, here's where I get to my question.  At this point, do you:  Leave a comment, stating as politely as possible that you've done your best to help them answer the original question they asked, and if they have a new problem then they should start a new question?  (I did this once, and actually ended up with an accept, but I felt kind of guilty afterwards, I don't think anybody answered their 2nd question).  Bite the bullet and edit your answer a 3rd, 4th, 5th time, however many times it takes to resolve their issue, knowing full well that they may not even remember to accept the answer once you're done? (I may work for free on SO, but that doesn't mean my time is worthless.)  Just abandon the question, hoping that it will force Mort to start thinking for himself?  Something else?   I've tried all three of the above and none of them ever quite feel right. I do want to help, but at the same time there are a lot more &quot;lucrative&quot; questions I could be answering. And I don't mind spending a lot of time on an answer either, if the question is interesting or important to me, but debugging is dull work. I'd prefer not to reference specific questions here; I'm pretty sure that this is a shared experience, and my objective isn't to point fingers at &quot;misbehaving&quot; members.  I'm more looking for some practical advice on how to dig myself out of these pits of despair. Anybody have any other ideas? Let $X$ be a non-negative random variable and $F_{X}$ the corresponding CDF. Show,   $$E(X) = \int_0^\infty (1-F_X (t)) \, dt$$   when $X$ has : a) a discrete distribution, b) a continuous distribution.   I assumed that for the case of a continuous distribution, since $F_X (t) = \mathbb{P}(X\leq t)$, then $1-F_X (t) = 1- \mathbb{P}(X\leq t) = \mathbb{P}(X&gt;  t)$. Although how useful integrating that is, I really have no idea. Can a polymorphed creature use class features that don't require speech or hand gestures? The Polymorph spell states (in part):     The target’s game statistics, including mental ability scores, are   replaced by the statistics of the chosen beast. It retains its   alignment and personality.      The creature is limited in actions it can perform by the nature of its   new form, and it can’t speak, cast spells, or take any other action   that requires hands, or speech.   So, can a polymorphed Paladin use their Divine Smite class feature?  It expends a spell slot, but it is not a spell, and as far as we can tell does not require hands or speech.  We know (based on the 10th level Transmutation Wizard feature) that a wizard is supposed to be able to polymorph herself, and we can assume that she is also supposed to be able to maintain concentration needed to stay in the new form (otherwise it would be a pretty useless ability).  This is (as far as I can tell) not something any of the beasts eligible as polymorph targets can normally do.  So it is clear that the polymorphed creature maintains some abilities from her old form.  The question is which ones.    The Druid's Wild Shape ability explicitly says you can use class features, while Polymorph does not, suggesting that you can't use class features while polymorphed.  However, Wild Shape also explicitly says that you can continue to concentrate on a spell (see below, emphasis mine), and Polymorph does not, yet we believe that a polymorphed creature can continue to concentrate on the polymorph spell.  So the fact that Wild Shape explicitly allows something and Polymorph is not explicit about it does not necessarily mean that the polymorphed creature cannot do those things.  From Wild Shape rules:     You can't cast spells, and your ability to speak or take any action   that requires hands is limited to the capabilities of your beast form.   Transforming doesn't break your concentration on a spell you've   already cast, however, or prevent you from taking actions that are   part of a spell, such as call lightning, that you've already cast.   So, since Polymorph is silent on the question of whether or not class abilities can be used, and states only that the polymorphed creature cannot perform actions that require hands or speech, how can we best determine whether (RAI) polymorphed creatures maintain any of their old abilities beyond spell concentration? On my Amazing 2GB EeePC Surf, I have no more space left!  This is quite normal, and it happens every now and then. Just delete a few large, unneeded files and everything should be good, right?  So I go and find a 2MB file in /tmp, and rm -rf it. Check free space again, and -- still nothing?!  I had to remove about 30MB of files before it registered some free space.  Now, my question is, what's up with this strange behaviour? Outlook: scheduling recurring out-of-office? In Outlook, is there a way (or an add-on that can do it) to schedule a recurring out-of-office message?  I work 4 10's, so I'm out of the office every Monday, and it's a bit of a pain to have to reset my out-of-office message every single week. What does the comma operator , do? I am looking for a single word for a person who is able to explain himself very clearly and using the best possible words, etc. I am not looking for "perspicuous", etc. The focus is more on the language part: someone who uses the right language and words to describe himself. I know the word exists but its just skipping my head at the moment!!! Please help. What is known about $\mathcal C^\infty$ functions $\mathbb R\to\mathbb R$ that always take rationals to rationals? Are they all quotients of polynomials? If not, are there any that are bounded yet don't tend to a limit for $x\to +\infty$? If there are, then can we also require them to be analytic?  (This is basically just a random musing after I found myself using trigonometric functions twice in unrelated throwaway counterexamples. It struck me that it was kind of conceptual overkill to whip out a transcendental function for the purpose I needed: basically that it had to keep wiggling forever. I couldn't think of a nice non-trancendental function to do this job, however, and now wonder whether that is because they can't exist). Contradiction between law of conservation of energy and law of conservation of momentum? Yesterday, while studying a simple question, a rather strange doubt hit my mind:     Consider a ball of mass $m$ moving with velocity $v$ that collides with a wall in a perfectly elastic collision and rebounds back with the same velocity. Taking the direction of initial motion of the ball as positive, the change in momentum of the ball is $-2mv$ and the wall is clearly at rest.   So, in order to obey the law of conservation of momentum, the wall must gain a momentum of $2mv$.  Now, this itself confused me a lot. I then applied the law of conservation of kinetic energy to this situation, and clearly the magnitudes of the initial and final velocities of the ball are equal, so kinetic energy of the ball is conserved and hence the final kinetic energy of the wall must be zero in order to conserve energy.  Now, this contradicts with the law of conservation of momentum, which says that the wall must gain momentum of $2mv$.  One more point: If we are talking about a wall then it is an important fact, which must be considered, that the wall is fixed on earth and so the mass of the wall is equivalent to that of earth, say $M$. If the law of conservation of momentum is applied now then we get velocity of the wall, say $V=2mv/M$ which is no doubt an extremely small value. But, the law of conservation of energy strictly says that the velocity of the wall must be exactly zero, not even the smallest value is allowed (theoretically speaking).   Please clarify this and correct me anywhere if I'm wrong. I have tried my best to make it clear what I want to ask :). How to drive multiple LEDs from a Li-ion battery (with varying voltage)? The FAQ says that Community Wiki works:     by transferring ownership of the post   from the original author to the   community. They make the post easier   to edit and maintain by a wider group   of users, but they do not contribute   to any user's reputation.   But using the new edit suggestion system, everyone can edit. It's no longer true that community wiki makes a post easier to edit.  Does community wiki still serve a function?    What are good examples of community wiki mode doing what it's supposed to do? In counting degrees of freedom of a linear molecule, why is rotation about the axis not counted? What does "All things X" mean? I've seen the expression in some company names; for example , .  Is the expression "All things X" a parody of some other popular phrase, or does it have its own meaning? Or is it just a misuse of grammar? Easier way to debug a Windows service Why are bash tests so picky about whitespace?