Engineering Mathematics II is fundamental in Electronics Engineering for solving complex equations and data estimation where analytical solutions are impractical. Numerical methods provide systematic procedures to approximate solutions for nonlinear equations and integrals, which are common in circuit analysis, signal processing, and control system design. This chapter focuses on iterative numerical techniques to solve equations, as well as interpolation and extrapolation methods to estimate unknown data points from discrete datasets. Mastery of these methods equips electronics engineers in Kenya to analyze and design systems accurately when exact solutions are unavailable.
Numerical methods are algorithms designed to provide approximate solutions to mathematical problems that cannot be solved analytically or where analytical solutions are cumbersome. In Electronics Engineering, these methods facilitate solving nonlinear equations, differential equations, and integral equations arising in circuit behavior, filter design, and signal modulation. This section introduces iterative methods for solving equations, which are essential in computational electronics applications such as transistor characteristic modeling and feedback control tuning.
Iterative methods solve equations by successive approximations, starting from an initial guess and refining it until a desired accuracy is reached. These methods are particularly useful for nonlinear equations where direct algebraic solutions are impossible. Common iterative methods include the bisection method, Newton-Raphson method, and fixed-point iteration, each with different convergence properties suited to various electronics problems.
Example 1: Solve \(f(x) = x^2 - 4 = 0\) using the bisection method with initial interval \([1, 3]\) to a tolerance of 0.1.
Given: \(f(x) = x^2 - 4\), interval \([1,3]\), tolerance \(= 0.1\)
Step 1: Compute midpoint \(c = \frac{1+3}{2} = 2\)
Step 2: Evaluate \(f(1) = -3\), \(f(2) = 0\), \(f(3) = 5\)
Since \(f(1) \times f(2) < 0\), new interval is \([1, 2]\)
Step 3: New midpoint \(c = \frac{1+2}{2} = 1.5\)
Step 4: Evaluate \(f(1.5) = 1.5^2 - 4 = -1.75\)
Since \(f(1.5) \times f(2) < 0\), new interval \([1.5, 2]\)
Step 5: Midpoint \(c = \frac{1.5+2}{2} = 1.75\)
Step 6: Evaluate \(f(1.75) = 1.75^2 - 4 = -0.9375\)
The interval length is \(2 - 1.5 = 0.5\), continue until interval length < 0.1
...
Answer: Root approximated near \(x = 2\) within tolerance 0.1
Example 2: Solve \(f(x) = x^3 - x - 2 = 0\) using Newton-Raphson starting at \(x_0 = 1.5\).
Given: \(f(x) = x^3 - x - 2\), \(f'(x) = 3x^2 - 1\), initial guess \(x_0 = 1.5\)
Step 1: Apply formula
$$x_{n+1} = x_n - \frac{f(x_n)}{f'(x_n)}$$
Step 2: Calculate \(x_1\)
$$x_1 = 1.5 - \frac{1.5^3 - 1.5 - 2}{3 \times 1.5^2 - 1}$$
$$x_1 = 1.5 - \frac{3.375 - 1.5 - 2}{6.75 - 1} = 1.5 - \frac{-0.125}{5.75}$$
$$x_1 = 1.5 + 0.0217 = 1.5217$$
Step 3: Calculate \(x_2\)
$$x_2 = 1.5217 - \frac{1.5217^3 - 1.5217 - 2}{3 \times 1.5217^2 - 1}$$
Calculate numerator:
$$1.5217^3 = 3.525$$
$$3.525 - 1.5217 - 2 = 0.0033$$
Calculate denominator:
$$3 \times 1.5217^2 - 1 = 3 \times 2.316 - 1 = 6.948 - 1 = 5.948$$
$$x_2 = 1.5217 - \frac{0.0033}{5.948} = 1.5217 - 0.00055 = 1.52115$$
Answer: Root approximated as \(x = 1.52115\)
Example 3: Use fixed-point iteration to solve \(x = \cos x\) starting at \(x_0 = 0.5\).
Given: \(x = \cos x\), initial guess \(x_0 = 0.5\)
Step 1: Calculate \(x_1\)
$$x_1 = \cos 0.5 = 0.8776$$
Step 2: Calculate \(x_2\)
$$x_2 = \cos 0.8776 = 0.6390$$
Step 3: Calculate \(x_3\)
$$x_3 = \cos 0.6390 = 0.8027$$
Step 4: Calculate \(x_4\)
$$x_4 = \cos 0.8027 = 0.6948$$
Step 5: Calculate \(x_5\)
$$x_5 = \cos 0.6948 = 0.7682$$
Step 6: Calculate \(x_6\)
$$x_6 = \cos 0.7682 = 0.7192$$
Answer: Iterates oscillate and approach approximately \(x = 0.739\)
The bisection method is a bracketing iterative technique that narrows down an interval containing a root by repeatedly bisecting it and selecting subintervals where the function changes sign. It guarantees convergence if the function is continuous on the interval and the initial interval endpoints have opposite signs. This method is straightforward and robust but may converge slowly.
$$c = \frac{a + b}{2}$$
where \(a\) and \(b\) are interval endpoints.
Example 1: Find root of \(f(x) = x^3 - 3x + 1 = 0\) in \([0, 2]\) with tolerance 0.2.
Given: \(f(x) = x^3 - 3x + 1\), interval \([0,2]\), tolerance \(=0.2\)
Step 1: \(f(0) = 1\), \(f(2) = 8 - 6 + 1 = 3\), no sign change, choose different interval \([1,2]\)
Step 2: \(f(1) = 1 - 3 + 1 = -1\), \(f(2) = 3\), sign change exists
Step 3: Midpoint \(c = \frac{1+2}{2} = 1.5\)
Step 4: \(f(1.5) = 3.375 - 4.5 + 1 = -0.125\)
Step 5: Since \(f(1.5)\) and \(f(2)\) have opposite signs, new interval is \([1.5, 2]\)
Step 6: Interval length \(2 - 1.5 = 0.5 > 0.2\), continue
Step 7: Midpoint \(c = 1.75\)
Step 8: \(f(1.75) = 5.36 - 5.25 + 1 = 1.11\)
Step 9: New interval \([1.5, 1.75]\) since sign change between \(-0.125\) and \(1.11\)
Step 10: Interval length \(1.75-1.5=0.25 > 0.2\), continue
Step 11: Midpoint \(c=1.625\)
Step 12: \(f(1.625) = 4.29 - 4.98 + 1 = 0.31\)
Step 13: New interval \([1.5, 1.625]\), interval length \(0.125 < 0.2\), stop
Answer: Root approximated between 1.5 and 1.625 with tolerance 0.2
Example 2: Find root of \(f(x) = \sin x - 0.5\) in \([0, \pi]\) with tolerance 0.1.
Given: \(f(x) = \sin x - 0.5\), interval \([0, \pi]\), tolerance \(= 0.1\)
Step 1: \(f(0) = -0.5\), \(f(\pi) = 0.5\), sign change confirmed
Step 2: Midpoint \(c = \frac{0 + \pi}{2} = 1.57\)
Step 3: \(f(1.57) = 1 - 0.5 = 0.5\)
Step 4: New interval \([0, 1.57]\)
Step 5: Midpoint \(c = 0.785\)
Step 6: \(f(0.785) = 0.707 - 0.5 = 0.207\)
Step 7: New interval \([0, 0.785]\)
Step 8: Midpoint \(c = 0.393\)
Step 9: \(f(0.393) = 0.383 - 0.5 = -0.117\)
Step 10: New interval \([0.393, 0.785]\)
Step 11: Interval length \(0.785 - 0.393 = 0.392 > 0.1\), continue
Step 12: Midpoint \(c = 0.589\)
Step 13: \(f(0.589) = 0.555 - 0.5 = 0.055\)
Step 14: New interval \([0.393, 0.589]\)
Step 15: Interval length \(0.196 > 0.1\), continue
Step 16: Midpoint \(c = 0.491\)
Step 17: \(f(0.491) = 0.471 - 0.5 = -0.029\)
Step 18: New interval \([0.491, 0.589]\)
Step 19: Interval length \(0.098 < 0.1\), stop
Answer: Root approximated between 0.491 and 0.589 radians
Example 3: Use bisection to find root of \(f(x) = e^{-x} - x\) in \([0,1]\) with tolerance 0.05.
Given: \(f(x) = e^{-x} - x\), interval \([0,1]\), tolerance \(= 0.05\)
Step 1: \(f(0) = 1 - 0 = 1\), \(f(1) = e^{-1} - 1 = 0.3679 - 1 = -0.6321\), sign change confirmed
Step 2: Midpoint \(c = 0.5\)
Step 3: \(f(0.5) = e^{-0.5} - 0.5 = 0.6065 - 0.5 = 0.1065\)
Step 4: New interval \([0.5, 1]\)
Step 5: Midpoint \(c = 0.75\)
Step 6: \(f(0.75) = e^{-0.75} - 0.75 = 0.4724 - 0.75 = -0.2776\)
Step 7: New interval \([0.5, 0.75]\)
Step 8: Midpoint \(c = 0.625\)
Step 9: \(f(0.625) = e^{-0.625} - 0.625 = 0.5353 - 0.625 = -0.0897\)
Step 10: New interval \([0.5, 0.625]\)
Step 11: Interval length \(0.625 - 0.5 = 0.125 > 0.05\), continue
Step 12: Midpoint \(c = 0.5625\)
Step 13: \(f(0.5625) = e^{-0.5625} - 0.5625 = 0.5698 - 0.5625 = 0.0073\)
Step 14: New interval \([0.5625, 0.625]\)
Step 15: Interval length \(0.0625 > 0.05\), continue
Step 16: Midpoint \(c = 0.59375\)
Step 17: \(f(0.59375) = e^{-0.59375} - 0.59375 = 0.5522 - 0.59375 = -0.04155\)
Step 18: New interval \([0.5625, 0.59375]\)
Step 19: Interval length \(0.03125 < 0.05\), stop
Answer: Root approximated between 0.5625 and 0.59375
Newton-Raphson uses function values and derivatives to rapidly find roots by linear approximation. It requires a differentiable function and an initial guess near the root. Its quadratic convergence is efficient for electronics problems such as diode current calculations where speed is critical.
$$x_{n+1} = x_n - \frac{f(x_n)}{f'(x_n)}$$
Example 1: Find root of \(f(x) = x^2 - 5 = 0\) starting at \(x_0=2\).
Given: \(f(x) = x^2 - 5\), \(f'(x) = 2x\), \(x_0=2\)
Step 1:
$$x_1 = 2 - \frac{2^2 - 5}{2 \times 2} = 2 - \frac{-1}{4} = 2 + 0.25 = 2.25$$
Step 2:
$$x_2 = 2.25 - \frac{2.25^2 - 5}{2 \times 2.25} = 2.25 - \frac{5.0625 - 5}{4.5} = 2.25 - \frac{0.0625}{4.5} = 2.25 - 0.0139 = 2.2361$$
Step 3:
$$x_3 = 2.2361 - \frac{2.2361^2 - 5}{2 \times 2.2361} = 2.2361 - \frac{5.0000 - 5}{4.4722} = 2.2361 - 0 = 2.2361$$
Answer: Root approximated as \(2.2361\)
Example 2: Solve \(f(x) = x^3 - 2x - 5 = 0\) with \(x_0=2\).
Given: \(f(x) = x^3 - 2x - 5\), \(f'(x) = 3x^2 - 2\), \(x_0=2\)
Step 1:
$$x_1 = 2 - \frac{8 - 4 - 5}{3 \times 4 - 2} = 2 - \frac{-1}{10} = 2 + 0.1 = 2.1$$
Step 2:
$$x_2 = 2.1 - \frac{9.261 - 4.2 - 5}{3 \times 4.41 - 2} = 2.1 - \frac{0.061}{11.23} = 2.1 - 0.0054 = 2.0946$$
Step 3:
$$x_3 = 2.0946 - \frac{9.185 - 4.189 - 5}{3 \times 4.387 - 2} = 2.0946 - \frac{-0.004}{11.16} = 2.0946 + 0.00036 = 2.0950$$
Answer: Root approximated as \(2.0950\)
Example 3: Find root of \(f(x) = \ln x + x^2 = 0\) starting at \(x_0=0.5\).
Given: \(f(x) = \ln x + x^2\), \(f'(x) = \frac{1}{x} + 2x\), \(x_0=0.5\)
Step 1:
$$f(0.5) = \ln 0.5 + 0.25 = -0.6931 + 0.25 = -0.4431$$
$$f'(0.5) = 2 + 1/0.5 = 2 + 2 = 4$$
$$x_1 = 0.5 - \frac{-0.4431}{4} = 0.5 + 0.1108 = 0.6108$$
Step 2:
$$f(0.6108) = \ln 0.6108 + 0.3731 = -0.4927 + 0.3731 = -0.1196$$
$$f'(0.6108) = \frac{1}{0.6108} + 2 \times 0.6108 = 1.637 + 1.2216 = 2.8586$$
$$x_2 = 0.6108 - \frac{-0.1196}{2.8586} = 0.6108 + 0.0418 = 0.6526$$
Step 3:
$$f(0.6526) = \ln 0.6526 + 0.4269 = -0.4269 + 0.4269 = 0$$
Answer: Root approximated as \(0.6526\)
Fixed-point iteration transforms the equation \(f(x) = 0\) into \(x = g(x)\) and iterates using \(x_{n+1} = g(x_n)\). Convergence depends on the function \(g\) and initial guess. It is useful in electronics for iterative design of amplifier gain and feedback parameters.
$$x_{n+1} = g(x_n)$$
Example 1: Solve \(x = \frac{1}{2}(x + \frac{3}{x})\) starting at \(x_0=1\).
Given: \(g(x) = \frac{1}{2}(x + \frac{3}{x})\), \(x_0=1\)
Step 1:
$$x_1 = \frac{1}{2}(1 + \frac{3}{1}) = \frac{1}{2}(4) = 2$$
Step 2:
$$x_2 = \frac{1}{2}(2 + \frac{3}{2}) = \frac{1}{2}(2 + 1.5) = 1.75$$
Step 3:
$$x_3 = \frac{1}{2}(1.75 + \frac{3}{1.75}) = \frac{1}{2}(1.75 + 1.714) = 1.732$$
Step 4:
$$x_4 = \frac{1}{2}(1.732 + \frac{3}{1.732}) = \frac{1}{2}(1.732 + 1.732) = 1.732$$
Answer: Fixed point approximated as \(1.732\)
Example 2: Solve \(x = \cos x\) starting at \(x_0=0.5\).
Given: \(g(x) = \cos x\), \(x_0=0.5\)
Step 1: \(x_1 = \cos 0.5 = 0.8776\)
Step 2: \(x_2 = \cos 0.8776 = 0.6390\)
Step 3: \(x_3 = \cos 0.6390 = 0.8027\)
Step 4: \(x_4 = \cos 0.8027 = 0.6948\)
Step 5: \(x_5 = \cos 0.6948 = 0.7682\)
Step 6: \(x_6 = \cos 0.7682 = 0.7192\)
Answer: Fixed point approximated near \(0.739\)
Example 3: Solve \(x = 1 + \frac{1}{x}\) starting at \(x_0=1\).
Given: \(g(x) = 1 + \frac{1}{x}\), \(x_0=1\)
Step 1: \(x_1 = 1 + 1/1 = 2\)
Step 2: \(x_2 = 1 + 1/2 = 1.5\)
Step 3: \(x_3 = 1 + 1/1.5 = 1.6667\)
Step 4: \(x_4 = 1 + 1/1.6667 = 1.6\)
Step 5: \(x_5 = 1 + 1/1.6 = 1.625\)
Step 6: \(x_6 = 1 + 1/1.625 = 1.6154\)
Answer: Fixed point oscillates near \(1.618\)
Use the bisection method to find the root of \(f(x) = x^3 - 4x - 9\) in the interval \([2, 3]\) with a tolerance of 0.1. (10 marks)
Apply Newton-Raphson method to solve \(x^3 + x - 1 = 0\) starting at \(x_0=0.5\) and perform three iterations. (10 marks)
Use fixed-point iteration to solve \(x = \sqrt{3x + 4}\) starting at \(x_0=2\) for four iterations. (10 marks)
Solve \(f(x) = e^x - 3x\) using the bisection method in \([0,1]\) with tolerance 0.05. (10 marks)
Use Newton-Raphson to find the root of \(f(x) = \ln x + x^2 - 4\) starting at \(x_0=1.5\) and perform two iterations. (10 marks)
Create a free account to open more of this chapter.
Free: practical guides, quick cards, workplace scenarios and more.
Create a free accountThis chapter introduced numerical methods as essential techniques for approximating solutions to mathematical problems that cannot be solved exactly. It explained how iterative methods are applied to solve equations by repeatedly refining estimates until a desired level of accuracy is achieved. The concepts of interpolation and extrapolation were defined, highlighting their roles in estimating values within or beyond a known set of data points. The chapter further explored the practical application of interpolation and extrapolation in engineering contexts, demonstrating how these methods help predict unknown values based on existing data. Through numerical methods, engineers can efficiently handle complex calculations that arise in design and analysis. The chapter emphasized the importance of these techniques in providing accurate and reliable solutions where traditional analytical methods fall short. Overall, the content equipped students with foundational skills to apply numerical approaches effectively in solving engineering problems.
Use the Newton-Raphson method to find the root of the equation \(f(x) = x^2 - 4 = 0\) starting from an initial guess \(x_0 = 1\). Perform one iteration. (2 marks)
Using the bisection method, find the root of \(f(x) = \cos x - x\) between \(x=0\) and \(x=1\). Perform two iterations and give the approximate root. (3 marks)