The analytical solution was obtained using the given equation (Kirchhoff's rules) from the prompt and setting it equal to zero. Solving for f(w) = 0 allows us to find the input for angular frequency, "w", where the function crosses the x-axis. This is the "true" root. See below for the equation and example calculation. A value for "w" is used that is close to the true root to illustrate how close to zero the output is. This demonstates that the function is likely close to a root.
Two approaches were used to estimate the root of the given function. The first is called the "bisection method". This method works by cutting the upper and lower boundaries in half, and then evaluating the function at this new value "xr". If the function switches signs between xr and the lower bound, xr becomes the new upper bound and the process is repeated. If the function switches signs between the upper bound and xr, then xr becomes the new lower bound. This repeats until the approximate error reaches a certain point, meaning the function is converging towards a solution. See below for an example caluation.
The false position method is similar to the bisection method apart from one key difference. The false postion method evaluates the function at the lower and upper bounds and then draws a straight line between the points (xl, f(xl)) and (xu, f(xu)). Where this line crosses the x-axis becomes the new xr or root estimation. This is different when compared to the bisection method, which estimates the new xr as being halfway between xl and xu. Taking the function values at these two points into account has one major benefit. If the function at one of the bounds is much closer to zero, it may make sense that this bound must be closer to the root. Although this assumption holds up for many functions, it does not hold up for this one (as we will discuss further in the error analysis). This is because the upper initial bound, 1000, evaluates closer to zero than the lower bound. However, the true root is much closer to the initial lower bound of x = 1. This function is asymptotic, which causes problems for the false position method as this graphical insight takes into account an assumption that does not hold up for this particular function. Despite this, we will try this method anyway and compare the resultant error and iterations required. See below for an example calculation.
Figure 2: Approximate and True Error - Bisection
Thirteen iterations were required from the bisection method to obtain a root estimation within the error threshold of 0.1%. The reason the true error begins much higher than the approximate error is because the "halfway" point between the initial bounds of 1 and 1000 is 500, which is many times higher than the true value of the root 157.909. This gives a true error of above 100% because the xr initial approximation is more than double the true value. The approximate error on the first iteration is only 100% because it is being compared to zero for the "previous estimation" to its just xr/xr*100 which is 100%. The final root estimation for the bisection method was 157.9474.
Figure 3: Approximate and True Error - False Position
As we can see from the two error plots side-by-side, the false position method is clearly inferior to the bisection method for this problem. 578 iterations were required to obtain a root estimate of 189.4316, meaning more iterations and a less accurate estimation compared to the bisection method. The approximate error fell off steeply after the first iteration, but took much longer to approach our error threshold when compared to the bisection method. Our true error started off high on the first iteration, as our first "guess" for the root was very far off from the true value. This segaways into the reason why the false position method is inferior to the bisection method for this problem. The false position method takes into account a graphical cue, determining which of the original bounds is closer to the x-axis. It then assumes that this bound must be closer along the x-axis to the root compared to the other bound, and so this bound is the one that is modified. The "false position" is actually where a line drawn from f(xl) and f(xu) crosses the x-axis. This false position is used for future iterations of xr. Normally this assumption may go well for functions that behave a particular way, but ooking at Figure 1 in the analytical solution we can see where the problem lies. The upper bound of 1000 is much closer to the x-axis that is the lower bound of 1, yet the upper bound is much further away from the true root. We thus waste time utilizing the assumption that the upper bound must be closer to the true root because the function hugs the x-axis after crossing it into negative y values.