Double Integral using ymax and ymin

1 回表示 (過去 30 日間)
Ikenna Iwudike
Ikenna Iwudike 2022 年 4 月 22 日
回答済み: Star Strider 2022 年 4 月 22 日
I'm having trouble trying to integrate this function. My y bounds are ln(x)/x to 1/x. my x bounds are 1 to e.
F = @(x,y)exp(x*y);
ymin = @(x)log(x)/x;
ymax = @(x)1/x;
q = integral2(F,1,exp,ymin,ymax)

採用された回答

Star Strider
Star Strider 2022 年 4 月 22 日
Use element-wise operations for the multiplications and divisions in the anonymous functions. Also exp must have an argument.
Try this —
F = @(x,y)exp(x.*y);
ymin = @(x)log(x)./x;
ymax = @(x)1./x;
q = integral2(F,1,exp(1),ymin,ymax)
q = 1.0000
Make appropriate changes to get the desired result.
.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by