$$\int x(x^2+2)^4\,dx $$  When we do this integration with u substitution we get $$\frac{(x^2+2)^5}{10}$$ as $u=x^2+2$  $du=2x\,dx$ $$\therefore \int (u+2)^4\,du = \frac{(x^2+2)^5}{10} + C$$   Although when we expand the fraction and then integrate the answer we get is different:  $x(x^2+2)^4=x^9+8x^7+24x^5+32x^3+16x$ $$\int x^9+8x^7+24x^5+32x^3+16x \,dx$$  we get  $$\frac {x^{10}}{10} +x^8+4x^6+8x^4+8x^2 + C$$  For a better idea of the questions, let's say the questions asks us to find the value of C when y(0)=1  Now,  $x=0$  $$\frac {0^{10}}{10} + 0^8 + 4(0)^6 + 8(0)^4 + 8(0)^2 + C = 1$$ $$\therefore C= 1$$ AND $$\frac {(0+2)^5}{10} + C= 1$$ $$\therefore \frac {32}{10} + C = 1$$ $$\therefore C = 1 - 3.2 = -2.2$$
Question:  Is it possible to get multiple correct results when evaluating an indefinite integral?  If I use two different techniques to evaluate an integral, and I get two different answers, have I necessarily done something wrong?    Often, an indefinite integral can be evaluated using different techniques.  For example, an integrand might be simplified via partial fractions or other algebraic techniques before integration, or it might be amenable to a clever substitution.  These techniques give different results.  For example, looking over a few other questions on MSE:      From : evaluate $$ \int x(x^2+2)^4\,\mathrm{d}x. $$    Via the substitution $u = x^2+2$, this becomes $$ \int x(x^2+2)^4\,\mathrm{d}x       = \frac{1}{10}x^{10} + x^8 + 4x^6 + 8x^4 + 8x^2 + \frac{32}{5} + C.     $$ However, multiplying out the polynomial and integrating using the power rule gives $$ \int x(x^2+2)^4\,\mathrm{d}x       = \frac{1}{10}x^{10} + x^8 + 4x^6 + 8x^4 + 8x^2 + C    $$     From :  evaluate   $$ \int \frac{1-x}{(x+1)^2} \,\mathrm{d}x. $$    Simplifying the integrand using partial fractions then integrating gives $$ \int \frac{1-x}{(x+1)^2} \,\mathrm{d}x       = \frac{-2}{(x+1)} - \ln|x+1| + C.    $$ Via integration by parts, we get $$ \int \frac{1-x}{(x+1)^2} \,\mathrm{d}x       = \frac{x-1}{(x+1)} - \ln|x+1| + C.    $$     From : evaluate   $$ \int \frac {\tan(\pi x)\sec^2(\pi x)}2\,\mathrm{d}x. $$    Using the substitution $u = \sec(\pi x)$, this becomes $$ \int \frac {\tan(\pi x)\sec^2(\pi x)}2\,\mathrm{d}x       = \frac {\sec^2(\pi x)}{4\pi} + C.    $$ Using the substitution $u = \tan(\pi x)$, this becomes $$ \int \frac {\tan(\pi x)\sec^2(\pi x)}2\,\mathrm{d}x       = \frac {\tan^2(\pi x)}{4\pi} + C.    $$
How can I programmatically pause an NSTimer? I'm using an NSTimer to do some rendering in an OpenGL based iPhone app.  I have a modal dialog box that pops up and requests user input.  While the user is providing input I'd like to "pause" i.e. something like this:  [myNSTimer pause];   I'm using this syntax because I've been doing things like:  [myNSTimer invalidate];   when I want it to stop.  How can I programmatically pause the NSTimer? I'm trying to connect two PCs for desktop sharing, I was able to set up ssh shell and file sharing but I failed to connect to VNC server.  There are additional packages that I need to install on my machines?  And how should I fill this dialog: What is integration by parts, really? Integration by parts comes up a lot - for instance, it appears in the definition of a weak derivative / distributional derivative, or as a tool that one can use to turn information about higher derivatives of a function into information about an integral of that function. Concrete examples of this latter category include: proving that $f \in C^2(S^1)$ implies that the Fourier series of $f$ converges absolutely and uniformly, and the Taylor series expansion with the integral formula for remainder.  However, I don't feel like I really understand what integration by parts is really doing. To me, it is just an algebraic trick that follows from the fundamental theorem of calculus and the product rule. Is there some more conceptual way to think about it?  How do you think about this useful idea? Convert /etc/network/interfaces to netplan for floating IP I am new to the netplan on Ubuntu 18.04, just discovered it exists today. I have an interface that I am trying to add to create a floating IP on google cloud. It is based on this example:   I tested the example, and it works, but now I try to do the same on ubuntu, and I don't know how to convert this:  cat &lt;&lt; EOF &gt;&gt; /etc/network/interfaces auto eth0:0 iface eth0:0 inet static     address 10.190.1.1     netmask 255.255.255.255 EOF   to netplan.  The output for ls /etc/netplan is '50-cloud-init.yaml'. and the output for cat /etc/netplan/*.yaml is:  network:     version: 2     ethernets:         ens4:             dhcp4: true             match:                 macaddress: 42:01:0a:8e:00:3e             set-name: ens4   my ifconfig:  # ifconfig  ens4 ens4: flags=4163&lt;UP,BROADCAST,RUNNING,MULTICAST&gt;  mtu 1460     inet 10.142.0.62  netmask 255.255.255.255  broadcast 0.0.0.0     inet6 fe80::4001:aff:fe8e:3e  prefixlen 64  scopeid 0x20&lt;link&gt;     ether 42:01:0a:8e:00:3e  txqueuelen 1000  (Ethernet)     RX packets 9430  bytes 1635180 (1.6 MB)     RX errors 0  dropped 0  overruns 0  frame 0     TX packets 13383  bytes 1513428 (1.5 MB)     TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0   What is the equivalent of what he said to put in the file, for netplan? PHP validation/regex for URL I've been looking for a simple regex for URLs, does anybody have one handy that works well?  I didn't find one with the zend framework validation classes and have seen several implementations. How do I remove this wall plate with no visible screws? I'm amazed how complicated this wall plate is to remove. It is made of plastic and accommodates a phone jack and a coaxial cable. Please see the images that accompany this question. I've searched it thoroughly and there are no tabs anywhere on the face or edges to press in. There are no screws. I've pulled on it pretty hard, hoping that it would pop off, but if I pulled any harder it surely would break. Of course, I had the coaxial off while I tried to remove the plate. The brand name on the phone jack part is &quot;KRONE&quot;. Has anyone seen a wall plate like this? If so, how do you remove it? I have to say, I'm absolutely blown away by how ridiculously difficult this is. Any help would be appreciated. Emails Per Invocation Still Capped at 100? What are the advantages of a custom ROM over rooted stock? Dilemma: Present Perfect Or Perfect Continuous? How can I tell if a CVE has been fixed in Ubuntu's repositories? Today a couple of buffer overflows in NTP were announced , . It looks like updating my system to fix these issues is in order.   How can I find out if they have been fixed in the Ubuntu repositories, such that if I were to run:   sudo apt-get update sudo apt-get upgrade   then the fix would get installed and the vulnerability closed?   Edit: The selected answer specifically addresses the question of how to identify if a given CVE has been fixed or not, "Does Ubuntu generally post timely security updates?"  is certainly related but not identical How do electromagnetic waves travel in a vacuum? This is perhaps a total newbie question, and I will try to formulate it the best I can, so here it goes. How does an electromagnetic wave travel through for example, the vacuum of space?   I usually see that waves are explained using analogies with water, pieces of rope, the strings of a guitar, etc, but it seems to me that all those waves need a medium to propagate. In fact, from my point of view, in those examples the wave as a "thing" does not exist, it's just the medium that moves (involuntary reference to The Matrix, sorry).   But in space there is no medium, so how does a wave travel? Are there free particles of some sort in this "vacuum" or something? I believe , so supposedly there isn't a medium for the wave to travel through.   Moreover, I've seen other answers that describe light as a perturbation of the electromagnetic field, but isn't the existence of the field, potential until disturbed? How can it travel through something it does not exist until it's disturbed by the traveling light in the first place? (this last sentence is probably a big misconception by me). I have a small issue with my Ubuntu (I think After an upgarde). When I try to login (Login Screen), I get disconnected and get back to the screen (again &amp; again).  I tried:   Trying to login with others Desktop environements. Booting from old kernel. log in via command line [apt-get update &amp;&amp; apt-get upgrade]. removing ~/.gconf directory. sudo apt-get install --reinstall ubuntu-desktop and sudo apt-get install unity   None of these solutions worked. Integrable function whose Fourier transform is not integrable Iterate two Lists or Arrays with one ForEach statement in C# New Beamer Version: Transparent Title Page Boxes Best practices for storing UI settings? How can I animate the Restrict Visibility property of an object? Please let me know how to change the size of the camera view. The red dotted line of the square is too small for me. How to show that $P(A\cup B) = P(A) + P(B) - P(A\cap B)$ Say we have a venn diagram with A on the left, intersection C in the middle and B on the right.   I want to show that $P(A\cup B) = P(A) + P(B)  - P(A\cap B)$  I know what it can be written as A+B+C, but a lot of the proofs  go from:  $P(A\cup B) = P(A) + P(B)  + P(C)$ to  $P(A) + P(B) = P(A\cup B)  + P(C) $  and then rearrange to  get the proof and get $P(A\cup B) =P(A) + P(B)-  P(C) $ . I just don't get how the left side of the inequality get go from $P(A\cup B)$  to $P(A) + P(B)$. Doesn't that only happen if we assume that they are disjoint. In this case, do we assume that they are disjoint? I know how to write the proof but just having a hard time actually understanding it. How to get status start_date and end_date from status_track table? I have two tables:   things:  +------+----------------+------------+ | id   | current_status | created_at | +------+----------------+------------+ | 7770 | active         | 2016-08-09 | +------+----------------+------------+  thing_status_tract:  +----------+-------------+-----------+---------------------+ | thing_id | status_from | status_to | changed_at          | +----------+-------------+-----------+---------------------+ |     7770 | incomplete  | inactive  | 2016-08-09 16:26:22 | |     7770 | inactive    | active    | 2016-08-10 12:31:04 | +----------+-------------+-----------+---------------------+    I need data in the following form. This table has a status and its corresponding start and end timestamp for a particular thing_id:  +----------+-------------+---------------------+---------------------+ | thing_id | status      | status_start_date   | status_end_date     | +----------+-------------+---------------------+---------------------+ |     7770 | incomplete  | 2016-08-09 00:00:00 | 2016-08-09 16:26:22 | |     7770 | inactive    | 2016-08-09 16:26:22 | 2016-08-10 12:31:04 | |     7770 | active      | 2016-08-10 12:31:04 | now()               | +----------+-------------+---------------------+---------------------+   How to do that with a SQL query?