Re: Repeated Integrals
- To: mathgroup at smc.vnet.net
- Subject: [mg130850] Re: Repeated Integrals
- From: Peter Pein <petsie at dordos.net>
- Date: Tue, 21 May 2013 00:03:12 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- Delivered-to: l-mathgroup@wolfram.com
- Delivered-to: mathgroup-outx@smc.vnet.net
- Delivered-to: mathgroup-newsendx@smc.vnet.net
- References: <kna71o$fve$1@smc.vnet.net>
Am 19.05.2013 11:46, schrieb briankolo at 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?
>
>
Nest/NestList are your friends:
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]