Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1998
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1998

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

Search the Archive

Indefinite Integration Problem

  • To: mathgroup at smc.vnet.net
  • Subject: [mg12920] Indefinite Integration Problem
  • From: Ed Hall <teh1m at virginia.edu>
  • Date: Wed, 24 Jun 1998 03:44:40 -0400
  • Organization: University of Virginia
  • Sender: owner-wri-mathgroup at wolfram.com

Folks,

I would appreciate any assistance in solving the following indefinite
integration problem using Mathematica. I can create the expression
below  (from the Peng-Robinson equation of state) which is real,
differentiate  w.r.t the variable W, followed by indefinite integration
w.r.t. to W to  get a complex result rather than the original real
expression. I've tried  adding Im[W]==0 assumption to the Integrate
command w/o success.

Composing the expression to be differentiated.

In[5]:= V = 1/W; d = Sqrt[u^2*Nt^2*b^2 - 4*w*b^2*Nt^2]; F = -(Nt*Log[(V
- Nt*b)/V]) + (a*Nt^2*Log[(2*V + u*Nt*b - d)/
        (2*V + u*Nt*b + d)])/(R*T*d)

Out[6]= (a*Nt^2*Log[(b*Nt*u - Sqrt[b^2*Nt^2*u^2 - 4*b^2*Nt^2*w] + 2/W)/
       (b*Nt*u + Sqrt[b^2*Nt^2*u^2 - 4*b^2*Nt^2*w] + 2/W)])/
   (R*T*Sqrt[b^2*Nt^2*u^2 - 4*b^2*Nt^2*w]) - Nt*Log[(-b*Nt + 1/W)*W]

In[7]:= F = FullSimplify[F]

Out[7]= 1/(R*T)*Nt*(-R*T*Log[1 - b*Nt*W] + (a*Nt*Log[(2 + b*Nt*u*W -
            Sqrt[b^2*Nt^2* (u^2 - 4*w)]*W)/ (2 + b*Nt*u*W +
Sqrt[b^2*Nt^2*
            (u^2 - 4*w)]*W)])/ Sqrt[b^2*Nt^2*(u^2 - 4*w)])

Taking partial derivative  w . r . t . W

In[8]:= test = FullSimplify[D[F, W]]

Out[8]= Nt^2*(b/(1 - b*Nt*W) - a/(R*T*(1 + b*Nt*W*(u + b*Nt*w*W))))

Performing indefinite integration on result of differentiation.

In[9]:= F1 = Integrate[test, W]

Out[9]= -((2*a*Nt*ArcTan[(u + 2*b*Nt*w*W)/ Sqrt[-u^2 + 4*w]])/
     (b*R*T*Sqrt[-u^2 + 4*w])) - Nt*Log[-1 + b*Nt*W]

In[10]:= TrigToExp[F1]

Out[10]= -Nt*Log[-1 + b*Nt*W] - (I*a*Nt*(Log[1 - (I*(u + 2*b*Nt*w*W))/
          Sqrt[-u^2 + 4*w]] - Log[1 + (I*(u + 2*b*Nt*w*W))/
          Sqrt[-u^2 + 4*w]]))/ (b*R*T*Sqrt[-u^2 + 4*w])

The result of the integration F1 is complex whereas the original 
expression F before differention is real.  How can I insure F1 will be 
real and equal to F?


Thanks in advance,
Ed

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Ed Hall                                      Research Computing Support
 edhall at virginia.edu            Information Technology and Communication

 804-924-0620                                    The University Virginia
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


  • Prev by Date: Q: ShowLegend
  • Next by Date: Re: hypergeometric function
  • Previous by thread: Q: ShowLegend
  • Next by thread: eps mathematica fonts/latex