Re: Integration Problem
- To: mathgroup at smc.vnet.net
- Subject: [mg102036] Re: Integration Problem
- From: mark mcclure <mcmcclur at unca.edu>
- Date: Mon, 27 Jul 2009 05:55:32 -0400 (EDT)
- References: <h4h1vg$ibr$1@smc.vnet.net>
On Jul 26, 3:52 am, JerrySpock <liquidsol... at hotmail.com> wrote: > N[ > Integrate[ > Sqrt[ > (2Exp[2*m])^2 + (1.5Exp[1.5*m])^2 > ],{m, 1, 2}]] > > I keep getting the answer 79.6, but my TI-83 says the answer > is 49.8. Definitely, a little strange. Could be that there's a little numerical instability in the integrand, but I don't see it. Of course, you should always analyze your answer from multiple perspectives. In this case, a simple plot shows that 49.8 is closest to the correct answer. The most straightforward way that I can think to do the problem in Mathematica is as follows p[t_] = {Exp[2 t], Exp[3 t/2]}; NIntegrate[Norm[p'[t]], {t, 1, 2}] Note that I used NIntegrate, rather than N[Integrate[...]] as you did. The problem seems to arise only when you try to apply Integrate to an inexact integrand. If your integrand is inexact, then why not apply NIntegrate in the first place? It should be faster and, perhaps, more accurate. Also, Integrate[Sqrt[((3/2) Exp[3 t/2])^2 + (2 Exp[2 t])^2], {t, 1, 2}] produces the correct result, as you can check by passing the result to N. On the other hand, Integrate[Sqrt[((3/2.) Exp[3 t/2])^2 + (2. Exp[2 t])^2], {t, 1, 2}] produces a totally bogus negative result, while Integrate[Sqrt[((3/2.) Exp[3 t/2.])^2 + (2. Exp[2. t])^2], {t, 1, 2}] refuses to integrate! Mark McClure