I'm getting wrong answer?

10 ビュー (過去 30 日間)
Mobasher Hossain
Mobasher Hossain 2015 年 3 月 14 日
コメント済み: Mobasher Hossain 2015 年 3 月 14 日
I'm trying to calculate the volume under x^2+ 1 curve when the curve is rotated around the x axis.This integration is from 0 to 3 with x incrementing by 0.1 using disk method.I did is the following way: l = 0.1;
sum = 0
for index = 1:30;
x = (index-1)*0.1;
y = pi*((x^2+1)^2)*l;
sum = sum + y;
end
clc; I'm getting volume 203.418093.However, the calculator integration gives volume 218.6548.

採用された回答

Roger Stafford
Roger Stafford 2015 年 3 月 14 日
In each of your 30 disks you are using the radius at its smaller end, so of course your answer will be smaller than the true volume. You will get a more accurate answer if you select the central radius for each disk. You will also get more accuracy if you cut the volume into more than 30 disks. Your "calculator" accuracy is, of course, achieved by using the methods of calculus, which would be the smart way in this problem.
  1 件のコメント
Mobasher Hossain
Mobasher Hossain 2015 年 3 月 14 日
Thanks Roger but the homework question asks me to increment it by 0.1 each time.I guess I'm right then.

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by