Laboratory Work No. 1: Solving the One-Dimensional Problem of Finding the Root(s) of Equation by the Method of Dichotomy and Tangents
Objective:
The main goal of this laboratory work is to apply both the method of dichotomy (bisection method) and the tangent method (Newton's method) to find the root(s) of a given equation with a specified level of accuracy. You will then compare these methods based on efficiency, number of iterations, and easiness of implementation.
Equation to Solve:
[2x = x^2 -1]
Accuracy:
[e = 0.001]
Tasks:
-
Theoretical Background:
- Start by reviewing the theoretical aspects of both the dichotomy method and the tangent (Newton's) method.
- Understand the convergence criteria for each method.
-
Preparation Task:
- Graphically represent the given function to visually estimate the root's location.
- Use any graph plotting tool or software you are familiar with (e.g., MATLAB, Python with Matplotlib, Graphing Calculator).
-
Implementation of Dichotomy Method:
- Implement the dichotomy method algorithm in your preferred programming language (Python, C++, Java, etc.).
- Ensure your implementation includes a mechanism to stop the iteration once the absolute error is less than or equal to 0.001.
- Apply your implementation to find the root(s) of the given equation.
-
Implementation of Tangent (Newton's) Method:
- Implement the tangent method algorithm.
- Your implementation should also stop once the desired accuracy is achieved.
- Apply the method to find the root(s) of the equation.
-
Analysis and Comparison:
- Compare the two methods based on the following criteria:
- Number of iterations to achieve the desired accuracy.
- Computational time (if possible).
- Ease of implementation.
- Convergence reliability.
-
Report Writing:
- Document the process and findings in a structured report.
- The report should include:
- Title
- Objective of the laboratory work
- Theoretical background
- Methodology (include snippets of code, algorithm descriptions)
- Results (tables of iterations, graphical representations of the function, and root estimations)
- Discussion (comparison of methods, advantages, and disadvantages)
- Conclusion
- References (if any)
-
Presentation:
- Prepare to present your findings and methodology to the class. Include discussion on potential issues you faced during implementation and how you overcame them.
Deliverables:
- Source code for both the dichotomy and tangent method implementations.
- A detailed report including all the sections mentioned in task 6.
- A presentation summarizing the key findings of your laboratory work.
Evaluation Criteria:
- Correctness and efficiency of the implemented algorithms.
- Depth of analysis in the comparison of the dichotomy and tangent methods.
- Quality and structure of the report and presentation.
Note:
Remember to test your algorithms with different starting points (where applicable) to ensure their robustness and accuracy. Consider edge cases and how your implementation might handle or fail with such inputs.