Re: Real integrand->complex result.
- To: mathgroup at smc.vnet.net
- Subject: [mg20310] Re: Real integrand->complex result.
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Fri, 15 Oct 1999 20:20:41 -0400
- Organization: Universitaet Leipzig
- References: <7tuou7$ehs@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hi William,
a) please use InputForm[] to paste formulas into e-mails or append a
notebook
b) you should avoid mixing floting point numbers and analytical
terms. Introducing omega instead of 3.66558239083868908` and using
FullSimplify[]
you will see that all complex terms are removed
c) what do you think means 0.`\ \[ImaginaryI] ? something like
0*I or 0? You can use Chop[] to remove this zero part of the complex
number
d) the evaluation is to slow ? There are several ways to avoid this. You
may
buy a new faster computer. You may wait for a new faster computer and
a new
faster Mathematica. You may put some ideas into you program. The
typical case is that you can find some kind of recursion for your
simpFphi[n], than you can use dynamic programming and store
simpFphi[n-1]
to reduce the computation time. You may also be able to find some
recursion
for Integrate[simpFphi[n],{x,0,l}]= someterm[n,l]
+Integrate[simpFphi[n-1],{x,0,l}]
and avoid the integration at all.
Hope that helps
Jens
William Golz wrote:
>
> Synopsis of the problem:
> I get a complex result of the form f(t)=(a+bi)g(t) when evaluating a
> real integrand F(x,t)*phi(x) over the interval {x:0<x<L). All of the
> variables have been properly declared as real and the functions have
> been declared as real for real arguments (using the package "ReIm").
>
> The evaluation of the integral is also quite slow, even for n=2, even
> when the expression is simplified as much as possible, and the final
> program will need to evaluate a larger number of terms.
>
> Thanks in advance, Bill