I'm going through Stewart's Calculus, and in section 7.3, example 7 asks for $\int \tan^3(x)dx$. In the book, the solution is $\frac{\tan^2(x)}{2} - \ln|\sec x| + C$. This was obtained in the following way: $\int \tan^3(x) dx = \int (\sec^2(x) - 1)\tan(x)dx = \int \sec^2(x)\tan (x) dx - \int \tan (x) dx = \int \sec^2(x)\tan (x) - \ln|\sec(x)|+C$ Now we let $u = \tan(x)$, so $du = \sec^2(x)dx$ and we have $\int \tan^3(x) dx = \int \sec^2(x)\tan (x) - \ln|\sec(x)| = \int u du - \ln|\sec(x)| = \frac{u^2}{2} - \ln|\sec(x)| = \frac{\tan^2(x)}{2} - \ln|\sec(x)|$ However, it seems as though there's a second method of integrating it that doesn't produce the same result. If we instead let $u = \sec(x)$ and therefore $du = \sec(x)\tan(x)dx$, we get $\int \tan^3(x) dx = \int \sec^2(x)\tan (x) - \ln|\sec(x)| = \int \sec(x) (\sec(x)\tan(x)) = \int u du - \ln|\sec(x)| = \frac{u^2}{2} - \ln|\sec(x)| = \frac{\sec^2(x)}{2} - \ln|\sec(x)|$. This site produces the same result as what I got:  So is there some kind of trig identity that I'm missing here, or did I integrate incorrectly? Taking the derivative of both solutions produces the same starting point.
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.    $$
In the book "Jurassic Park" does the Lysine Contingency actually get explained? I was watching the movie recently and noticed that one of the characters (very) briefly mentions a safety they built into the system should any of the dinosaurs escape. They called it the Lysine Contingency saying that all the dinos have been genetically modified to depend heavily on lysine in their diet, so if any of them escape they wouldn't be able to survive without the food supplements that the park gives them.   Why doesn't the story end right there? Does the Michael Crichton book actually explain this in depth? If $|f(z)|\le |g(z)|$, can we say $f$ is constant? Let $f$ and $g$ be entire functions and $g(z)\neq 0$ for all $z\in \mathbb{C}$. If $|f(z)|\le |g(z)|$, can we say $f$ is constant?  Liouville theorem says that an entire bounded function is constant, but g is not given bounded here. So I think it should be false. What else can we say about $f$? Use of quotes in GNU grep regular expressions Wildcard certificates with short hostnames? I'm trying to generate a certificate with the following subjectAltName:  hostname *.hostname hostname.mydomain.local *.hostname.mydomain.local   I generate the CSR via OpenSSL and then get the certificate from Microsoft Active Directory Certificate Services. Certificate works OK for the following alternative names:  hostname hostname.mydomain.local *.hostname.mydomain.local   But, *.hostname just doesn't work. Testing with Curl, I get the following output:  % curl https://m.example/ curl: (51) SSL: certificate subject name '*.example' does not match target host name 'm.example'   If, on the other hand, I add 'm.example' as a subjectAltName, then it works. So, wildcard with shortened hostname just refuses to work. Why won't my villagers breed Is it better to have an ErrorDocument 404 redirect back to the homepage or a standard 404 error page? How can I use variables in the LHS and RHS of a sed substitution? Askers should be able to close their own question as a duplicate Solving an equation over the reals: $ x^3 + 1 = 2\sqrt[3]{{2x - 1}}$ Solve the following equation over the reals:$$ x^3  + 1 = 2\sqrt[3]{{2x - 1}} $$ I noticed that 1 is a trivial solution, then I tried raising the equation to the 3rd, then dividing the polynomial by $(x-1)$.. But I can't see the solution, how do I go from here? Are there fewer positive integers than all integers? In our 6th grade math class we got introduced to the concept of integers. With all the talk about positive and negative, it got me wondering. Is the amount of elements in $\mathbb{Z^+}$ less than the amount of elements in $\mathbb{Z}$?  Here is how I thought of it. If we have $\mathbb{Z^+}$ and add one element to the "back" of it ($\mathbb{Z}^{\geq-1}$) there are certainly more elements in that new set, so there must be more elements in $\mathbb{Z}$ than in $\mathbb{Z}^+$ but on the other side if we try to express the amount of elements in them "numerically" (In a loose sense of the word) they both have $\infty$ elements.    So what is the right answer? Is there even one?  (Please note I am a bit of a layman when it comes to mathematics)  Edit: About the possible duplicate, I am not looking for a bijection between the two sets, I am looking for if they even have the same number of elements and why a bijection shows that they do/don't Calculate the area on a sphere of the intersection of two spherical caps Given a sphere of radius $r$ with two spherical caps on it defined by the radii ($a_1$ and $a_2$) of the bases of the spherical caps, given a separation of the two spherical caps by angle $\theta$, how do you calculate the surface area of that intersection?   To clarify, the area is that of the curved surface on the sphere defined by the intersection. At the extreme where both $a_1,a_2 = r$, we would be describing a spherical lune.   Alternatively define the spherical caps by the angles  $\Phi_1 = \arcsin(a_1/r)$ and $\Phi_2 = \arcsin(a_2/r)$. Invoking Java main method with parameters from Eclipse During development (and for debugging) it is very useful to run a Java class' public static void main(String[] argv)  method directly from inside Eclipse (using the Run As context menu).  Is there a similarily quick way to specify command line parameters for the run? What I do now is go to the "Run Dialog", click through the various settings to the tab where I can specify VM and program arguments and enter them there.  Too many steps, plus I do not want to mix the more permanent runtime configuration settings with the one-off invokation parameters. What I want instead is to check a box somewhere (or have a separate menu item "Run as Java application with command line") and then be prompted for the commandline every time (with a nice history). At the start of A New Hope, when the corvette is being attacked, C3PO says something to the effect of:     There'll be no escape for the princess this time.   But when Luke stumbles onto Leia's message in R2D2, C3PO seems to not know who the figure in the message is:     I'm afraid I'm not quite sure, sir. I think she was a passenger on our last voyage. A person of some importance, sir - I believe.   Is C3PO feigning ignorance to protect her, or does he really not recognize her? When is a clause not essential? I am having trouble figuring out when to use commas to set off &quot;nonessential&quot; information.  Sometimes it's obvious:  Bob, who is thirty years old, is an alcoholic.  But other times I'm not sure:  The day he quits drinking * he will start a llama farm He has his heart set on owning El Duderino ranch * in New Mexico.  In the first case, my ear says that there should be a comma at *, even though information before it seems essential to me.  In the second case, the stuff after * is not essential, and yet it seems a little much to use a comma. Even that last sentence I wrote confuses me.  &quot;In the second case&quot; seems essential but I used a comma.  Is this correct? Does it depend on personal style and the length of the clause?  Or perhaps I'm misinterpreting the meaning of &quot;essential&quot; in this context? KDB: apply dyadic function across two lists The tablet functionality stops working after I wake my Lenovo Tablet from sleep mode (closing &amp; opening lit). The error message is "Tablet Serial Wacom Tablet (Lenovo X201) removed" (screenshot: ). In the system settings under input devices it states that "No tablet device is detected". Only a restart helps and the touch screen works again.  This error appeared only after upgrading from Kubuntu 12.04 to 14.04. In 12.04 the same error message appeared after waking from sleep mode, but then another followed that the tablet was activated again and it worked properly. Any ideas how this could be fixed? Windows 10 "Enable NTFS long paths policy" option missing Author information column wise I am using authblk package and I want to achieve following output using this package. Relativity and Galaxy Rotation Speed Is there an elementary proof that $\sum \limits_{k=1}^n \frac1k$ is never an integer? If $n&gt;1$ is an integer, then $\sum \limits_{k=1}^n \frac1k$ is not an integer.  If you know , then you know there must be a prime $p$ between $n/2$ and $n$, so $\frac 1p$ appears in the sum, but $\frac{1}{2p}$ does not. Aside from $\frac 1p$, every other term $\frac 1k$ has $k$ divisible only by primes smaller than $p$. We can combine all those terms to get $\sum_{k=1}^n\frac 1k = \frac 1p + \frac ab$, where $b$ is not divisible by $p$. If this were an integer, then (multiplying by $b$) $\frac bp +a$ would also be an integer, which it isn't since $b$ isn't divisible by $p$.  Does anybody know an elementary proof of this which doesn't rely on Bertrand's Postulate? For a while, I was convinced I'd seen one, but now I'm starting to suspect whatever argument I saw was wrong.