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

Instruction: (MATLAB) Do the general command to solve the numerical method Do se

ID: 707296 • Letter: I

Question

Instruction: (MATLAB)

Do the general command to solve the numerical method
Do separate function file for the function
Execute your function file in the command window.
Print screen instructions (1-3) and paste it in the microsoft word.

Question 1 :In a chemical engineering process, water vapor (H2O) is heated to sufficiently high temperatures that a significant portion of the water dissociates, or splits apart, to form oxygen (O2) and hydrogen (H2): H2O? H2+0.5 O2. If it is assumed that this is the only reaction involved, the mole fraction x of H2O that dissociates can be represented by K= (x/1-x) / square root (2Pt/2+x)

K = (x/1 - r) 2 Pt/2 + x

Explanation / Answer

file_name= ` Newton raphson method `;

clear all

clc

sums x;

fun = input ( ` Enter the function `);

f= in line (fun);

z= diff (f (x));

f1= in line (x);

x0 = input ( `Enter the initial value of iteration: `);

x=x0;

For i=0:inf

y=x;

x= y -(f (x)/f1 (x));

If x==y;

break;

end

end

fprintf (" The Total value of iteration and x value: ");

i

x

We can run this m-file from the prompt by typing its name
>Newton raphson method