MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Oh, those complex values!!!

  • To: mathgroup at smc.vnet.net
  • Subject: [mg72207] Re: Oh, those complex values!!!
  • From: aaronfude at gmail.com
  • Date: Thu, 14 Dec 2006 05:49:32 -0500 (EST)
  • References: <eloq2e$nok$1@smc.vnet.net>

I appreciate what you are saying, but I'm not quite seeing how to get
the correct answer.

Below, I integrate the function symbolically and then numecially and
get two different answers. (The code runs in about 10 min on my
laptop.) That seems like an error. Is this the multi-valued function
phenomenon?

In any case, I would really like a symbolic expression for this
integral - any suggestions?

Thank you!

F=(a + b x) Log[(c+d x+e Sqrt[f+ 2g x + h  x^2])];

In[53]:=
\!\(\(st\  = \
      Simplify[Integrate[F, \ x],
        e > 0 && g > 0 && h > 0 && x > 0 && x < 1 &&
          f + 2\ g\ x + h\ x\^2\  > \ 0\  && \
          c + d\ x + e\ Sqrt[f + 2\ g\ x + h\ x\^2] > 0\ ];\)\)

In[54]:=
specific =
    st /. { a->0.86715714970012 , b\[Rule]-0.15020415937719,
        c->-0.27885748971898, d->-0.43809550060395,
e\[Rule]0.76700694910877,
        f->0.68676104348272,g->-0.37812253188014, h->0.96322559609812};

In[55]:=
(specific /. x\[Rule]1) - (specific/.x\[Rule]0)

Out[55]=
\!\(\(-2.952838260511225`\) + 4.440892098500626`*^-15\ \[ImaginaryI]\)

In[56]:=
NIntegrate[
  F/. { a->0.86715714970012 , b\[Rule]-0.15020415937719,
      c->-0.27885748971898, d->-0.43809550060395, e\[Rule]
0.76700694910877,
      f->0.68676104348272,g->-0.37812253188014, h->0.96322559609812},
{x, 0, 
    1}]

Out[56]=
-2.22949


  • Prev by Date: RE: How to use the max value from the solution of NDSolve ?
  • Next by Date: Re: How to solve this equation?
  • Previous by thread: RE: Oh, those complex values!!!
  • Next by thread: Re: Oh, those complex values!!!