Integration 1 The work done w on an object by a resultant fo
Integration 1. The work done, w on an object by a resultant force F pulling it at along a horizontal surface and inclined at an angle is defined as: where 0 (x)--0.000s5x +0.0123x +0.13x (radians) Compute work for a -oand b 30 using a 16-segment multiple trapezoidal rule. Roots of equations (BIsection and Newton-Raphson) 1. Equation of state (van der Waals) for Carbon Dioxide given as: RT p (v b) v2 where, p l100,110] atm T-300 K a -3.592 (for CO2) 0.04267 (for co) R -0.082054 Latm/ mol, K Use Newton-Raphson method to find the value of the molar volume, v (L/mol) for different pressures given above. Use other given values as well Use a relative error in the order of 105, or 15 iterations.
Solution
theta = @(x) 0.00055*x^3 + 0.0123*x^2 + 0.13*x;
F = @(x) 1.6*x - 0.045*x^2;
a = 0;
b = 30;
n = 16;
h = (b-a)/n;
f = F(a) + F(b);
for i=a:h:b
f = f + 2*F(i);
end
f = (b-a)*f/(2*n);
disp([\'Work done: \', num2str(f)]);
T = 300;
a = 3.592;
b = 0.04267;
R = 0.082054;
syms v
p = @(v) R*T/(v-b) - a/(v^2);
p_diff = @(v) -1*R*T/(v-b)^2 + 2*a/(v^3);
vs = [];
vs(1) = 1;
i = 2;
iters = 0;
vs(i) = 100;
while (abs(vs(i)-vs(i-1))>10^-5 && iters<=15)
vs(i) = vs(i-1) - p(vs(i-1))/p_diff(vs(i-1));
iters = iters + 1;
i = i + 1;
vs(i) = 100;
end
disp([\'Molar Volume = \', num2str(vs(i-1))])
