       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:= 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= (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:= F = FullSimplify[F]

Out= 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:= test = FullSimplify[D[F, W]]

Out= 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:= F1 = Integrate[test, W]

Out= -((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:= TrigToExp[F1]

Out= -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?

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