Complex integra problem

Discussion in 'MATLAB' started by Paul, Aug 5, 2010.

  1. Paul

    Paul Guest


    Suppose, I have integral I(t)=int from 0 to inf x^-2 (1-0.8*i*t*x)^-5*erfc(1-logx/5)dx
    dblquad is used to calculate int from 0 to inf I(t)dt
    But how can I use it to calculate int from 0 to inf I(t)*I(t)dt ?
    Do I need here nested handles? If yes, then how should I apply them?

    Or maybe you know some other ways?

    Thanks in advance.
    Paul, Aug 5, 2010
    1. Advertisements

  2. I2 = @(t) I(t).^2;

    and dblquad I2


    - Is that log(x/5) or log(x)/5 ?

    - Is your log base 10 or natural log?

    - Is the 0.8 intended to be equivalent to 4/5 ?

    I am attempting some symbolic transforms to see if I can derive a nicer
    function, but when you start doing symbolic transforms, 4/5 versus 0.8 makes a
    difference, especially if the coefficient turns up as an exponent.
    Walter Roberson, Aug 5, 2010
    1. Advertisements

  3. Paul

    Paul Guest

    Coefficients can be changed dynamically in problem, those digits are just example.
    I tried to use symbolic, but this integral can't be evaluated explicitly. Moreover, you could see i under integral (i^2=-1). So it's complex.
    Paul, Aug 5, 2010
  4. Paul

    Paul Guest

    Hello thanks for answer.
    I2 = @(t) I(t).^2;
    dblquad I2

    But how are you define I ?
    Paul, Aug 5, 2010
  5. Paul

    us Guest

    a hint:
    - the var I must live in the workspace when you create the function handle...

    us, Aug 5, 2010
  6. Paul

    Paul Guest

    can you give me the code, not hint.
    [email protected](x,t) x^-2*...... ?
    Paul, Aug 5, 2010
  7. Take the function handle you have now for dblquad'ing x^-2 <etc>
    and wrap another handle around it that takes the same parameters and calls the
    first handle and squares the result.
    Walter Roberson, Aug 5, 2010
  8. Paul

    Paul Guest

    I tried this code: (function x*y^2)
    And integration from 0 to 1:
    [email protected](x,y) x.^2*y;
    [email protected](y) I(y).^2;

    But it's not working.

    ??? Error using ==> @(y) I(y).^2
    Too many input arguments.

    Please help!!!
    Paul, Aug 5, 2010
  9. Does that match what I said,

    Does your I2 have the *same* parameters as your I ?

    I = @(x,y) x.^2*y;
    I2 = @(x,y) I(x,y).^2;

    ans =
    Walter Roberson, Aug 5, 2010
  10. Paul

    Paul Guest

    Paul, Aug 5, 2010
  11. Paul

    Paul Guest

    Can I find value of this integral in analytical value i.e. before last integrating - I(x,y).^2. Maybe using some series expansion?
    Paul, Aug 5, 2010
  12. For the original function with erfc, it appears that the answer is NO. You can
    construct a series or taylor expansion, but the expansion has to be around a
    particular point; some trials show that the expansion would get to very large
    numbers on short order, with a lot of cancellation.

    Experimenting, at least with positive t, it appears that an outcome of the
    log(x)/5 term in conjunction with the rest is that there is a natural
    breakpoint in the integral at x=exp(5), and that for x above that, the
    expression becomes very small. Towards 0, at least for t=2, there appears to
    be a peak around 1/10^9 but I have not yet found any transformation that would
    allow me to calculate where that peak really is; the peak is tall enough that
    even though the area is fairly narrow, it would represent quite a bit of the

    If you could prove these tendencies then it would point to a possible change
    of variables u = 1/x and evaluation "close to 0" that might perhaps be
    amenable to computation in a relatively small number of steps while preserving
    decent precision. Maybe.
    Walter Roberson, Aug 6, 2010
  13. Paul

    Paul Guest

    Hello! Thanks for the answers.
    But I've found the problem.
    I will simplify it
    I need to do the following (I will denote integral through S).
    I need to find: S(S(x.^2*y)*S(x.^2*y))
    All limits are from 0 to 1
    You wrote:
    I = @(x,y) x.^2*y;
    I2 = @(x,y) I(x,y).^2;
    But this code makes the following:
    See the difference?
    I must take two integrals and then take integral from their multiplication, not multiply functions and take double integral.
    Can you provide the appropriate code, if such exists?

    Thank you and please don't propose to use symbolic integration.
    It won't work in my case.
    Paul, Aug 6, 2010
    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.