If $f:[a,b] \to \mathbb{R}$ is continuous and increasing, then the inverse $f^{-1}$ exists and   $$\int_a^b f(x)dx + \int_{f(a)}^{f(b)} f^{-1}(x)dx = f(b)b - f(a)a.$$  This is obvious by looking at a graph where the integrals are areas of regions that cover a rectangle of area $f(b)b$ with a rectangle of area $f(a)a$ removed.  I recall this is proved rigorously using integration by parts but I can't reconstruct the proof.  Can anyone please help?
Suppose $f$ is a continuous, strictly increasing function defined on a closed interval $[a,b]$ such that $f^{-1}$ is the inverse function of $f$. Prove that,   $$\int_{a}^bf(x)dx+\int_{f(a)}^{f(b)}f^{-1}(x)dx=bf(b)-af(a)$$   A high school student or a Calculus first year student will simply, possibly, apply change of variable technique, then integration by parts and he/she will arrive at the answer without giving much thought into the process. A smarter student would probably compare the integrals with areas and conclude that the equality is immediate.  However, I am an undergrad student of Analysis and I would want to solve the problem "carefully". That is, I wouldn't want to forget my definitions, and the conditions of each technique. For example, while applying change of variables technique, I cannot apply it blindly; I must be prudent enough to realize that the criterion to apply it includes continuous differentiability of a function. Simply with $f$ continuous, I cannot apply change of variables technique.  Is there any method to solve this problem rigorously? One may apply the techniques of integration (by parts, change of variables, etc.) only after proper justification.  The reason I am not adding any work of mine is simply that I could not proceed even one line since I am not given $f$ is differentiable. However, this seems to hold for non-differentiable functions also.  I would really want some help. Pictorial proofs and/or area arguments are invalid.
What is the best solution for database connection pooling in python? I have developed some custom DAO-like classes to meet some very specialized requirements for my project that is a server-side process that does not run inside any kind of framework.    The solution works great except that every time a new request is made, I open a new connection via MySQLdb.connect.    What is the best "drop in" solution to switch this over to using connection pooling in python?  I am imagining something like the commons DBCP solution for Java.    The process is long running and has many threads that need to make requests, but not all at the same time... specifically they do quite a lot of work before brief bursts of writing out a chunk of their results.  Edited to add: After some more searching I found  which looks decent, but as I'm relatively new to python I guess I just want to make sure I'm not missing a more obvious/more idiomatic/better solution. Windows 7, file properties, date modified, how do you show seconds? Anyone know a way to immediately show the seconds of a file's date modified property in the GUI? So if you create a file, any file in any directory, right-click and choose Properties, the date modified (if it's recent) will say something like "dd/mm/yyy hh:mm, one minute ago" - reminder this is in Windows 7. Windows XP did it normally. Then they changed something.  If you wait a while, eventually you'll see the seconds, I'm not sure how long a while is, but this is incredibly annoying if you want to troubleshoot something that relies on the seconds of timestamps... is there a setting? registry key I can change perhaps?  I'm literally using Chrome, pasting in the path of the directory to be able to see the seconds quickly (as a workaround) but would be nice to be able to use Win7. Using sets of arguments from a list I'm developing a  application, and I'm using constant NSStrings as ways to store key names for my preferences.  I understand this is a good idea because it allows easy changing of keys if necessary. Plus, it's the whole 'separate your data from your logic' notion.     Anyway, is there a good way to make these constants defined once for the whole application?     I'm sure that there's an easy and intelligent way, but right now my classes just redefine the ones they use. Cost Distance Analyst In QGIS? Are there any tools, plugins or methods in QGIS which allows for an analysis of the best path between two points using least cost path method? As shown below ArcGIS has several distance tools. Unitl now I haven't found the option to enable the curved representation of connectors between nodes. The  doesn't mention such an  option. Is there a keyboard shortcut? Isomorphism between $\Bbb R$ and $\Bbb R(X)$? My questions are:     $1.$ Is there a field morphism $\Bbb R(X) \hookrightarrow \Bbb R$ ?      $2.$ If the answer to $1.$ is "yes", are $\Bbb R$ and $\Bbb R(X)$ isomorphic as fields?   $ $    $ $  For $1.$, here are some comments:   This is true for $\Bbb C$, see . The key point here is the fact that $\Bbb C$ is algebraically closed, of cardinality $2^{\aleph_0}$, and of characteristic $0$. The same argument doesn't work for $\Bbb R$. We can actually find a subfield $F$ of $\Bbb R$ such that $F \cong F(X) \cong F(X,Y) \cong \cdots$, see .  that $\Bbb Q(X)$ does not embed in $\Bbb Q$ (as a field).  This is equivalent to: Is there an injective ring morphism $\Bbb R[X] \hookrightarrow \Bbb R$ ? (By taking the fraction fields).   As for 2. :   They are isomorphic as abelian groups, and actually as $\Bbb Q$-vector spaces. They are not isomorphic as $\Bbb R$-algebras, because they haven't the same transcendence degree over $\Bbb R$. Let's try to see how to construct such a field isomorphism. We could try$^{[1]}$ to find a subset $B$ of $\Bbb R$ such that $\Bbb R = \Bbb Q(B)$ and $C \subsetneq B \implies \Bbb R \neq \Bbb Q(C)$.  The set $B$ must contain transcendental elements, pick such an $x_0 \in B$.  Then $\Bbb R = \Bbb Q(B) = \Bbb Q(B \setminus \{x_0\})(x_0)$ and we could try$^{[2]}$ to find a field isomorphism $\Bbb Q(B \setminus \{x_0\}) \cong \Bbb Q(B)$, so that $\Bbb Q(B \setminus \{x_0\})(x_0) \cong \Bbb Q(B)(x_0) \cong \Bbb R(X)$.  For ${[1]}$, I tried to use Zorn's lemma on $\mathscr B = \{B \subset \Bbb R \mid \Bbb R = \Bbb Q(B)\}$ and the partial order $B_1 ≤ B_2 \iff B_1 \supset B_2$. But this is not clear to me why this should be an inductive set.  For ${[2]}$, my idea was to define $f : \Bbb Q(B \setminus \{x_0\}) \cong \Bbb Q(B)$ by choosing a bijection $b : B \setminus \{x_0\} \to B$ (these sets should be uncountable), and then trying to extend $f\vert_{B \setminus \{x_0\}} = b$ to a field morphism.     Edit for $^{[1]}$: in  article (MINIMAL GENERATING SETS OF GROUPS, RINGS, AND FIELDS, by LORENZ HALBEISEN, MARTIN HAMILTON, AND PAVEL RUZICKA) the theorem 2.4. proves that $\Bbb R$ has no minimal generating set as field (or $\Bbb Q$-algebra, i.e. as ring). The argument uses Artin-Schreier theorem. Minimal generating sets of modules are   .  I think that $B$ is a minimal generating set of a subfield $K \subset \Bbb R$ over $\Bbb Q$ if and only if any element of $B$ cannot be written as a rational fraction of other elements of $B$. Under these conditions and using (transfinite) induction, we can probably prove (and this was my first idea) that any function $f: B \to \Bbb C$ such that $b$ and $f(b)$ are conjugate over $\Bbb Q$ (i.e. have the same minimal polynomial) extends to a (unique) field morphism $\sigma : K = \Bbb Q(B) \to \Bbb C$.  Actually, the collection $\mathscr B$ defined above doesn't have to be an inductive set, at least if we replace $\Bbb R$ by $K =\Bbb Q(\sqrt 2, \sqrt[4]{2},\sqrt[8]{2},\dots)$, because the descending chain $\left(E_n = \{\sqrt[2^m]{2} \mid m \geq n\}\right)_{n \geq 1}$ satisfy $K = \Bbb Q(E_n)$, but $K \neq \Bbb Q\left(\bigcap_{n≥1} E_n\right)=\Bbb Q$, so the chain has no upper bound w.r.t. $≤$ in $\mathscr B$. How to get width of the video and scale another video to that width using ffmpeg? I'm using ffmpeg to stack two videos vertically. They might be different size so I need to scale them to same size. I have found following commands.  First one works for different sizes (but won't scale to proper size):  ffmpeg -i input1 -i input2 -filter_complex '[0:v]pad=iw:ih*2[int];[int][1:v]overlay=0:H/2[vid]' -map [vid] -c:v libx264 -crf 23 -preset veryfast output   Second one works if videos have same width and same pixel format:  ffmpeg -i input1 -i input2 -filter_complex vstack output   How to get width of first input inside complex filter argument so second input could be scaled to same width? What would be the command to do so? I would prefer vstack filter since it should be faster than combination of pad and overlay. How can you sync Blender configs between multiple machines? I run Blender on several machines, it is a hassle to copy configs around, in order that you don't have to configure everything from scratch every time. Is there a sync functionality that does this? Changing Date format and appending to original file I have file like this called a.txt:  [2016-03-30T04:51:51.599-04:00]!ER_DEV!Port_Conflict!/u05/app/ [2016-01-20T04:30:21.885-04:00]!ER_DEV!Port_Conflict!/u05/app/   I need to modify it so it looks like:    2016-03-30 04:51:51!ER_DEV!Port_Conflict!/u05/app/   2016-01-20 04:30:21!ER_DEV!Port_Conflict!/u05/app/   i already wrote a command to change [2016-03-30T04:51:51.599-04:00] to 2016-03-30 04:51:51 .but how to append the query output to original file.    awk -F'!' '{print $1}' a.txt | awk -F '[T.]' '{print $1 " " $2}' | awk '{gsub(/\[/,"")}1' Just looking for the difference between   2&gt;&amp;- 2&gt;/dev/null |&amp; &amp;&gt;/dev/null &gt;/dev/null 2&gt;&amp;1   and their portability with non-Bourne shells like tcsh, mksh, etc. Finding all functions $ f : \mathbb N^*\to\mathbb N^*$ such that for every $ x , y \in \mathbb N ^ * $, $ f ( x ) + f ( y ) \mid x ^ n + y ^ n $ Let $\mathbb N^*$ be the set of positive integers and $n$ be a fixed positive integer. How many functions $ f : \mathbb N^*\to\mathbb N^*$ are there such that for all positive integers $x$ and $y$, $f(x) + f(y)$ divides $x^n + y^n$? Degree of the extension $\mathbb{Q}(\sqrt{a+\sqrt{b}})$ over $\mathbb{Q}$ Following my  the book then asks      Use this to determine when the field extension  $\mathbb{Q}(\sqrt{a+\sqrt{b}})$ over $\mathbb{Q}$  is biquadratic (where $a,b\in\mathbb{Q}$)   "this" means what proved in the linked post.  My thoughts: First, I don't know what to say when $a^2-b$ is not a square. When $a^2-b$ is a square I think that the extension is of degree $2$ if $a=b$, this leaves the case $a\neq b$ which I am also having problems with and I don't know what to do (I have some cases like if $m,n$ are different primes then the degree of the extension is $4$, but I don't have something that is general)  Can someone please help my do this exercice  ? Suppose there is a message that is encrypted with AES-128-CBC.  The message is as follows, new lines are used to delimit the 16 byte boundary for each block:  Wire funds from: Alice to Bob in   the amount of $ 1   Because this message is encrypted using CBC mode,  any modification of the first block of cipher text would propagate throughout the message.   However, the amount of the fund transfer falls in the last block.  I am under the assumption that an attacker can use the property of  to alter the last block and produce a valid amount that is greater than \$1 in far fewer than $2^{128}$ operations.   Is this a correct assumption?  Is there a name for this attack or do you know of a real world example?    My instinct is that if you just need one byte of the 16 byte block to be of a specific value then it would only require $2^8$ operations because the other 120 bits of the plain text could be any value. For example lets say we wanted the last block of cipher text to decrypt to 9\0 (where \0 denotes a single null byte, and the message would be interpreted as \$9), then it would take only $2^{16}$ operations to find this cipher text block.  Is there something I am missing? I need to find limit points of the set $\{  \frac{1}{n} +\frac{1}{m} \mid n, m = 1,2,3,\dots \}$.  My try :   If both $m$ and $n$ tend to very large values say $\infty$ then the value of $\{ \frac{1}{n} +\frac{1}{m} \}$ tends to $0$, and if only one of $m$ or $n$ tends to very large values, then the set $\{ \frac{1}{n} \mid n=1,2,3,\dots\} $ acts as limit points.   So is it true that a set of limit points is $\{0\}$ $\cup$  $\{\frac{1}{k} \mid k=1,2,3,\dots \}$?  How should I write this proof rigorously? UILabel truncate tail and skip not complete word I read  and thought that would easily be solved (not that it isn't solvable without) if one could write:   @Override public String toString() {     return super.super.toString(); }   I'm not sure if it is useful in many cases, but I wonder why it isn't and if something like this exists in other languages.  What do you guys think?  EDIT: To clarify: yes I know, that's impossible in Java and I don't really miss it. This is nothing I expected to work and was surprised getting a compiler error. I just had the idea and like to discuss it. Emission of EM radiation from an electron I have read about an electron making a transition between two energy levels and electromagnatic radiation will be emitted. The problem is how and why e.m radiation is emitted. Is it possible to decompose a hermitian and unitrary matrix $A$ into the sum of the Pauli matrix Kronecker products?   For example, I have a matrix 16x16 and want it to be decomposed into something like $$A =\sum_{i,j,k,l}h_{ijkl}\sigma_i\otimes\sigma_j\otimes\sigma_k\otimes\sigma_l$$ I can't find any clear explanation how it can be done. I found only this for two-dimentional case: Google Chrome is my favorite browser, and I can't imagine going on without it. Suddenly (without closing and re-opening) the browser; chrome has been reading characters upside down, very weird:    Chrome version:    I tried restarting my browser and my MAC (running OS X Yosemite 10.10), but the error keeps on coming.