Numerical methods for solving a nonlinear equation: Non-linear equations
Non-linear equations
A linear equation \(a\cdot x+b=0\), with parameters \(a\) and \(b\) and variable \(x\), is easy to solve. In other words, we can easily find the zero of the linear function \(f(x)=a\cdot x+b\). Mathematicians also call this problem finding the root of the equation \(f(x)=0\).
There are also non-linear functions: you have come across many of them in the chapters on mathematical functions. You also want to be able to determine zeros for such functions and compositions of these functions. This is one of the most common problems in applied mathematics and in many other fields of application.
For the quadratic function \(f(x)=a\cdot x^2 + b\cdot x+c\) we have previously discussed how many real zeros and under what conditions there can be and the quadratic formula also provides them in formula form. It is less known that this is still possible for polynomial functions of degree three or four, but not for polynomial functions of degree five or higher. For most non-linear functions you cannot compute the zeros exactly and we have to be content with being able to find a numerical approximation of a zero with a pre-specified accuracy.
Also, the number of zeros of non-linear functions can be any natural number or infinity. The table with examples below illustrates this: \[\begin{array}{c|c} \mathrm{functie} & \mathrm{number\;of\;zeros} \\ \hline e^x-x & 0 \\[2pt] e^x+x & 1 \\[2pt] e^2 -2 - x & 2 \\[2pt] \sin(x)-\frac{x}{2} & 3 \\[3pt] \cos(x)-\frac{x}{3\pi} & 4 \\[3pt] \sin(x)-\frac{2x}{5\pi} & 5 \\[3pt] \cos(x^2) & \infty \end{array}\]
In this chapter we discuss some basic methods and implement them in Python. We experimentally investigate the behaviour of the approximations and the truncation errors. Later, when the mathematical knowledge about differentiation and derivative functions has been refreshed, we will discuss more advanced methods and we can also discuss the error analysis of numerical methods.
Assumption We will always assume that the function \(f\) is a 'neat' function on the closed interval \([a,b]\) and that \(f(a)\) and \(f(b)\) have different signs. What exactly we mean by a 'neat' function is not clear, but the functions we study in this course have this property. Only important here is that the intermediate value theorem is applicable, so that there exists a number \(w\) in the open interval \((a,b)\) such that \(f(w)=0\). In other words, we will always assume that there is a zero point in the area under consideration.