Question: Basically, I wrote my program and included both integration methods needed but I cannot find out how the writing the function for the bisection method

Basically, I wrote my program and included both integration methods needed but I cannot find out how the writing the function for the bisection method in order to find the rotts will help me in finding the endpoint that i need in the integral.Basically, I wrote my program and included both integration methods needed butI cannot find out how the writing the function for the bisectionmethod in order to find the rotts will help me in finding

Amer, a former teaching assistant for COMP 208 has kindly generated the following polynomial fitting equation for the equilibrium data for your use: 8.38 -31.976.x+39.911.x2 -13.542.x3 Part 1 (20 marks) In the first part of this assignment, you are to use a numerical integration algorithm to approximate the natural logarithm, In(-) which should equal dL for L1 = 1 moles and ,-Px (P ranges from 0.99 to 0.50). In order to test the accuracy of your code, you can compare it using the function log(number), which can be found in . You have to use one of the numerical integration methods you learned in class (midpoint, trapezoidal, etc) Part 2 (80 marks) In the second part of this assignment, you are to find x for x2 0.005, Li1 moles and L,-P x L (P ranges from 0.99 to 0.50). If you were not able to solve part 1 of the assignment, you can use the function log(number) from to complete this part of the assignment. In order to find x, a root finding algorithm (bisection, secant, etc) should be used, where the function passed is- (mentioned above) and the integration of this function is used to mentioned above) and the integration of this function to determine the value of xi. You must use a different integration method from part 1. The output of your program should look like the following: 2 = 0.990000 %L1 In(L2/L1)--0.010050 x1 = 0.006231 L2 = 0.980000 %L1 In(L2/L1)--0.020203 x1 = 0.007470 Amer, a former teaching assistant for COMP 208 has kindly generated the following polynomial fitting equation for the equilibrium data for your use: 8.38 -31.976.x+39.911.x2 -13.542.x3 Part 1 (20 marks) In the first part of this assignment, you are to use a numerical integration algorithm to approximate the natural logarithm, In(-) which should equal dL for L1 = 1 moles and ,-Px (P ranges from 0.99 to 0.50). In order to test the accuracy of your code, you can compare it using the function log(number), which can be found in . You have to use one of the numerical integration methods you learned in class (midpoint, trapezoidal, etc) Part 2 (80 marks) In the second part of this assignment, you are to find x for x2 0.005, Li1 moles and L,-P x L (P ranges from 0.99 to 0.50). If you were not able to solve part 1 of the assignment, you can use the function log(number) from to complete this part of the assignment. In order to find x, a root finding algorithm (bisection, secant, etc) should be used, where the function passed is- (mentioned above) and the integration of this function is used to mentioned above) and the integration of this function to determine the value of xi. You must use a different integration method from part 1. The output of your program should look like the following: 2 = 0.990000 %L1 In(L2/L1)--0.010050 x1 = 0.006231 L2 = 0.980000 %L1 In(L2/L1)--0.020203 x1 = 0.007470

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!