MathGroup Archive 2005

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

Search the Archive

Re: Integrate is driving me crazy, please help!

  • To: mathgroup at smc.vnet.net
  • Subject: [mg56224] Re: [mg56184] Integrate is driving me crazy, please help!
  • From: yehuda ben-shimol <bsyehuda at gmail.com>
  • Date: Wed, 20 Apr 2005 05:29:54 -0400 (EDT)
  • References: <200504180708.DAA20024@smc.vnet.net>
  • Reply-to: yehuda ben-shimol <bsyehuda at gmail.com>
  • Sender: owner-wri-mathgroup at wolfram.com

I follow  APC's comments,
After correcting them you get (in InputForm)
res=(-4*a^2*f*hilla*Pi*Sqrt[hillb^2 - 4*a^2*f^2*Pi^2] + 
   a*f0*hillb*Pi*Sqrt[hillb^2 - 4*a^2*f^2*Pi^2] + 
   a*hilla*hillb*Pi*Sqrt[hillb^2 - 4*a^2*f^2*Pi^2] + 
   2*a*(f0 + hilla)*hillb^2*
    ArcTan[(2*a*f*Pi)/Sqrt[hillb^2 - 4*a^2*f^2*
         Pi^2]] - I*Sqrt[a^2]*(f0 + hilla)*hillb^2*
    Log[-((I*Sqrt[a^2]*hillb)/
       (2*a*Sqrt[hillb^2 - 4*a^2*f^2*Pi^2]))] + 
   I*Sqrt[a^2]*f0*hillb^2*Log[(I*Sqrt[a^2]*hillb)/
      (2*a*Sqrt[hillb^2 - 4*a^2*f^2*Pi^2])] + 
   I*Sqrt[a^2]*hilla*hillb^2*
    Log[(I*Sqrt[a^2]*hillb)/
      (2*a*Sqrt[hillb^2 - 4*a^2*f^2*Pi^2])])/
  (2*a*f*Pi*Sqrt[hillb^2 - 4*a^2*f^2*Pi^2])

And then 
res/.{hilla -> 3, hillb -> 50, f0 -> 8, a -> 1, f -> 1}//N//Chop
will give you
14.0372
First notice that you get a general closed form result, which is more
efficient to use since you need to integrate (symbolically) only once.
Then the numerical values are assigned and do not involve with the
accuracy of the integration.
Anyway, NIntegrate[] returns the same result
yehuda
On 4/18/05, Jim Martin <jim.martin at utah.edu> wrote:
> Hello Mathematica Experts:
> 
> I am a biomechanist and work mostly in the area of muscle contraction. I
> do a lot of numerical computations using excel, but right now I need an
> analytical solution that represents force as a function of position
> integrated over a shortening amplitude. I downloaded a trial version of
> Mathematica and have tried to obtain a solution for this:
> 
> Integrate[(hillb*((f0 + hilla)/(2*pi*f*a*Cos(ArcSin(x/a)) + hillb))) -
> hilla, {x, -a, a}]
> 
> Mathematica returns this:
> (-4 a ArcSin Cos f hilla pi + (f0 + hilla) hillb (-Log[hillb - 2 a
>      ArcSin Cos f pi] + Log[hillb + 2 a ArcSin Cos f pi]))/(4 a ArcSin
> Cos f pi)
> 
> I know the line wrap makes this hard to read so please feel free to
> email me and I can send you the output as a picture.
> 
> In a sample data set, hilla=3, hillb=50, f0=8, a=1, f=1
> 
> I can numerically integrate this function and obtain a value for that
> sample data set of 14.04. When I put those sample values into the
> solution that Mathematica produces, I get 10.01.
> 
> Can any of you please give a hand here? I must be making some simple
> Mathematica-beginner error but I just can't see it.
> 
> In Mathematica, Log is Log to base e, right (LN in excel)? Did I use
> variables that have intrinsic functions in Mathematica? Maybe I am
> misunderstanding the output with regard to implicit parentheses etc.
> Any help appreciated!
> 
> Thanks,
> 
> Jim
> 
>


  • Prev by Date: Guide to get tex-stuff working in Suse 9.2
  • Next by Date: Re: Thanks! Re: Integrate is driving me crazy, please help!
  • Previous by thread: Re: Integrate is driving me crazy, please help!
  • Next by thread: Re: Assisting FullSimplify (last time to bother you with this topic)