Integral of the product of integrals

4 visualizaciones (últimos 30 días)
Morteza
Morteza el 16 de En. de 2022
Editada: Torsten el 17 de En. de 2022
I1 = integral [f1(x,y), x, a, b]
I2 = integral [f2(x,y), x, a, b]
I3 = integral [f3(x,y), x, a, b]
integral(I1*I2*I3, y, c, d)
Note that a,b,c,d are constant. Integrals have no analytical solution.

Respuesta aceptada

Matt J
Matt J el 16 de En. de 2022
Editada: Matt J el 16 de En. de 2022
I=@(y,f) integral( @(x)f(x,y), a, b);
I123=@(y) I(y,f1) .* I(y,f2) .* I(y,f3);
integral(I123, c, d)
  2 comentarios
Morteza
Morteza el 17 de En. de 2022
f1= @(y, teta) y.*exp(teta.^2);
f2=@(y, teta) y.*exp(teta.^3);
f3=@(y, teta) y.*exp(teta.^4);
I=@(teta,f) integral( @(y)f(y, teta), 0, 50);
I123=@(teta) I(teta,f1) .* I(teta,f2) .* I(teta,f3);
integral(I123, 0, 50 )
This is an example based on your code. Error:
Error using integralCalc/finalInputChecks (line 515)
Output of the function must be the same size as the input. If FUN is an array-valued integrand,
set the 'ArrayValued' option to true.
Torsten
Torsten el 17 de En. de 2022
Editada: Torsten el 17 de En. de 2022
integral(I123, 0, 50,'ArrayValued',true )
And you shouldn't integrate exp(teta^2),exp(teta^3) or exp(teta^4) up to teta = 50.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Numerical Integration and Differentiation en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by