# Product of one-dimensional integrals, numerical integration

2 ビュー (過去 30 日間)
DIMITRIS GEORGIADIS 2021 年 4 月 17 日
I want to compute the following product of integrals numerically using the and the tool of Matlab:
where, are known scalar values gathered into a vector and f, g are two continuous and differentiable functions. Any ideas?
##### 2 件のコメント表示 1 件の古いコメント非表示 1 件の古いコメント
DIMITRIS GEORGIADIS 2021 年 4 月 17 日
Thank you for your answer. I mean how to program it appropriately.

サインインしてコメントする。

### 採用された回答

Divija Aleti 2021 年 4 月 22 日
Hi Dimitris,
Have a look at the following example code. I have assumed different functions for 'f' and 'g' and integrated their product from a lower bound of -2 to an upper bound of 2 using the 'int' function. There are 5 known scalar values here (n = 5), which I have gathered into a vector yi.
yi = 1:5;
syms x y
g(x,y) = x*y;
h = 1;
for i = 1:5
f(y) = yi(i)*y^3;
hi = int((f(y).*g(x,y)),y,-2,2);
h = hi.*h;
end
Hope this helps!
Regards,
Divija
##### 1 件のコメント表示 なし非表示 なし
DIMITRIS GEORGIADIS 2021 年 4 月 22 日
Thank you Divija!

サインインしてコメントする。

### カテゴリ

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

### Community Treasure Hunt

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

Start Hunting!

Translated by