home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: sci.math.symbolic
- Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!mips!sdd.hp.com!caen!umeecs!umn.edu!cda.mrs.umn.edu!naras
- From: naras@cda.mrs.umn.edu (B. Narasimhan)
- Subject: Need to evaluate an integral in Maple.
- Message-ID: <1992Jul28.195617.10851@news2.cis.umn.edu>
- Sender: news@news2.cis.umn.edu (Usenet News Administration)
- Nntp-Posting-Host: sci234e.mrs.umn.edu
- Organization: University of Minnesota - Morris
- Date: Tue, 28 Jul 1992 19:56:17 GMT
- Lines: 42
-
- Here is a maple session: (Maple V release 1.1, MSDOS 486 PC.)
-
- > f:=proc(x) local y; y:=x; if y <= 0 then 0 elif y <= 1/2 then y;
- else 1; fi; end;
- > int('f(x)',x=0..1);
-
- ******** Returns the integral expression without evaluating it ***
-
- > evalf(int('f(x)',x=0..1));
- Error, (in evalf/int) unable to handle singularity
- >
-
- Now, what is the singularity that evalf/int imagines?
- A clue can be got by making the last piece of the function 1/2 instead
- of 1. Maple gives the correct answer 0.375 then. So it is the
- discontinuity that throws evalf/int off. Here is another funny thing:
- After this, I redefined f to be a totally different function and
- did the same evalf/int on it. It gave me the same answer .375.
- Try this:
-
- > f:=proc(x) 0 end;
- > int('f(x)',x=0..1);
- 0
- > f:=proc(x) if x < 1/2 then 0 else 1/2; fi; end;
- > int('f(x)',x=0..1);
- 0 # Still zero!
-
-
- Of course, the main question is: How does one force Maple to evaluate
- an integral of the first kind? I am not interested in solutions
- that add up the various pieces of the integral, since I need to
- convolute such functions and plot them.
-
- I looked and looked in my two new books from Springer on Maple.
- No clue.
-
-
- --
- B. Narasimhan naras@cda.mrs.umn.edu
- Division of Science and Math.
- The University of Minnesota at Morris
- Morris, MN 56267
-