Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Repeated Integrals
Replies: 1   Last Post: May 21, 2013 12:02 AM

 Messages: [ Previous | Next ]
 Peter Pein Posts: 1,147 Registered: 5/4/05
Re: Repeated Integrals
Posted: May 21, 2013 12:02 AM

Am 19.05.2013 11:46, schrieb briankolo@gmail.com:
> I'm fairly new to Mathematica and I'm trying to create an expression for a set of nested integrals. The innermost integral is
>
> int[0,x,L(y,a)g(y),dy]
>
> Where g(y) is an arbitrary function and a is a parameter. The next integral is
>
> int[0,w,L(x,b)h(x,a),dx]
>
> Where b is a parameter and h(x,a) is the result of the previous integral.
>
> The process then repeats N times. Is there a simple way to express this in Mathematica?
>
>

intlist = With[ (* toy example *)
{L = HeavisideTheta[#1, 1 - #1/#2]&, g = Cos[Pi #]&, a = 3, b = 2},
Assuming[Element[x, Reals], (* needed in this case *)
NestList[
Block[{t}, Integrate[L[t, b] (# /. x->t), {t, 0, x}]]&,
Integrate[L[y, a] g[y], {y, 0, x}],
5]
]
];

Peter

P.S.: in this example, try the plot:

Plot[MapIndexed[#1*Gamma[#2 + 1] x^-#2 &, intlist] //
Evaluate, {x, -.1, 3.5}, PlotRange -> {-.22, 1},
Exclusions -> None, PlotLegends -> Automatic,
WorkingPrecision -> 1.5 \$MachinePrecision]

Date Subject Author
5/19/13 briankolo@gmail.com
5/21/13 Peter Pein