one hard integral for Maple: int(exp(cos(x))*cos(x-sin(x)),x=0..2*Pi);

Discussion in 'Maple' started by Nasser M. Abbasi, Dec 6, 2009.

  1. FYI,

    Maple 12

    Can do this integral numerically, but not analytically:
    ------> returns unevaluated



    I do not have Maple13, but was wondering if it can do it in Maple13?
    Nasser M. Abbasi, Dec 6, 2009
    1. Advertisements

  2. Nasser M. Abbasi

    Axel Vogt Guest

    Plotting and playing suggests f:= x -> exp(cos(x))*cos(x-sin(x)) is
    periodic and symmetric like cos, actually both f(Pi+x) - f(Pi-x) and
    f(2*Pi+x) - f(x) are zero, so the task is 2*Int(f(x), x= 0 .. Pi)

    Smells like a Fourier thing ... playing with exp(cos(x)+I*sin(x)) and
    differentiating gives

    Int(f(x),x=0..Pi); expand(%);

    | exp(cos(x)) cos(x) cos(sin(x))

    + exp(cos(x)) sin(x) sin(sin(x)) dx

    And exp(cos(x)+I*sin(-x)); evalc(Im(%)); diff(%, x);

    -exp(cos(x)) cos(x) cos(sin(x)) + exp(cos(x)) sin(x) sin(sin(x))

    Now -exp(cos(x))*sin(sin(x)) is 0 in 0 and in Pi and an antiderivative,
    hence the task is

    Int(2*exp(cos(x))*cos(x)*cos(sin(x)),x = 0 .. Pi)

    which Maple 12 evaluates to be Pi.

    Axel Vogt, Dec 6, 2009
    1. Advertisements

  3. hi Alex;

    But Pi is the WRONG answer. It should be 2 Pi?

    Nasser M. Abbasi, Dec 6, 2009
  4. Maple 11, 12, 13 can do it if we expand f first:

    int(expand(f), x=0..2*Pi);

    The result is 2*Pi.
    Rouben Rostamian, Dec 6, 2009
  5. Nasser M. Abbasi

    Axel Vogt Guest

    As said: your original integral is twice of it. Axel
    Axel Vogt, Dec 6, 2009
  6. Nasser M. Abbasi

    Axel Vogt Guest

    Much better than my way ...
    Axel Vogt, Dec 6, 2009
  7. Alex, With the transformation you did, I was not sure if Pi you showed above
    is the answer to the same problem I had.

    The analytical answer to


    should be 2 Pi, not Pi.

    Nasser M. Abbasi, Dec 6, 2009
  8. Nasser M. Abbasi

    Fırat Guest

    I want to ask new integral such as

    f:=(t-a)^c/(b-t)^d; #a,b,c,d are contant

    How can I found analytical integral solution

    Fırat, Dec 8, 2009
  9. Nasser M. Abbasi

    G. A. Edgar Guest

    Well, int(t^c*(1-t)^d,t=0..1); is the Beta function.
    Change variables x=(t-a)/(b-a) to reduce yours to the case a=0, b=1.
    Then since yours is the indefinite integral, it would be called an
    "incomplete Beta function" I suppose. Maple reports
    Int(x^c*(1-x)^(-d), x) = x^(c+1)*hypergeom([d, c+1], [2+c], x)/(c+1)
    G. A. Edgar, Dec 9, 2009
  10. Nasser M. Abbasi

    Fırat Guest

    Thanks for your answer. But I have some problem. I wrote my maple file
    as you say in the following form:


    / c
    | (t - a)
    F := | -------- dt
    | d
    / (b - t)
    / c
    | (x b - x a) (b - a)
    | -------------------- dx
    | d
    / (b - a - x b + x a)
    / c
    | (x b - 1. x a) (b - 1. a)
    | -------------------------- dx
    | d
    / (b - 1. a - 1. x b + x a)

    but it does not give any answer. Main problem is: this integral form
    appear in my iteration statement and I have to use this integral value
    for new iteration after previous iteration. I want to integrate this
    function and get numerical value.

    Is this possible?

    Fırat, Dec 10, 2009
  11. Nasser M. Abbasi

    Ray Vickson Guest

    You cannot get a numerical answer unless you specify numerical values
    for a, b, c and the integration limits. Maple cannot read your mind.
    You can write answer_above = (b-a)^(c+1-d) * int(x^c/(1-x)^d,x), and
    then express this last integral in terms of an incomplete beta
    function (or a hypergeometric function, as Maple seems to prefer).
    Of course not. You have not said what are the values of a, b, c and
    the integration limits.

    R.G. Vickson
    Ray Vickson, Dec 10, 2009
  12. Nasser M. Abbasi

    Fırat Guest

    In my previous message I said the power c and d are non-integer value.
    I give some values as you say but it does not evulate integral for
    Fırat, Dec 10, 2009
  13. Nasser M. Abbasi

    Ray Vickson Guest

    Here is what I get using Maple 9.5:

    params := {c = 0.3, d = 0.5}
    (c + 1)
    x hypergeom([d, c + 1], [2 + c], x)
    J := ------------------------------------------
    c + 1


    J1 := 0.7692307692 x hypergeom([0.5, 1.3], [2.3], x)

    Of course, if we give numerical values for the integration limits we
    will get a numerical evaluation:
    J2:=subs(params,int(x^c/(1-x)^d,x=0 .. .97)): value(J2);

    R.G. Vickson
    Ray Vickson, Dec 11, 2009
  14. Nasser M. Abbasi

    Fırat Guest

    Thanks for your kindly help and understanding. I am beginner in Maple.
    I want to ask a question. I want to use the first example in Maplesoft

    I wrote as follow
    `Error, NumericalAnalysis is not a command in the Student package\n`

    and give above error message.

    I want write this in Maple 10 classical worksheet. Please let me know
    where I did wrong.

    Fırat, Dec 11, 2009
  15. I hope what you wrote was actually

    The NumericalAnalysis subpackage was first introduced in Maple 13. It
    does not exist in Maple 10.
    Robert Israel, Dec 11, 2009
  16. Nasser M. Abbasi

    Bill Guest

    Actually, a little simplify will produce the desired result directly:

    y := exp(cos(x))*cos(x-sin(x)):
    ti := int(y, x=0..2*Pi):
    simplify(ti, [trig]);
    2 Pi

    Bill, Dec 11, 2009
  17. Nasser M. Abbasi

    Fırat Guest

    Thanks for your answer
    Fırat, Dec 12, 2009
  18. Nasser M. Abbasi

    Archimedes Guest

    Using simplify with the trig option is square brackets is equivalent
    to issuing the command "expand" first, and then simplifying the
    output. So simplify(ti, trig); is not the same as simplify(ti,
    [trig]); Is this documented somewhere? I did not see this in the
    help pages for simplify, or simplify/siderels

    Archimedes, Dec 13, 2009
  19. Nasser M. Abbasi

    Bill Guest

    I agree that the help pages don't explain this well. If you want to
    see what the difference is, try executing
    and then run the other commands. It's quite a bit different. Also try
    'expand. to see how it calls 'simplify.'

    Mele Kalikimaka to all
    Bill, Dec 14, 2009
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.