MathGroup Archive 2007

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

Search the Archive

Re: N function problematic performance (V. 5.2)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg74782] Re: N function problematic performance (V. 5.2)
  • From: "dimitris" <dimmechan at yahoo.com>
  • Date: Thu, 5 Apr 2007 04:08:12 -0400 (EDT)
  • References: <euvm6e$d7s$1@smc.vnet.net>

As I said somewhere else we have Mathematica on one side
and on the other our mind. We can get the desirable results
if we bring mind&Mathematica together...

As we see using Integrate on Sin[x - 1]/Sqrt[x*(x - 2)] gives a result in terms
of MeijerG functions. But then N faces problems to get a numerical
estimation.
On the hand applying TrigToExp first gives a result again in terms of MeijerG
functions which is opposite of the correct result.

However a trivial subsitution results in a very simple result very
quickly (bear in mind that
in previous result containg MeijerG functions neither FullSimplify nor
FunctionExpand
provides any simplifications).

So...

(*Ins*)
int = Simplify[(Sin[x - 1]/Sqrt[x*(x - 2)])*Dt[x] /. x -> t + 1] /.
Dt[t] -> 1
Plot[int, {t, 1, 10}]
Timing[Integrate[int, {t, 1, Infinity}]]
{N[%[[2]],11], NIntegrate[int, {t, 1, Infinity}, Method ->
Oscillatory,WorkingPrecision->20,PrecisionGoal->10]}

(*Outs*)
Sin[t]/Sqrt[-1 + t^2]
Graphics
{0.672*Second, (1/2)*Pi*BesselJ[0, 1]}
{1.2019697153, 1.2019697153}

Dimitris

=CF/=C7 dimitris =DD=E3=F1=E1=F8=E5:
> Consider the following the definite integral
>
> h = HoldForm[Integrate[Sin[x - 1]/Sqrt[x*(x - 2)], {x, 2, Infinity}]]
>
> Here is a numerical estimation
>
>
> ReleaseHold[h /. Integrate[x___] :> NIntegrate[x, Method ->
> Oscillatory]]
> 1.2019697137297456
>
> Here is the symbolic result by Mathematica
>
> Timing[hh = ReleaseHold[h]]
>
> {30.031000000000002*Second, (Pi*(Cos[1]*MeijerG[{{}, {1/4, 3/4}},
{{0,
> 1/2, 1/2}, {0}}, 1] -
>      MeijerG[{{}, {1/4, 3/4}}, {{0, 0, 1/2}, {1/2}}, 1]*Sin[1]))/
> Sqrt[2]}
>
> Application of N function results in unexpected warnings and not in
> any estimation in reasonable timing...
>
> TimeConstrained[N[hh], 120]
> Infinity::"indet"...
> NSum::nsnum :...
> $Aborted
>
> What is going here?
> Did I encouter a known (problematic) situation?
>
> BTW,
>
> Integrate[TrigToExp[Sin[x - 1]/Sqrt[x*(x - 2)]], {x, 2, Infinity}]
> ((1/2)*I*Pi^(3/2)*(E^(2*I)*MeijerG[{{}, {1/2, 1/2}}, {{0, 0}, {1/2}},
> -2*I] - MeijerG[{{}, {1/2, 1/2}}, {{0, 0}, {1/2}}, 2*I]))/
>   E^I
>
> Chop[N[%]]
> -1.2019697153172064
>
> which is opposite of the correct result.



  • Prev by Date: Re: Solve[] and Eliminate[] choke on simple systems of equations
  • Next by Date: Enquirey
  • Previous by thread: N function problematic performance (V. 5.2)
  • Next by thread: Re: N function problematic performance (V. 5.2)