Prove that if $f,g:\mathbb{R}\to \mathbb{R}$ are periodic and $\lim_{x\to \infty}[f(x)-g(x)]=0$,   then $f=g$   My attempt  Let $T_1$, $T_2&gt;0$ be periods of $f$ and $g$ repectively.  If $T_1/T_2 \in \mathbb{Q}$, the conclusion is trivial.  If $T_1/T_2 \in  \mathbb{R} \setminus\mathbb{Q}$, WLOG we assume that $T_2=1$.  Put $A_n=\{x:|f(x)-g(x)|&gt;\frac{1}{n}\}$. Then $\bigcup_{k=1}^\infty A_k=\{x:f(x)-g(x)\ne0\}$.  I want to show that $\{x:f(x)-g(x)\ne0\}$ is uncountable so that there exists $k\in \mathbb{N}$ such that $A_k$ is uncountable and hence the contradiction is deduced.  But I got stuck on that. Maybe it relates to the property of $\{n\alpha\}$. Any hints? Thanks in advance!
If $f(x)$ and $g(x)$ are two periodic functions, that is, $f(x+T_1)=f(x)$ and $g(x+T_2)=g(x)$ for every $x \in \Bbb R$. Now that $\displaystyle\lim_{x\to\infty}(f(x)-g(x))=0$.  Conjecture: $f(x) \equiv g(x)$.
What is so called meta-game in StarCraft 2?    What other games have this meta-game? We, as high school students have been taught that-because Bohr's model of an atom assigns specific orbits for electrons-that it is better than Rutherford's model. But what Rutherford failed to explain was why electrons don't emit EM waves &amp; fall into the nucleus. I don't see how the introduction of 'atomic orbitals' overcame this defect. Can't it still radiate EM waves? Ubuntu in VirtualBox wants to install on every boot Understanding Euclid's proof that the number of primes is infinite. In Euclid's proof, if $p_1, p_2, \dots, p_n$ are the only primes then $p_1 \times p_2 \times \dots \times p_n + 1$ is not divisible by any of $p_1, p_2, \dots, p_n$ (because of some algebraic facts), which makes another prime and is a contradiction.   The proof makes sense logically, and I tried some numerical examples to "feel" the proof better but...  $2 \times 3 \times 5\times 7\times 11\times 13+1$ is not a prime! $2 \times 3 \times 5\times 7\times 11\times 13 \times 17+1$ is also not prime! Why is the general case proof is not working for these examples? Custom one-key keyboard shortcuts in Outlook 2010 or 2013? How to plot logistic regression decision boundary? I am running logistic regression on a small dataset which looks like this:    After implementing gradient descent and the cost function, I am getting a 100% accuracy in the prediction stage, However I want to be sure that everything is in order so I am trying to plot the decision boundary line which separates the two datasets.  Below I present plots showing the cost function and theta parameters. As can be seen, currently I am printing the decision boundary line incorrectly.    Extracting data  clear all; close all; clc;  alpha = 0.01; num_iters = 1000;  %% Plotting data x1 = linspace(0,3,50); mqtrue = 5; cqtrue = 30; dat1 = mqtrue*x1+5*randn(1,50);  x2 = linspace(7,10,50); dat2 = mqtrue*x2 + (cqtrue + 5*randn(1,50));  x = [x1 x2]'; % X  subplot(2,2,1); dat = [dat1 dat2]'; % Y  scatter(x1, dat1); hold on; scatter(x2, dat2, '*'); hold on; classdata = (dat&gt;40);   Computing Cost, Gradient and plotting  %  Setup the data matrix appropriately, and add ones for the intercept term [m, n] = size(x);  % Add intercept term to x and X_test x = [ones(m, 1) x];  % Initialize fitting parameters theta = zeros(n + 1, 1); %initial_theta = [0.2; 0.2];  J_history = zeros(num_iters, 1);   plot_x = [min(x(:,2))-2,  max(x(:,2))+2]  for iter = 1:num_iters  % Compute and display initial cost and gradient     [cost, grad] = logistic_costFunction(theta, x, classdata);     theta = theta - alpha * grad;     J_history(iter) = cost;      fprintf('Iteration #%d - Cost = %d... \r\n',iter, cost);       subplot(2,2,2);     hold on; grid on;     plot(iter, J_history(iter), '.r');  title(sprintf('Plot of cost against number of iterations. Cost is %g',J_history(iter)));     xlabel('Iterations')     ylabel('MSE')     drawnow      subplot(2,2,3);     grid on;     plot3(theta(1), theta(2), J_history(iter),'o')     title(sprintf('Tita0 = %g, Tita1=%g', theta(1), theta(2)))     xlabel('Tita0')     ylabel('Tita1')     zlabel('Cost')     hold on;     drawnow      subplot(2,2,1);     grid on;         % Calculate the decision boundary line     plot_y = theta(2).*plot_x + theta(1);  % &lt;--- Boundary line      % Plot, and adjust axes for better viewing     plot(plot_x, plot_y)     hold on;     drawnow  end  fprintf('Cost at initial theta (zeros): %f\n', cost); fprintf('Gradient at initial theta (zeros): \n'); fprintf(' %f \n', grad);   The above code is implementing gradient descent correctly (I think) but I am still unable to show the boundary line plot. Any suggestions would be appreciated.    logistic_costFunction.m  function [J, grad] = logistic_costFunction(theta, X, y)      % Initialize some useful values     m = length(y); % number of training examples      grad = zeros(size(theta));      h = sigmoid(X * theta);     J = -(1 / m) * sum( (y .* log(h)) + ((1 - y) .* log(1 - h)) );      for i = 1 : size(theta, 1)         grad(i) = (1 / m) * sum( (h - y) .* X(:, i) );     end  end   EDIT:  As per the below answer by @Esmailian, now I have something like this:  [m, n] = size(x);  x1_class = [ones(m, 1) x1' dat1']; x2_class = [ones(m, 1) x2' dat2'];  x = [x1_class ; x2_class] Prove $2^k+1$ divisible by 3 for odd K I will be transferring between two international flights at Tokyo Narita airport. I'm scheduled to depart the same day I arrive. I am planning to stay within the airport during the layover. Does anyone know if I will require a transit visa at Narita? I just got a new hat! :D screaming with joy Looking at so many users looking all exquisite with their stunningly 'fitted' hats, I'm wondering if there's an option to resize or rotate a hat?  PS: Happy Winter Bash everyone! :) Our 21 month old toddler will use the potty when we leave her bottom bare - she has been successfully doing this for a month. Tired of cleaning stinky diapers, we leave her bottom bare when she is home.   She doesn't particularly enjoy wearing diapers, and when we put one on her, she doesn't take the initiative to tell us that she has to use the potty. However, when we have company over, we put a diaper on her.  We are trying to transition her into wearing panties; however, she is very opposed to them. She equates them with pants and doesn't want to wear them. While she is fully capable of dressing herself in pants, she hasn't mastered taking her pants off yet.   How do you introduce underwear to your child? When do people normally introduce underwear to their child? How do I explain the concept of having to take her panties off before using the potty?  We in no way want to discourage her use of the potty, as she seems to really enjoy pooing/peeing outside (she claps for herself whenever she uses the potty). But if she is interested in potty training herself, I do want to show her the concept of an underwear. My parents are Indian Citizens. They hold a valid B2 Tourist Visa to USA. I'm planning to book a flight with Hyderabad (India) - Abu Dhabi (UAE) - Dublin (Ireland) - USA. The leg from Hyderabad to Dublin is operated by Etihad and I know there is no problem hopping at Abu Dhabi. The leg from Dublin to US is operated by Aer Lingus. I called Aer Lingus customer care agent told me a transit visa is required to land in Dublin. She did not care to ask for the citizenship of traveller or about the USA visa. I went through Irish immigration website - (), India is not in list of countries that require transit visa. I'm now confused. Can some one confirm if they traveled with the same itinerary recently  Update: I called Aer Lingus again. Another agent told as long as I don't exit the airport, a transit visa is not required. I think these people don't really understand trouble we go through when boarding is denied. I put this question because I read a person was denied boarding earlier - . His case mentions about denied because of different day. But I see his transit time is 12 hours only. How to prove that the set $A = \left\{ {p:{p^2} < 2,p \in {\Bbb Q^+}} \right\}$ has no greatest element? More specifically, I have to find a $q$ in $A$ such that $q$ is larger than any $p$ in $A$.  The only thing I can think of is using (${2 - {p^2}}$) somehow, or ${(p+x)^2}&lt;2$, but other than that I don't know how to proceed. This exercise is taken from the very first chapter of Walter Rudin's Principles of Mathematical Analysis. Quoting the exercise:     To do this, we associate with each rational $p &gt; 0$ the number:     $$q = p - \frac{{{p^2} - 2}}{{p + 2}} = \frac{{2p + 2}}{{p + 2}}$$   But he didn't explain how he came up with that number.   The only thing I've thought of is the following procedure:  $$\eqalign{   &amp; {p^2} + (2 - {p^2}) = 2 \Rightarrow {p^2} + (\frac{{2 - {p^2}}}{2}) &lt; 2,{\text{ and since }}2 - {p^2}{\text{ is always positive,}}  \cr    &amp; {p^2} &lt; \left[ {{p^2} + (\frac{{2 - {p^2}}}{2})} \right] &lt; 2  \cr    &amp; {\text{Therefore, let }}q = \sqrt {{p^2} + (\frac{{2 - {p^2}}}{2})} ,{\text{ then:}}  \cr    &amp; p &lt; q &lt; \sqrt 2  \cr} $$  However, my result doesn't necessarily belong to ${\Bbb Q}$. I wonder how did he obtain the value of $q$ in the book.  EDIT: Feel free to point out if there are more appropriate tags for this question. In a certain case, the user will be asked to confirm if he/she wishes to leave the page, due to editing a post, even when he/she has stopped editing.  To reproduce:   Start editing a post (I've only experienced this with a question) Another user finishes editing the post before you and the message "This post has been edited" appears Clicking on the message bar will take you out of editing mode and will show you the updated post from the other user's edits Trying to navigate away from the page will then ask for your confirmation A "Cantor-Schroder-Bernstein" theorem for partially-ordered-sets If A and B are partially-ordered-sets, such that there are injective order-preserving maps from A to B and from B to A, is there necessarily an order-preserving bijection between A and B ? Iphone 4 won't update past a 7.1.2 What statistical test to use for discrete predictor and response variables? I'm doing a statistical analysis of a model for college. It's modelling a bear catching fish and I'm asking will the amount of time taken to digest the fish have an effect on the amount of fish caught? (stupid question I know!) So the predictor variable is the amount of fish the bear can eat before it needs to digest and the response variable is the amount of fish it catches. The predictors varies between 1 and 30 in integers and the response is also in integers. I repeated each level of the predictor 5 times creating a sample size of 150 altogether. I was thinking of just using a simple correlation test such as cor.test in R, but I've read online that this is for continuous data. Does that matter or would this test still be appropriate? Thanks a million, Eamon Why is removing instationarities a good thing when trying to forecast a time series? Lower bound for $\phi(n)$: Is $n/5  1$? Is it true that :  $\frac {n}{5} &lt; \phi (n) &lt; n$ for all $n &gt; 1$ where $\phi (n)$ is  .  Since $\phi(n)$ has maximum value when $n$ is a prime it follows that maximum value of $\phi(n)$ in term of $n$ is $n-1$ , therefore $\phi(n)&lt; n$ for all $n$. What is the best lower bound for $\phi(n)$? Remove rogue app from menu bar I have a rogue item on my menu bar from a terrible piece of printer/scanner software. I long ago removed the app, but the button for the app remains in the menu bar.   Is there any central way for me to remove an item from the menu bar? Any plist I can hack? command line trick, etc?  It's the one to the left of the Facebook icon:    (I tried holding Command and dragging it away, but it doesn't seem to respect that convention.) How to calculate the limit of $\frac{a_n}{n^2}$ for the sequence $a_{n+1}=a_n+\frac{2 a_{n-1}}{n+1}$? Assume $\{a_n\}$is a sequence which  satisfies the following recursion formula: $$a_{n+1}=a_n+\frac{2a_{n-1}}{n+1}~(n\geqslant 1).$$ and $a_0=\pi,a_1=\pi^2 $. How to compute $\displaystyle\lim_{n\to \infty}\frac{a_n}{n^2}$?