Re: Integral confusion
- To: mathgroup at smc.vnet.net
- Subject: [mg107291] Re: Integral confusion
- From: Simon <simonjtyler at gmail.com>
- Date: Mon, 8 Feb 2010 03:35:11 -0500 (EST)
- References: <hkm7d8$os0$1@smc.vnet.net>
On Feb 7, 7:15 pm, Jon Joseph <josco.... at gmail.com> wrote: > All: Is this integral wrong? If not could someone explain the minus sign > inside the log? > > Integrate[1/(x + 1) - 1/(x + 6), x] // Simplify > > log(-2 (x + 1)) - log(2 (x + 6)) > > Thanks, Jon.= The integral is correct (just take its derivative and see). >From the look of the unsimplified output In[1]:= Integrate[1/(x + 1) - 1/(x + 6), x] Out[1]= 5 (1/5 Log[-2 (1 + x)] - 1/5 Log[2 (6 + x)]) I think that Mathematica is doing a Together before the integral. If you integrate each term separately, you get what you'd expect In[2]:= Integrate[{1/(x + 1), -1/(x + 6)}, x] Out[2]= {Log[1 + x], -Log[6 + x]} But of course, the different branches of Log only differ by a constant -- which is exactly what indefinite integrals don't care about. If x > 1, then you can simply factor out the minus sign using In[3]:= Log[-1] Out[3]= I \[Pi]