How I can prove that if $A$ is a ring and $f\in A$ is not nilpotent then $A_f\cong A[T]/(Tf-1)$?   My attempt is the following.  I define the homomorphism $\phi : A[T]\longrightarrow A_f$ in this way: $\phi(a):=a/1$ and $\phi(T^n)=1/f^n$. Now, of course $(Tf-1)\subseteq \ker \phi$, but I'm not able to prove the reverse inclusion.
I am having trouble with the following problem.      Let $R$ be an integral domain, and let $a \in R$ be a non-zero element. Let $D = \{1, a, a^2, ...\}$. I need to show that $R_D \cong R[x]/(ax-1)$.    I just want a hint.  Basically, I've been looking for a surjective homomorphism from $R[x]$ to $R_D$, but everything I've tried has failed. I think the fact that $f(a)$ is a unit, where $f$ is our mapping, is relevant, but I'm not sure. Thanks
Determining if an Object is of primitive type I have an Object[] array, and I am trying to find the ones that are primitives. I've tried to use Class.isPrimitive(), but it seems I'm doing something wrong:  int i = 3; Object o = i;  System.out.println(o.getClass().getName() + ", " +                    o.getClass().isPrimitive());   prints java.lang.Integer, false.  Is there a right way or some alternative? A weighted version of random.choice Database general error: 2006 MySQL server has gone away Recently I started getting an error every time I try and add a content no matter what type.  This is the error that shows up in the browser:     Additional uncaught exception thrown while handling exception.        Original   PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT COUNT(cid) FROM {comment} WHERE status = :status; Array ( [:status] =&gt; 0 ) in comment_count_unpublished() (line 313 of /Applications/MAMP/htdocs/modules/comment/comment.module).        Additional      PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: INSERT INTO {watchdog} (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9); Array ( [:db_insert_placeholder_0] =&gt; 1 [:db_insert_placeholder_1] =&gt; php [:db_insert_placeholder_2] =&gt; %type: !message in %function (line %line of %file). [:db_insert_placeholder_3] =&gt; a:6:{s:5:&quot;%type&quot;;s:12:&quot;PDOException&quot;;s:8:&quot;!message&quot;;s:154:&quot;SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT COUNT(cid) FROM {comment} WHERE status = :status; Array ( [:status] =&amp;gt; 0 ) &quot;;s:9:&quot;%function&quot;;s:27:&quot;comment_count_unpublished()&quot;;s:5:&quot;%file&quot;;s:56:&quot;/Applications/MAMP/htdocs/modules/comment/comment.module&quot;;s:5:&quot;%line&quot;;i:313;s:14:&quot;severity_level&quot;;i:3;} [:db_insert_placeholder_4] =&gt; 3 [:db_insert_placeholder_5] =&gt; [:db_insert_placeholder_6] =&gt; ; [:db_insert_placeholder_7] =&gt;  [:db_insert_placeholder_8] =&gt; 127.0.0.1 [:db_insert_placeholder_9] =&gt; 1338336955 ) in dblog_watchdog() (line 154 of /Applications/MAMP/htdocs/modules/dblog/dblog.module).   I also get the following error in my php error file:     PHP Fatal error:  Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 2006 MySQL server has gone away' in /Applications/MAMP/htdocs/includes/database/database.inc:2136        Stack trace:   0 /Applications/MAMP/htdocs/includes/database/database.inc(2136): PDOStatement->execute(Array)   1 /Applications/MAMP/htdocs/includes/database/database.inc(664): DatabaseStatementBase->execute(Array, Array)   2 /Applications/MAMP/htdocs/includes/database/database.inc(2315): DatabaseConnection->query('SELECT expire, ...', Array, Array)   3 /Applications/MAMP/htdocs/includes/lock.inc(167): db_query('SELECT expire, ...', Array)   4 /Applications/MAMP/htdocs/includes/lock.inc(146): lock_may_be_available('theme_registry:...')   5 /Applications/MAMP/htdocs/includes/theme.inc(447): lock_acquire('theme_registry:...')   6 /Applications/MAMP/htdocs/includes/bootstrap.inc(427): ThemeRegistry->set(Array)   7 [internal function]: DrupalCacheArray->__destruct()   8 {main}         thrown in /Applications/MAMP/htdocs/includes/database/database.inc on line 2136   I am having a little trouble deciphering these error messages. Could anyone help me understand what's going on here? Show that $d_2$ defined by $d_2(x,y)=\frac{|x-y|}{1+|x-y|}$ is a metric I am pretty sure that this is such a stupid, stupid question, but how do you prove that $d_2(x,y)={|x-y|\over {1+|x-y|}}$ satisfying the third condition to be a metric, which is the triangle inequality.   I know that I should really be able to do this, but I just can't, I keep seeing a contradiction. Please help me. Redirecting stdout to a file you don't have write permission on Open source computer algebra systems for general relativity I would like to use an open source computer algebra system (CAS) for research in general relativity. Kindly suggest a good choice between Ipython and Sage. I am more interested in the theoretical aspect rather than numerical computations. I computed the homology groups of the torus, can someone tell me if this is correct? The calculation, not the result that is. Thanks!  The cells of $T^2$ are $e^0, e^1_a, e^1_b, e^2$  The chain groups are  $$ C_0(T^2) = \{ k e^0 |&#160;k \in \mathbb{Z} \} = \mathbb{Z}$$  $$ C_1(T^2) = \{&#160;k_1 e^1_a + k_2 e^1_b |&#160;k_1 , k_2 \in \mathbb{Z} \} = \mathbb{Z} \oplus \mathbb{Z}$$  $$ C_2(T^2) = \mathbb{Z}$$  $$ C_k(T^2) = \{ 0 \} , k &gt; 2$$  Now the homology groups:  $$ H_0(T^2) = \ker \partial_0 / im \partial_1 = \mathbb{Z} / 0 = \mathbb{Z}$$  where $im \partial_1 = 0$ because there is no chain in $C_1(T^2)$ whose boundary is a zero-chain in $C_0(T^2)$. (Is this reasoning correct?)  $$ H_1(T^2) = \ker \partial_1 / im \partial_2 = \mathbb{Z} \oplus \mathbb{Z}$$  where $\ker \partial_1 =  \mathbb{Z} \oplus \mathbb{Z} $, i.e. again everything maps to zero because there is no element in $C_1$ whose boundary maps to an element in $C_0$.  $im \partial_2 = 0$ again because there is no element in $C_2$ whose boundary is an element of $C_1$.  I don't want to use Hurewicz to do $H_1$.  $$ H_2(T^2) = \mathbb{Z}$$ using similar arguments as above.  Thanks for your help.  Edit  I posted the computations as an answer below. I got two up votes but I don't know by who so I'm not yet sure I can trust them... Limit of a function with powers (L'Hopital doesnt work) I have a little problem with limit of this function:  $\lim_{x \to \infty} x^2(2017^{\frac{1}{x}} - 2017^{\frac{1}{x+1}})$  I have tried de L'Hopital rule twice, but it doesn't work. Now I have no idea how to do it. I understand if you travelling in or to the US, you can lock your luggage using the TSA Luggage Lock. (Immigration is still able to open your luggage using their own special keys)  How about Europe? Especially Heathrow + Charles de Gaulle?    If the TSA Lock is not acceptable in Europe, are there any other alternative precautions I could use instead?  (FYI, information about the ) Is CAT5 cable good enough for RS-485 vs "true" RS-485 cable If I take r as the radial vector of the moving object and v as the velocity vector of the moving object in central force field.   Then r should be perpendicular to r×v . So that depicts that r.(r×v) = 0 . So how does this say that the particle is lying on a constant plane ? Can my familiar use a Ring of Spell Storing? Can the familiar options from the Pact of the Chain warlock (quasit, imp, sprite, pseudodragon) attune with a ring of spell storing?  If so, can I cast a spell requiring concentration into the ring and then have the familiar maintain concentration on the spell? Two Answers, One Question Sometimes, when I answer a question on Stack Overflow, I have two different answers that are equally valid. This happens most when answering architectural questions where there are many valid ways to solve a problem.  Is it better to put each alternative into a single answer, or put each alternative in its own answer?  Posted each alternative separately will allow the voting system to float the best answer to the top, but I don't want to be accused of rep whoring by "flooding" a question with answers.  What's your opinion? One or two answers? Find probability using distribution function method Let $X_1$ and $X_2$ be two independent random variables with distribution $U(0,1)$. Let $Y=|X_1-X_2|$. Find the distribution function and density of $Y$.   Solution:  f(x1)=1 whenever x1 between 0 and 1          =0 Else where f(x2)=1 whenever x2 between 0 and 1          =0 Else where f(x1,x2)=1 whenever x1,x2 between 0 and 1           =0 Else where G(y)= P[-y &lt;= x1-x2 &lt;= y]       =\int_{-y}^y \int_{x1_y}^{y+x1} 1 dx2 dx1       =\int_{-y}^y -2y dx1       =4y^2 when y between 0 and 1       =0 when y less than 0       =1 when y greater than 1 Thus, g(y)= \diff G(y) =8y  Is it correct? What's the difference between passing by reference vs. passing by value? What is the difference between    a parameter passed by reference a parameter passed by value?   Could you give me some examples, please? Egg replacer for bread dough? I've been reading (most) questions and answers (here) about baking bread (which I love) and how to replace eggs in many recipes (which I wish I didn't need). Turns out, I too have egg allergy (not too severe) and a few of my favorite breads require one or more eggs.  So far I've seen two options, in many threads, that look promising: Ener-G egg replacer and replacing eggs with flax. However, not a single use case I've seen here is about bread. I'm looking for an option to replace 1-3 eggs in a bread dough with: 500 g of white wheat flour, 200 ml of milk, 50-80 g of butter, a variable amount of sugar (5-50 g) and 20-30 g of fresh yeast.  Examples of this dough are the , the  and a similar recipe from Galicia (northwest Spain) with even more eggs. And so many other breads, but these are my favorite ones :)  Has anyone tried flax or ener-g on a similar bread dough? Installing PHP 5.6 on Xenial (16.04) I need to use php5 (5.6) because I'm working on a Drupal 7 project which doesn't support php7. The problem is I recently updated to ubuntu 16.04 Xenial which seems to .   I tried to install it from , however when It try to install it with apt I always get similar errors.  $ sudo apt-get install php5-cli Cependant les paquets suivants le remplacent :   php7.0-cli:i386 php7.0-cli`   Which means it's obsolete. How can I install PHP 5.6 on Xenial? Existence of the moment generating function and variance Determine whether the series $\sum_{n=1}^{\infty}(\frac{n}{n+1})^{n^2}$ is convergent or divergent.  I've tried applying all the basic tests to no avail. I need to find out what the "trick" for this particular series is. How to see data from .RData file?