Group Abstract Group Abstract

Message Boards Message Boards

0
|
22 Views
|
4 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Using NIntegrate with nested integrals

I need to evaluate the following integral:

Integral_0_1 f(y)*Integral_0_y g(x) dx dy

where e.g.

Integral_a_b g(x) dx 

is the definite integral of f(x) over x= a,b.

In the case of the functions I am working with, there is no closed form solution to the integral of g(x), so I need to evaluate this integral numerically.

NIntegrate[f(y)*NIntegrate[g(x),{x,0,y}],{y,0,1}]

this results in an error message stating that x=y is not a valid limit of integration, because the inner Nintegrate function recognizes y as a variable rather than a numerical value assigned to it. What are my options for numerically integrating functions of this type, i.e. where

 Integral_0_y g(x) dx  = F(y)

cannot be computed explicitly but is part of the integrand? I've attached a notebook (with an example) in case my notation isn't clear. The numerical integration evaluates to something, but I'm not confident that the result is meaningful because of the error in having a variable y as the integrand.

Attachments:
POSTED BY: MAXIM SHPAK
4 Replies

Regards M.I.

POSTED BY: Mariusz Iwaniuk

..

POSTED BY: MAXIM SHPAK

Have you considered transforming the iterated integrals into a double integral?

You gave two different spellings to var. Choose one.

POSTED BY: Gianluca Gorni

Unless I'm missing something obvious (quite possible), it seems to me that turning this into a double integral would require having a closed-form expression in terms of two different variables. Because the inner integral evaluates into a function of the outer integral and doesn't have an explicit, analytical expression, this isn't the case

POSTED BY: MAXIM SHPAK
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard