[Date Index]
[Thread Index]
[Author Index]
Re: Re: Simple integral wrong
*To*: mathgroup at smc.vnet.net
*Subject*: [mg25160] Re: [mg25107] Re: Simple integral wrong
*From*: Andrzej Kozlowski <andrzej at bekkoame.ne.jp>
*Date*: Tue, 12 Sep 2000 02:58:47 -0400 (EDT)
*Sender*: owner-wri-mathgroup at wolfram.com
This is of course very easy to explain and exactly as expected.
Integrate[Abs[Cos[u]],{u,0,x}] is a path integral of a non-analytic function
and not an indefinite integral("anti-derivative"). The fundamental theorem
of calculus does not hold for path integrals of non-analytic functions. This
should not be a surprise since it is only standard undergraduate
mathematics. For an even more forceful demonstration look at this example:
In[2]:=
Integrate[Abs[x], x]
Out[2]=
Integrate[Abs[x], x]
In[3]:=
Integrate[Abs[x], {x, 0, z}]
Out[3]=
1 2 2
- z Sqrt[Im[z] + Re[z] ]
2
In[4]:=
D[%, z] // FullSimplify
Out[4]=
2 2
Im[z] + Re[z] + z Im[z] Im'[z] + z Re[z] Re'[z]
-------------------------------------------------
2 Abs[z]
By the way, there is nothing wrong with the path integral here, provided one
takes as the path the straight line from 0 to z. The differentiation is
meaningless, since Re and Im are not differentiable, but (in my opinion) you
can't blame Mathematica for giving a meaningless answer to a meaningless
question.
on 00.9.10 4:14 PM, Albert Retey at albert.retey at visualanalysis.com wrote:
> Hi all,
>
> This leaves even more questions, actually I would prefer the first
> "result"...
>
> Mathematica 4.0 for Linux
> Copyright 1988-1999 Wolfram Research, Inc.
> -- Motif graphics initialized --
>
> In[1]:= Integrate[Abs[Cos[x]],x]
>
> Out[1]= Integrate[Abs[Cos[x]], x]
>
> In[2]:= Integrate[Abs[Cos[u]],{u,0,x}]
>
> 2
> Out[2]= Sqrt[Cos[x] ] Tan[x]
>
> In[3]:= Quit
>
>
> Note that also the Differentiation goes wrong (which might be th reason
> for the wrong Integration after all):
>
> Mathematica 4.0 for Linux
> Copyright 1988-1999 Wolfram Research, Inc.
> -- Motif graphics initialized --
>
> In[1]:= Integrate[Abs[Cos[x]],{x,0,y}]
>
> 2
> Out[1]= Sqrt[Cos[y] ] Tan[y]
>
> In[2]:= Integrate[Abs[Cos[x]],{x,0,y}] // InputForm
>
> Out[2]//InputForm= Sqrt[Cos[y]^2]*Tan[y]
>
> In[3]:= D[Sqrt[Cos[y]^2]*Tan[y],y] // Simplify
>
> 2
> Out[3]= Sqrt[Cos[y] ]
>
> In[4]:= Quit
>
>
>> I have had a number or queries about this. Sorry I hadn't made it clearer.
>> Here is
>> the full story:
>>
>> A couple of people told me that
>>
>> Plot[Integrate[Abs[Cos[u]], {u, 0, x Pi]}], {x, 0, 3}]
>>
>> works fine. The result is monotonic increasing as expected.
>>
>> But try
>>
>> Plot[Evaluate[Integrate[Abs[Cos[u]],{u,0,Pi*x}]],{x,0,3}]
>>
>> and see what happens! The evaluate forces Mathematica to do the
>> integral symbolically. It was doing it numerically without the Evaluate.
>>
>> Or just type
>>
>> Integrate[Abs[Cos[u]],{u,0,Pi x}]
>>
>> Mathematica 4 returns
>>
>> 2
>> Out[1]= Sqrt[Cos[Pi x] ] Tan[Pi x]
>>
>> (Actually, I don't think Mathematica 3 can do it at all.) This
>> plots as a saw-tooth. The true solution should be
>>
>> Sqrt[Cos[Pi x]^2] Tan[Pi x] + 2 Floor[x + 1/2]
>>
>> Mathematica misses the step functions necessary to make the solution
>> continuous.
>>
>> Thanks for your interest,
>>
>> Paul Cally
>>
>> --
>>
>> +--------------------------------------------------------------------------+
>> |Assoc Prof Paul Cally | Ph: +61 3 9905-4471 |
>> |Dept of Mathematics & Statistics | Fax: +61 3 9905-3867 |
>> |Monash University | paul.cally at sci.monash.edu.au |
>> |PO Box 28M, Victoria 3800 | |
>> |AUSTRALIA | http://www.maths.monash.edu.au/~cally/ |
>> +--------------------------------------------------------------------------+
>
> --
> Visual Analysis GmbH Internet: www.visualanalysis.com
> Neumarkter Str. 87 Telefon: 089 / 431 981 0
> D-81673 Muenchen Telefax: 089 / 431 981 1
>
--
Andrzej Kozlowski
Toyama International University
JAPAN
http://platon.c.u-tokyo.ac.jp/andrzej/
http://sigma.tuins.ac.jp/
Prev by Date:
**Re: Re: Simple integral wrong**
Next by Date:
**Amazing backgrounds**
Previous by thread:
**Re: Re: Simple integral wrong**
Next by thread:
**Re: Re: Re: Simple integral wrong**
| |