Re: Integrate 5.0
- To: mathgroup at smc.vnet.net
- Subject: [mg44284] Re: Integrate 5.0
- From: Paul Abbott <paul at physics.uwa.edu.au>
- Date: Tue, 4 Nov 2003 03:23:57 -0500 (EST)
- Organization: The University of Western Australia
- References: <bnnvfj$61s$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
In article <bnnvfj$61s$1 at smc.vnet.net>,
Selwyn Hollis <sh2.7183 at misspelled.erthlink.net> wrote:
> I've come to the conclusion that Integrate has become nearly worthless
> for computing definite integrals with symbolic limits. To cite a simple
> example,
>
> Integrate[Sqrt[Cos[t] + 1], {t, 0, x}]
>
> returns an awful mess inside of an If statement (very mild in this
> case) that no one should have to deal with if they're only concerned
> with real numbers (specifically calculus students and a great many
> applied mathematicians).
I don't understand why you don't just compute the indefinite integral?
The definite integration code is attempting to do a much more
complicated operation. The checking code in 5.0 appears to more
carefully check the conditions under which the result is true.
Alternatively, why not help the integrator with appropriate assumptions,
e.g.
Integrate[Sqrt[Cos[t] + 1], {t, 0, x}, Assumptions -> {0 < x < Pi}]
for which you get an even nicer closed form solution.
> On the other hand, DSolve gives the simple, clean answer that Integrate
> used to give:
>
> y[t]/. DSolve[{y'[t] == Sqrt[Cos[t] + 1], y[0] == 0}, y[t], t]
>
> 2*Sqrt[1 + Cos[t]]*Tan[t/2]
But this answer is only partially incorrect. It is only valid for
-Pi < t < Pi. To see what I mean, with
de = {y'[t] == Sqrt[Cos[t] + 1], y[0] == 0};
compare
Plot[Evaluate[y[t] /. DSolve[de, y, t]], {t, 0, 10}];
to the correct result
Plot[Evaluate[y[t] /. NDSolve[{de, y, {t, 0, 10}]], {t, 0, 10}];
Cheers,
Paul
--
Paul Abbott Phone: +61 8 9380 2734
School of Physics, M013 Fax: +61 8 9380 1014
The University of Western Australia (CRICOS Provider No 00126G)
35 Stirling Highway
Crawley WA 6009 mailto:paul at physics.uwa.edu.au
AUSTRALIA http://physics.uwa.edu.au/~paul