Re: integration

• To: mathgroup at smc.vnet.net
• Subject: [mg92861] Re: integration
• From: "Jean-Marc Gulliet" <jeanmarc.gulliet at gmail.com>
• Date: Wed, 15 Oct 2008 06:01:16 -0400 (EDT)
• References: <gcchbh\$s2c\$1@smc.vnet.net> <48EA5916.2050008@gmail.com>

On Wed, Oct 15, 2008 at 10:34 AM, Jean-Marc Gulliet
<jeanmarc.gulliet at gmail.com> wrote:
> On Wed, Oct 15, 2008 at 5:19 AM, Gobithaasan <gobithaasan at gmail.com> wrote:
>> Greetings...
>> Thanks Jean-Marc Gulliet,
>> i think M6 would be able to give a simplified answer, which  is more
>> understandable without the appearance of imaginary numbers in  the answer.
>> The assumption of the integral should be:
>> [1]{k1,k2,r,s,S} are real  numbers
>> [2] r > -1
>> [3] S > 0
>> [4] 0<= s<= S
>> I tried doing with these assumption, but the imaginary part still exists..
>> Is there anyway to ask M6 to give the right assumption for imaginary-free
>> answer? Thank you very much Jean...
>>
>> Gobithaasan
>
> Please, could you post the expression you used and its result. On my
> system, using the above assumptions, Mathematica returns the integral
> unevaluated, which is in agreement with what I already noticed when S
>> 0:
>
>>>> [...] However, it seems that the above integral has no solution if the
>>>> parameter S is positive. On the other hand, ff we allow S to be negative (or
>>>> complex) then the integral has a symbolic complex solution.
>>>>
>>>> In[49]:= Integrate[
>>>>  Cos[(r*t*(-\[Kappa]0 + \[Kappa]1 + r*\[Kappa]1) + (1 + r)*
>>>>      S*(\[Kappa]0 - \[Kappa]1)*
>>>>            (-Log[S] + Log[S + r*t]))/r^2], {t, 0, s},
>>>>   Assumptions -> S > 0]
>>>>
>>>> Out[49]= Integrate[
>>>>  Cos[(r t (-\[Kappa]0 + \[Kappa]1 + r \[Kappa]1) + (1 +
>>>>      r) S (\[Kappa]0 - \[Kappa]1) (-Log[S] + Log[S + r t]))/r^2], {t,
>>>>   0, s}, Assumptions -> S > 0]

In addition, do not forget that a symbolic expression with imaginary
parts does not necessarily yields complex values (depending, of
course, on the choice of parameter values). For instance,

In[10]:= sol =
Integrate[
Cos[(r t (-k0 + k1 + r k1) + (1 + r) S (k0 - k1) (-Log[S] +
Log[S + r t]))/r^2], {t, 0, s},
Assumptions -> {Im[k0] == 0, Im[k1] == 0, Im[r] == 0, Im[s] == 0,
Im[S] == 0, r > 0, s > 0}]

Out[10]= If[S > 0 || r s + S <= 0, (1/(2 (k0 - k1 - k1 r)))
r^(1 - (2 I k0 S)/r^2 + (2 I k1 S)/r^2 - (2 I k0 S)/r + (2 I k1 S)/r)
S^(-((I (k0 - k1) (1 + r) S)/
r^2)) (-((I (-k0 + k1 + k1 r) S)/r^2))^(-((I (k0 - k1) (1 + r) S)/
r^2)) (r s + S)^(-((I (k0 - k1) (1 + r) S)/
r^2)) (I (k0 - k1 (1 + r)) (r s + S))^(-((I (k0 - k1) (1 + r) S)/
r^2)) (-I r^((2 I (k0 - k1) (1 + r) S)/r^2) S^((
I (k0 - k1) (1 + r) S)/r^2) (r s + S)^((I (k0 - k1) (1 + r) S)/
r^2) (I (k0 - k1 (1 + r)) (r s + S))^((I (k0 - k1) (1 + r) S)/
r^2) Cos[(k0 S)/r^2 - (k1 S)/r^2 - (k1 S)/r] Gamma[(
I (-I r^2 + (k0 - k1) S + (k0 - k1) r S))/
r^2, -((I (-k0 + k1 + k1 r) S)/r^2)] +
I r^((4 I (k0 - k1) (1 + r) S)/
r^2) (-((I (-k0 + k1 + k1 r) S)/r^2))^((I (k0 - k1) (1 + r) S)/
r^2) (r s + S)^((2 I (k0 - k1) (1 + r) S)/r^2)
Cos[(k0 S)/r^2 - (k1 S)/r^2 - (k1 S)/r] Gamma[(
I (-I r^2 + (k0 - k1) S + (k0 - k1) r S))/
r^2, -((I (-k0 + k1 + k1 r) (r s + S))/r^2)] +
I r^((2 I (k0 - k1) (1 + r) S)/r^2) S^((I (k0 - k1) (1 + r) S)/
r^2) (((-k0 + k1 + k1 r)^2 S^2)/r^4)^((I (k0 - k1) (1 + r) S)/
r^2) (r s + S)^((I (k0 - k1) (1 + r) S)/
r^2) (I (k0 - k1 (1 + r)) (r s + S))^((I (k0 - k1) (1 + r) S)/
r^2) Cos[(k0 S)/r^2 - (k1 S)/r^2 - (k1 S)/r] Gamma[-((
I (I r^2 + (k0 - k1) S + (k0 - k1) r S))/r^2), (
I (-k0 + k1 + k1 r) S)/r^2] -
I S^((2 I (k0 - k1) (1 + r) S)/
r^2) (-((I (-k0 + k1 + k1 r) S)/r^2))^((I (k0 - k1) (1 + r) S)/
r^2) Abs[-k0 + k1 + k1 r]^((2 I (k0 - k1) (1 + r) S)/r^2)
Abs[r s + S]^((2 I (k0 - k1) (1 + r) S)/r^2)
Cos[(k0 S)/r^2 - (k1 S)/r^2 - (k1 S)/r] Gamma[-((
I (I r^2 + (k0 - k1) S + (k0 - k1) r S))/r^2), (
I (-k0 + k1 + k1 r) (r s + S))/r^2] +
r^((2 I (k0 - k1) (1 + r) S)/r^2) S^((I (k0 - k1) (1 + r) S)/
r^2) (r s + S)^((I (k0 - k1) (1 + r) S)/
r^2) (I (k0 - k1 (1 + r)) (r s + S))^((I (k0 - k1) (1 + r) S)/
r^2) Gamma[(I (-I r^2 + (k0 - k1) S + (k0 - k1) r S))/
r^2, -((I (-k0 + k1 + k1 r) S)/r^2)] Sin[(k0 S)/r^2 - (k1 S)/
r^2 - (k1 S)/r] -
r^((4 I (k0 - k1) (1 + r) S)/
r^2) (-((I (-k0 + k1 + k1 r) S)/r^2))^((I (k0 - k1) (1 + r) S)/
r^2) (r s + S)^((2 I (k0 - k1) (1 + r) S)/r^2)
Gamma[(I (-I r^2 + (k0 - k1) S + (k0 - k1) r S))/
r^2, -((I (-k0 + k1 + k1 r) (r s + S))/r^2)] Sin[(k0 S)/r^2 - (
k1 S)/r^2 - (k1 S)/r] +
r^((2 I (k0 - k1) (1 + r) S)/r^2) S^((I (k0 - k1) (1 + r) S)/
r^2) (((-k0 + k1 + k1 r)^2 S^2)/r^4)^((I (k0 - k1) (1 + r) S)/
r^2) (r s + S)^((I (k0 - k1) (1 + r) S)/
r^2) (I (k0 - k1 (1 + r)) (r s + S))^((I (k0 - k1) (1 + r) S)/
r^2) Gamma[-((I (I r^2 + (k0 - k1) S + (k0 - k1) r S))/r^2), (
I (-k0 + k1 + k1 r) S)/
r^2] Sin[(k0 S)/r^2 - (k1 S)/r^2 - (k1 S)/r] -
S^((2 I (k0 - k1) (1 + r) S)/
r^2) (-((I (-k0 + k1 + k1 r) S)/r^2))^((I (k0 - k1) (1 + r) S)/
r^2) Abs[-k0 + k1 + k1 r]^((2 I (k0 - k1) (1 + r) S)/r^2)
Abs[r s + S]^((2 I (k0 - k1) (1 + r) S)/r^2)
Gamma[-((I (I r^2 + (k0 - k1) S + (k0 - k1) r S))/r^2), (
I (-k0 + k1 + k1 r) (r s + S))/
r^2] Sin[(k0 S)/r^2 - (k1 S)/r^2 - (k1 S)/r]),
Integrate[
Cos[(r (-k0 + k1 + k1 r) t + (k0 - k1) (1 + r) S (-Log[S] +
Log[S + r t]))/r^2], {t, 0, s},
Assumptions ->
k0 \[Element] Reals && k1 \[Element] Reals && S <= 0 && s > 0 &&
r > -(S/s)]]

In[11]:= sol /. {S -> 1, k0 -> 0, k1 -> 1, r -> 1, s -> 1}

Out[11]= -(-I)^(4 I) 4^(-1 +
4 I) (-I (-8 I)^(-2 I) Cos[2] Gamma[1 - 2 I, -2 I] +
I (-I)^(-2 I) 2^(-6 I) Cos[2] Gamma[1 - 2 I, -4 I] +
I (-32 I)^(-2 I) Cos[2] Gamma[1 + 2 I, 2 I] -
I (-I)^(-2 I) 2^(-10 I) Cos[2] Gamma[1 + 2 I, 4 I] - (-8 I)^(-2 I)
Gamma[1 - 2 I, -2 I] Sin[2] + (-I)^(-2 I) 2^(-6 I)
Gamma[1 - 2 I, -4 I] Sin[2] - (-32 I)^(-2 I)
Gamma[1 + 2 I, 2 I] Sin[2] + (-I)^(-2 I) 2^(-10 I)
Gamma[1 + 2 I, 4 I] Sin[2])

In[12]:= % // N

Out[12]= 0.957467+ 0. I

In[13]:= % // Chop

Out[13]= 0.957467

Regards,
-- Jean-Marc

• Prev by Date: Re: Re: Nested If
• Next by Date: Re: integration
• Previous by thread: Re: integration
• Next by thread: Re: integration