Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Dear sir. i need only the matlab parts. thank you. regards 1. The following equa

ID: 3184918 • Letter: D

Question

Dear sir.

i need only the matlab parts.
thank you.
regards

1. The following equation pertains to the concentration of a chemical in a completely mixed reactor: If the initial concentration c 4 and the inflow concentration c 10, compute the time required for c to be 93 percent of c By a) Use three iterations of Regula Falsi method to determine the answer b) Use mat lab program of Regula Falsi method to determine your c) Use three iterations of Newton Raphson method to determine the answer d) Use mat lab program of Newton Raphson method to determine your 2. Integration provides a means to compute how much mass enters or leaves a reactor over a specific time period, as in Where t, and t2 are the initial and final times respectively If the flow rate Q is constant and Q -4 m/min. Evaluate the equation for the data 10 30 35 40 50 40 mg/m a) Trapezoidal rule with the maximum possible n. b) Mat lab program of Trapezoidal rule and compare the result with the result of (a) c) Simpson's rule with the maximum possible n. d) Mat lab program of Simpson's rule and compare the result with the result of (c)

Explanation / Answer

%%% Matlab programm for regula falsi method

%
syms x
f=10*(1-exp(-0.04*x))+4*exp(-0.04*x);
tol=10^(-6);

y(1)=0;
y(2)=3;
for n=2:100
    f1=subs(f,y(n));
    f2=subs(f,y(n-1));
    y(n+1)=(y(n-1)*f1-y(n)*f2)/(f1-f2);
    if ( abs(y(n+1)-y(n)) < tol)
        break;
    end
end
fprintf('Roots of equation at the end of iteration : %f ', y(n+1) );

OUTPUT:

Roots of equation at the end of iteration : -12.770641

%%% NR - Method

syms x
f=10*(1-exp(-0.04*x))+4*exp(-0.04*x);
tol=10^(-6);
% % % % N-R Method
% disp('Newton Raphson method');
s(1)=0;
for n=1:100
    l1=subs(f,s(n));
    l2=subs(diff(f),s(n));
    s(n+1)=s(n)-l1/l2;
    e=abs(s(n+1)-s(n));
    if (e < tol)
        break;
    end
end
fprintf('Roots of equation at the end of iteration is : %f ', s(end) );

OUTPUT:

Roots of equation at the end of iteration is : -12.770641

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote