Join two functions to one
How to splice together several instances of InterpolatingFunction?
Why are packages in the official Ubuntu repositories older than the latest (upstream) versions from Debian Sid, PPAs, the authors, etc.? Numerical integration of divergent function I am having trouble with the numerical integration of a divergent function. For example, \begin{equation} n= \int f(x)\,dx = \displaystyle\int \dfrac{\Theta(x-\varepsilon)\,dx}{\sqrt{x-\varepsilon}} \end{equation} is not behaving good when calculated numerically: \begin{equation} n_\text{numerical} \approx f(x_j)(x_j-\varepsilon) + \sum_{k=j+1}^N f(x_k)\Delta x \end{equation} with \begin{equation} x_i = x_\text{min} + i\Delta x \end{equation} and $x_j$ being the smallest point larger than $\varepsilon$. Due to the divergent behavior of $f(x)$ near $\varepsilon$, the numerical result has discontinuities and jumps at every $\varepsilon=x_i$ when I sweep $\varepsilon$. The smoothness of this integration is crucial in the convergence of my simulations. Can anybody suggest a simple trick to solve the problem? All I need is to have a continuous numerical result by continuously changing $\varepsilon$. How to convert from one grading scheme to another? I'm trying to figure out the equivalence between grade schemes in different countries.  According to some Google results:   If you are a U.S. citizen, you need a GPA of 3.2+ (it varies, some say 3.2 and some others say 3.6, etc) to apply for a position in the UK (job or university) where the prerequisite is to have a minimum grade of 2:1. In UK 2:1 is earned if you have a 60-69% of the points. I've read that 2:1 is the same as 67%. In Spain we use a grading scheme of 10 points. So according to (2), for have a UK 2:1 you need to have 6-6.9 points. If you are Spanish and have 6.7, when converting it to GPA the result is 1.5.   However, if you take the above points and treat them as a math equation, the final result will be GPA 1.5 = GPA 3.2, which doesn't make any sense.  GPA 3.2 = UK 2:1 UK 2:1 = Spain 6.7 Spain 6.7 = GPA 1.5   Replacing now...  UK 2:1 = GPA 1.5     GPA 3.2 = GPA 1.5   My question is if someone has a better explanation on converting grades obtained in different countries. Using the same secret key for encryption and authentication in a Encrypt-then-MAC scheme Is it a weakness to use a single shared secret for protecting messages using a Encrypt-then-MAC scheme?    Assuming a system is using AES-256-CBC and a SHA1-HMAC and the same secret key for both operations.  Upon intercepting one of these messages and attacker could brute force this secret key by trying to solve the HMAC or by successfully decrypting the first block of the ciphertext.  Performing  a decryption on a single block of AES-256 should be a lighter operation than performing a SHA1-HMAC on a potentially large message.  Therefore AES-256 is ideal for a massively parallel brute-force attack and the use of the SHA1-HMAC doesn't hurt the system.  Is this approach sound, or is there an attack that has not been taken into consideration? Question about set notation: what does $]a,b[$ mean? In the following question  the notation $c\in ]a,b[$ is used. What does this mean? I have never seen it before. How do you add tags to blocks so they can only be placed on 1 type of block? Atiyah-Macdonald, Exercise 5.4 I was having some trouble with the following exercise from Atiyah-Macdonald.     Let $A$ be a subring of $B$ such that $B$ is integral over $A$. Let $\mathfrak{n}$ be a maximal ideal of $B$ and let $\mathfrak{m}=\mathfrak{n} \cap A$ be the corresponding maximal ideal of $A$. Is $B_{\mathfrak{n}}$ integral over $A_{\mathfrak{m}}$?   The book gives a hint which serves as a counter-example. Consider the subring $k[x^{2}-1]$ of $k[x]$ where $k$ is a field, and let $\mathfrak{n}=(x-1)$. I am trying to show that $1/(x+1)$ could not be integral over $k[x^{2}-1]_{\mathfrak{n}^{c}}$.  I have understood why this situation serves as a counterexample. But I am essentially stuck at trying to draw a contradiction. A hint or any help would be great. Starting scheduled task by detecting connection of USB device I know it has been discussed that it is not possible to start an application from an usb drive upon connection due to limitations of autorun (or autoplay??) in Win 7. But it is possible to create a scheduled task having an event type trigger. Surely there must be an event occurring when the drive -- or any USB device, for that matter -- is connected.    Does anybody have the slightest idea which Event ID should I use? Or at least what type of event? Where can I find the event in event viewer? Let L1 be the line passing through the point $P_1=(−11, 10, −1)$ with direction vector $\vec d_1=\begin{bmatrix}−2\\ 3\\ −1\end{bmatrix}t$, and let $L_2$ be the line passing through the point $P_2=(−8, 9, 10)$ with direction vector $\vec d_2=\begin{bmatrix}−1\\ 3\\1\end{bmatrix}t$. Find the shortest distance, $d$, between these two lines, and find a point $Q_1$ on $L_1$ and a point $Q_2$ on $L_2$ so that $d(Q_1,Q_2) = d$.   I dont really understand how to properly approach this question, how do i start? What do Android application permissions mean? When installing an application, the application lists permissions that it needs to perform its  functions.    I am creating this list of the the system defined permissions and a description of what they mean. It is a community wiki so if new permissions are added in the future they can be added to this list. Let $a_1,\dots ,a_n \in \mathbb{R}^n$ with $a_i = (a_{i1}, \dots , a_{in})$.  Show that when $\mid a_{jj}\mid \gt \sum_{i \neq j} \mid a_{ij} \mid \; \forall \; j\in \{1,\dots ,n\}$, then $a_1,\dots ,a_n$ are linearly independent.  I want to show that the matrix \begin{matrix} a_{11} &amp; a_{21} &amp; \cdots &amp; a_{n1} \\ a_{12} &amp; a_{22} &amp; \cdots &amp; a_{n2} \\ \vdots &amp; &amp; \ddots &amp; \\ a_{1n} &amp; a_{2n} &amp; \cdots &amp; a_{nn} \end{matrix} can be transformed into an upper triangular matrix with all entries in the main diagonal $\neq 0$.  For the cases $n=1$ and $n=2$ this is easy. However, I fail to show this for the general case; the problem being that the tranformations mess up the coefficients such that I can't use the assumption on the $a_{jj}$'s anymore.  I'm pretty sure that this has already been solved somewhere on here, but I don't know how to search for it. Schwarz's Lemma, fixed points question Linear Discriminant Analysis for $p=1$ I'm studying 'Introduction to Statistical Learning' by James, Witten, Hastie, Tibshirani.   In page 139, of their book, they began by introducing Bayes' Theorem $p_k(X)=P(Y=k|X=x) = \dfrac{\pi_kf_k(x)}{\sum_{l=1}^k \pi_l f_l(x)}$. $\pi$ is not mathematical constant, but denotes the prior probability. Nothing is strange in this equation.   The book claims that it wants to obtain an estimate for $f_k(x)$ that it can plug into the equation given above. To estimate $f_k(x)$, it assumes that is normal. In the one dimensional setting, $f_k(x)=\dfrac{1}{\sqrt{2\pi}\sigma}\exp(-\dfrac{1}{2\sigma^2}(x-\mu_k)^2)$, where $\mu_k$ and $\sigma^2_k$ are the mean and variance for the $k$th class. It is assumed that $\sigma^2_1 = \sigma^2_2 = \cdots = \sigma^2_K$. (I began to get confused from the last statement.)   Plugging $f_k$ into $p_x$, you have this quite messy equation (1) :   $$p_x(k)=\dfrac{\pi_k \frac{1}{\sqrt{2\pi}\sigma}\exp(-\frac{1}{2\sigma^2}(x-\mu_k)^2)}{\sum_{l=1}^K \pi_l \frac{1}{\sqrt{2\pi}\sigma}\exp(-\frac{1}{2\sigma^2}(x-\mu_l)^2)}. $$  Again, no surprises here since it is just substitution.     The Bayes' Classifier involves assigning an observation to the class for which equation (1) is the largest. Taking the log of Equation (1) and rearranging terms, it is not hard to show that this is equivalent to assigning the observation to the class for which the following is the largest:  $$\delta_k(x)=x \cdot \dfrac{\mu_k}{\sigma^2} - \dfrac{\mu_k^2}{2\sigma^2} + \log(\pi_k) $$  Question: I do not understand where this came from, and what it means. I tried doing the log of equation and it doesn't become this. Are we taking the derivative somewhere here, since this is the largest observation? breaking of output into new lines Allow user to show / hide sites in the android app Feed I am a registered user in ,  and several other sites, only because I had to ask 1 or 2 questions. In general, I have no interests in these sites, so I don't want to see them on my Feed. Is it possible to hide them somehow?   For now, I want to see only 4 sites (could be meta or non-meta) on my Feed. Notifications are not an issue, because I normally don't get any notifications from those not-interested-in-sites; I rarely participate there. "Authoring" versus "Writing" A Question On Euler's Proof Of the Basel Problem I've studied the proof that Euler gave for the famous , and it would seem that while it is technically correct, he does not justify all of his steps properly. Namely, he assumes that   $$\frac{\sin(x)}{x}=\left(1-\frac{x}{\pi}\right)\left(1+\frac{x}{\pi}\right)\left(1-\frac{x}{2\pi}\right)\left(1+\frac{x}{2\pi}\right)\dots$$  simply because they have the same roots, which is really not a strong enough condition. How do you really show that the equality holds?  He then notices that if you use the above equality, and consider it against the Taylor expansion for $\frac{\sin(x)}{x}$, then you can equate the coefficients of the two infinite expansions at each order, and the result of the Basel problem follows. But how do you know that if you have two different expansions for a function, then their coefficients at each order must be equal?  I would really appreciate if someone could show me how to make these two intuitive, yet informal, steps rigorous. Why is the Yang–Mills existence and mass gap problem so fundamental? Ref:   Can anyone please explain why the Yang–Mills Existence and Mass Gap problem is so important / fundamental to contemporary mathematics (and, presumably, theoretical / mathematical physics)?  If possible, please include the following in your answer / response:  (1) Why the problem is so fundamental / important - for both mathematics and theoretical / mathematical physics; (2) How the solution to the problem would impact research in the above two fields; (3) (If applicable) What progress has been made so far in resolving it; (references to papers, books, other resources would be helpful).  I'm an upper-level undergraduate in theoretical physics, and so am seeking an answer / response at such level. How to find P(2X>4)? This is a Binomial question. I am required to find P(2X>4), and given that X~B(10,0.2), how do I convert it to 2X~B(n,p)?  Have tried converting from P(2X>4) to P(X>2), but understand that it doesn't work that way.  Do i have to use integration or any formula that i should refer? When should we use "can", "could", "will", "would"? Most people say I wish I could, I wish you would.    Can we use I wish I can, I wish you will?    I'd like to know what the main differences between the usage of can/will and could/would are when wishing.  Is it related to the subjunctive? Because one says “I wish I were”, not “I wish I am”, so are would and could the subjunctive forms of can and will?  Or is it something else entirely?