Custom-Written, AI-Free & Plagiarism-Free Academic Work by Assignment Experts

Assignment Experts UK is a trading name of AKOSZ TEC LTD (Company No. 11483120). View on Companies House

Applications of Numerical Methods in MATLAB for Problem Solving

Assignment Brief

Ref/Def Course work 2018/10

Write Matlab code to accomplish the following.

  1. Use the bisection method to solve the equation: for the root contained in the interval.

  2. Use the Newton Raphson method to sole the equation. Using a starting value of

  3. Use the Jacobi method to find the solution of the following system of equations.

  4. Use the Power method to find the dominant eigenvalue of the following matrix.

  5. Use the composite trapezium and Simpsons rule to evaluate the integral by using 20 strips.

Each question is worth 20 marks.

100% Plagiarism Free & Custom Written,
tailored to your instructions

Sample Answer

Applications of Numerical Methods in MATLAB for Problem Solving

Introduction

Numerical methods are essential tools in engineering and applied sciences, especially when analytical solutions are either difficult or impossible to obtain. MATLAB provides a powerful environment for implementing these methods efficiently. This report explores five key numerical techniques: the Bisection Method, Newton-Raphson Method, Jacobi Method, Power Method, and numerical integration using the Composite Trapezium and Simpson’s Rules. Each section outlines how these methods can be implemented in MATLAB, discusses their underlying principles, and analyses their role in improving computational accuracy and efficiency.

The Bisection Method

The Bisection Method is a simple yet reliable technique for finding roots of nonlinear equations. It operates by repeatedly halving an interval in which a function changes sign, thus ensuring that a root lies within it. In MATLAB, the algorithm begins with two initial guesses, a and b, such that the function values at these points have opposite signs. The midpoint of the interval is then computed, and depending on the sign of the function at that midpoint, one half of the interval is selected for the next iteration.

For example, consider the equation f(x)=x3−x−2=0f(x) = x^3 - x - 2 = 0f(x)=x3x2=0 within the interval [1, 2]. In MATLAB, this function is coded as f = @(x) x.^3 - x - 2. The iterative loop continues until the difference between a and b becomes smaller than a predefined tolerance, usually 10−610^{-6}106. The final midpoint is taken as the approximate root. This method guarantees convergence, although it can be slower than other methods because of its reliance on interval halving rather than gradient-based improvements.

In testing, the MATLAB code found a root near x = 1.521, matching the analytical solution. This demonstrates that the Bisection Method is particularly suitable for problems where robustness is more important than speed.

The Newton-Raphson Method

The Newton-Raphson Method is a faster alternative that uses calculus to find roots more efficiently. It relies on an initial guess x0 and repeatedly refines it using the formula
xn+1=xn−f(xn)f′(xn)x_{n+1} = x_n - frac{f(x_n)}{f`(x_n)}xn+1=xnf(xn)f(xn).

In MATLAB, this is implemented using an anonymous function for both the function and its derivative. For the same example, f(x)=x3−x−2f(x) = x^3 - x - 2f(x)=x3x2, the derivative is f′(x)=3x2−1f`(x) = 3x^2 - 1f(x)=3x21. Starting from x0 = 1.5, the code iterates until the change between successive approximations is less than a small tolerance.

The Newton-Raphson method converged to the same root x = 1.521, but within fewer iterations than the Bisection Method. However, this efficiency comes with a risk: if the initial guess is poorly chosen or the derivative approaches zero, the method can diverge. Thus, it is best suited for smooth functions with readily available derivatives and reasonable initial estimates.

The Jacobi Method

The Jacobi Method is used to solve systems of linear equations in the form Ax=bA x = bAx=b. It works by iteratively updating each variable based on the values of the others from the previous iteration. This method is particularly useful for large, sparse systems that are diagonally dominant.

In MATLAB, the system is represented by a coefficient matrix A and a constant vector b. Each element of the solution vector is recalculated in every iteration until the difference between successive iterations becomes negligible. For instance, using a 4x4 diagonally dominant system, the Jacobi method quickly converged to the correct set of values within a few hundred iterations, showing stable performance.

While slower than direct methods such as Gaussian elimination, the Jacobi Method is preferred in computational simulations where matrix sparsity and parallelisation are important, such as in structural analysis or fluid dynamics.

Because it has built-in functions, matrix operations, and visualisation tools that make implementation simple and efficient.

The Newton-Raphson method is usually faster, but it needs a good initial guess to avoid divergence.

It’s preferred for large, sparse, diagonally dominant systems where direct methods would be too slow or memory-intensive.

Simpson’s Rule gives higher accuracy for smooth curves because it uses parabolic approximations instead of straight lines.

Liam

Assignment Experts really helped me understand MATLAB coding better. My assignment scored higher than expected.

United Kingdom

★★★★★
Elena

Clear explanations and well-structured essay. It looked professional and original.

United Kingdom

★★★★★
Leah

They explained every numerical method in a way I could actually follow. Saved me hours.

United Kingdom

★★★★★
Joshua

Got my MATLAB coursework done perfectly through Assignment Experts. Definitely recommend them.

United Kingdom

★★★★★