Prev: parallel table
Next: Park's and Bergstrom's packages
From: DrMajorBob on 9 Feb 2010 02:45 > But Mathematica does (normally?) return results for indefinite integrals > without an explicit constant of integration. What's "explicit" or weird about the constants of integration in this problem? I don't know Integrate's steps in obtaining the result, but I'm sure it didn't add extraneous constants deliberately. Bobby On Mon, 08 Feb 2010 02:36:16 -0600, Nasser M. Abbasi <nma(a)12000.org> wrote: > > "Jon Joseph" <josco.jon(a)gmail.com> wrote in message > news:hkm7d8$os0$1(a)smc.vnet.net... >> 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.= >> > > Well, lets see: > > log(-2 (x + 1)) - log(2 (x + 6)) > = log(-2)+log(1+x) -log(2)-log(x+6) > = log(-1)+log(2)+log(1+x)-log(2)-log(x+6) > = log(-1)+ log(1+x) - log(x+6) > > but log(-1) = Sqrt[-1]*Pi > > so result is > > Sqrt[-1]*Pi + log(1+x) - log(x+6) > > But we all know that the result should be > > log(1+x) - log(x+6) > > So, an extra term, Sqrt[-1]*Pi term pops up. But this term is a > constant, so > its derivative is zero, i.e. a constant of integration. > > Since > > D[log(-2 (x + 1)) - log(2 (x + 6)),x] will give back > > 1/(x + 1) - 1/(x + 6) > > So, in theory, the answer given by Mathematica is NOT wrong. > > But Mathematica does (normally?) return results for indefinite integrals > without an explicit constant of integration. So I am not sure why it > does in > this case, and if it it does, why did not pick this constant? Why not > C[1] > as it does for DSolve[]? > > So, if I have to guess, I'd say this result is at least very weired, but > mathematically it is not wrong? > > --Nasser > > > -- DrMajorBob(a)yahoo.com
From: Nasser M. Abbasi on 9 Feb 2010 02:45 The "weird" thing is not what specific constant of integration it returned, but the fact that it did return one at all. Integrate[x^2, x] gives x^3/2. not x^3/2+Pi*Sqrt[-1] or x^3/2+99 even though both are correct. > I don't know Integrate's steps in obtaining the result, but I'm sure it > didn't add extraneous constants deliberately. Ofcourse. I am sure of that too. But the final result is NOT what one would normally see in a textbook or expect or do when solving by hand, even though as I said, it is correct. It is just not "normal" looking. I am sorry, I did not mean to say anything bad about Mathematica when I said this result was "weird" even though it is correct. --Nasser ----- Original Message ----- From: "DrMajorBob" <btreat1(a)austin.rr.com> To: "Nasser M. Abbasi" <nma(a)12000.org>; <mathgroup(a)smc.vnet.net> Sent: Monday, February 08, 2010 9:54 AM Subject: Re: Re: Integral confusion >> But Mathematica does (normally?) return results for indefinite integrals >> without an explicit constant of integration. > > What's "explicit" or weird about the constants of integration in this > problem? > > I don't know Integrate's steps in obtaining the result, but I'm sure it > didn't add extraneous constants deliberately. > > Bobby > > On Mon, 08 Feb 2010 02:36:16 -0600, Nasser M. Abbasi <nma(a)12000.org> > wrote: > >> >> "Jon Joseph" <josco.jon(a)gmail.com> wrote in message >> news:hkm7d8$os0$1(a)smc.vnet.net... >>> 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.= >>> >> >> Well, lets see: >> >> log(-2 (x + 1)) - log(2 (x + 6)) >> = log(-2)+log(1+x) -log(2)-log(x+6) >> = log(-1)+log(2)+log(1+x)-log(2)-log(x+6) >> = log(-1)+ log(1+x) - log(x+6) >> >> but log(-1) = Sqrt[-1]*Pi >> >> so result is >> >> Sqrt[-1]*Pi + log(1+x) - log(x+6) >> >> But we all know that the result should be >> >> log(1+x) - log(x+6) >> >> So, an extra term, Sqrt[-1]*Pi term pops up. But this term is a >> constant, so >> its derivative is zero, i.e. a constant of integration. >> >> Since >> >> D[log(-2 (x + 1)) - log(2 (x + 6)),x] will give back >> >> 1/(x + 1) - 1/(x + 6) >> >> So, in theory, the answer given by Mathematica is NOT wrong. >> >> But Mathematica does (normally?) return results for indefinite integrals >> without an explicit constant of integration. So I am not sure why it >> does in >> this case, and if it it does, why did not pick this constant? Why not >> C[1] >> as it does for DSolve[]? >> >> So, if I have to guess, I'd say this result is at least very weired, but >> mathematically it is not wrong? >> >> --Nasser >> >> >> > > > -- > DrMajorBob(a)yahoo.com
From: Andrzej Kozlowski on 9 Feb 2010 08:00 The general reason for that is that Mathematica does not compute indefinite integrals as you would do by hand but by means of a general algorithm, know as the Risch algorithm (more exactly, using various extensions of the Risch algorithm developed since Risch's original work in 1970). This algorithm is purely algebraic and works over the complex numbers, in other words, you cannot expect to obtain "real looking" answers from real integrals (but they will be "real" up to a possible complex constant). This is why you can't expect answers returned by Mathematica to be the same as you obtain by hand in general. Some computer algebra programs, when given a function to integrate, first attempt a few heuristic methods to try to get an answer of the kind that a user would be likely to get by hand and if these methods do not work switch to the Risch algorithm. Other programs do not bother with the heuristics and they go straight into the Risch algorithm. I am not sure what Mathematica does but it seems to me it is closer to the second type. Also, there are many cases when the Risch algorithm can find the integral of a function in terms of elementary functions but Mathematica returns an answer in terms of special functions. Such answers often can be obtained much more quickly and can have other advantages, but again they will look rather different from the answers obtained by hand (which usually do not involve special functions). In general it is unrealistic to expect computer programs, which work by means of general algorithms, to return the same answers as human beings obtain by hand using various heuristic tricks. Andrzej Kozlowski On 9 Feb 2010, at 08:44, Nasser M. Abbasi wrote: > The "weird" thing is not what specific constant of integration it returned, > but the fact that it did return one at all. > > Integrate[x^2, x] gives x^3/2. not x^3/2+Pi*Sqrt[-1] or x^3/2+99 even > though both are correct. > >> I don't know Integrate's steps in obtaining the result, but I'm sure it >> didn't add extraneous constants deliberately. > > Ofcourse. I am sure of that too. But the final result is NOT what one would > normally see in a textbook or expect or do when solving by hand, even though > as I said, it is correct. It is just not "normal" looking. > > I am sorry, I did not mean to say anything bad about Mathematica when I said > this result was "weird" even though it is correct. > > --Nasser > > ----- Original Message ----- > From: "DrMajorBob" <btreat1(a)austin.rr.com> > To: "Nasser M. Abbasi" <nma(a)12000.org>; <mathgroup(a)smc.vnet.net> > Sent: Monday, February 08, 2010 9:54 AM > Subject: Re: Re: Integral confusion > > >>> But Mathematica does (normally?) return results for indefinite integrals >>> without an explicit constant of integration. >> >> What's "explicit" or weird about the constants of integration in this >> problem? >> >> I don't know Integrate's steps in obtaining the result, but I'm sure it >> didn't add extraneous constants deliberately. >> >> Bobby >> >> On Mon, 08 Feb 2010 02:36:16 -0600, Nasser M. Abbasi <nma(a)12000.org> >> wrote: >> >>> >>> "Jon Joseph" <josco.jon(a)gmail.com> wrote in message >>> news:hkm7d8$os0$1(a)smc.vnet.net... >>>> 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. >>>> >>> >>> Well, lets see: >>> >>> log(-2 (x + 1)) - log(2 (x + 6)) >>> = log(-2)+log(1+x) -log(2)-log(x+6) >>> = log(-1)+log(2)+log(1+x)-log(2)-log(x+6) >>> = log(-1)+ log(1+x) - log(x+6) >>> >>> but log(-1) = Sqrt[-1]*Pi >>> >>> so result is >>> >>> Sqrt[-1]*Pi + log(1+x) - log(x+6) >>> >>> But we all know that the result should be >>> >>> log(1+x) - log(x+6) >>> >>> So, an extra term, Sqrt[-1]*Pi term pops up. But this term is a >>> constant, so >>> its derivative is zero, i.e. a constant of integration. >>> >>> Since >>> >>> D[log(-2 (x + 1)) - log(2 (x + 6)),x] will give back >>> >>> 1/(x + 1) - 1/(x + 6) >>> >>> So, in theory, the answer given by Mathematica is NOT wrong. >>> >>> But Mathematica does (normally?) return results for indefinite = integrals >>> without an explicit constant of integration. So I am not sure why it= >>> does in >>> this case, and if it it does, why did not pick this constant? Why = not >>> C[1] >>> as it does for DSolve[]? >>> >>> So, if I have to guess, I'd say this result is at least very weired, = but >>> mathematically it is not wrong? >>> >>> --Nasser >>> >>> >>> >> >> >> -- >> DrMajorBob(a)yahoo.com > >
From: David Park on 10 Feb 2010 03:34
Well, if you had Presentations you could use the Student's Integral section to manipulate the integral, for example break it into two integrals and factor out the minus sign, and then evaluate the resulting integrals from a basic integral table (instead of using the Mathematica Integrate command, although you can use that also.) You can also use basic integration techniques such as substitution of variable, complete the square, integration by parts and trigonometric substitution. This gives an experience and results more like that achieved in college calculus courses. Also, in this case you could also just map Integrate onto the two terms to obtain a more conventional result. David Park djmpark(a)comcast.net http://home.comcast.net/~djmpark/ From: Nasser M. Abbasi [mailto:nma(a)12000.org] The "weird" thing is not what specific constant of integration it returned, but the fact that it did return one at all. Integrate[x^2, x] gives x^3/2. not x^3/2+Pi*Sqrt[-1] or x^3/2+99 even though both are correct. > I don't know Integrate's steps in obtaining the result, but I'm sure it > didn't add extraneous constants deliberately. Ofcourse. I am sure of that too. But the final result is NOT what one would normally see in a textbook or expect or do when solving by hand, even though as I said, it is correct. It is just not "normal" looking. I am sorry, I did not mean to say anything bad about Mathematica when I said this result was "weird" even though it is correct. --Nasser ----- Original Message ----- From: "DrMajorBob" <btreat1(a)austin.rr.com> To: "Nasser M. Abbasi" <nma(a)12000.org>; <mathgroup(a)smc.vnet.net> Sent: Monday, February 08, 2010 9:54 AM Subject: Re: Re: Integral confusion >> But Mathematica does (normally?) return results for indefinite integrals >> without an explicit constant of integration. > > What's "explicit" or weird about the constants of integration in this > problem? > > I don't know Integrate's steps in obtaining the result, but I'm sure it > didn't add extraneous constants deliberately. > > Bobby > > On Mon, 08 Feb 2010 02:36:16 -0600, Nasser M. Abbasi <nma(a)12000.org> > wrote: > >> >> "Jon Joseph" <josco.jon(a)gmail.com> wrote in message >> news:hkm7d8$os0$1(a)smc.vnet.net... >>> 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.= >>> >> >> Well, lets see: >> >> log(-2 (x + 1)) - log(2 (x + 6)) >> = log(-2)+log(1+x) -log(2)-log(x+6) >> = log(-1)+log(2)+log(1+x)-log(2)-log(x+6) >> = log(-1)+ log(1+x) - log(x+6) >> >> but log(-1) = Sqrt[-1]*Pi >> >> so result is >> >> Sqrt[-1]*Pi + log(1+x) - log(x+6) >> >> But we all know that the result should be >> >> log(1+x) - log(x+6) >> >> So, an extra term, Sqrt[-1]*Pi term pops up. But this term is a >> constant, so >> its derivative is zero, i.e. a constant of integration. >> >> Since >> >> D[log(-2 (x + 1)) - log(2 (x + 6)),x] will give back >> >> 1/(x + 1) - 1/(x + 6) >> >> So, in theory, the answer given by Mathematica is NOT wrong. >> >> But Mathematica does (normally?) return results for indefinite integrals >> without an explicit constant of integration. So I am not sure why it >> does in >> this case, and if it it does, why did not pick this constant? Why not >> C[1] >> as it does for DSolve[]? >> >> So, if I have to guess, I'd say this result is at least very weired, but >> mathematically it is not wrong? >> >> --Nasser >> >> >> > > > -- > DrMajorBob(a)yahoo.com |