```python
%matplotlib inline
from numpy import *
from matplotlib.pyplot import *
import sympy as sym

# See 02_non_linear_equations.ipynb for the code
```

We use the function $f(x) = \frac{x}{8}(63x^{4} - 70x^{2} + 15)$, which is the Legendre polynomial of order 5

1. We first **compute the first derivative of this function** through the use of sympy library's `sym.diff`. We'll use this derivative for the Newton's method.

2. We use `sym.lambdify` the function and its derivative in order to make them assume values as parameters.

3. We plot the function with respect to $[-1, 1]$ and put the x axis in evidence. 

## Bisection method

For the bisection method, it is very important **not to choose values that have the same sign**, since we rely on them having different signs in order to perform the bisection step. That's why we start the `bisect` function with 

```python
assert(f(a) * f(b) < 0)
```
The criterion $| x^{k} - \alpha| < T$, where $T$ is the **tolerance** we are prescribing to the algorithm.

Since this assumption would require us to have $\alpha$, which is the value we are looking for, it doesn't make sense. We should simply check that $|f(x^{k}| = 0$ since we are converging towards a zero of the function.


## Newton's Method

See the Jupyter Notebook for the implementation

## Chord Method





65e033499726de532cec6671c2d3ad36a6a289a9
ipynb
Jupyter Notebook
gsarti_notes/lesson_9.ipynb
gsarti/P1.4_seed
e09dc4381c5da0c5781e185d7bce69679b8fca66
CC-BY-4.0
2018-11-08T07:53:28.000Z
2018-11-08T07:53:28.000Z
gsarti_notes/lesson_9.ipynb
gsarti/P1.4_seed
e09dc4381c5da0c5781e185d7bce69679b8fca66
CC-BY-4.0
gsarti_notes/lesson_9.ipynb
gsarti/P1.4_seed
e09dc4381c5da0c5781e185d7bce69679b8fca66
CC-BY-4.0
2019-01-26T11:41:55.000Z
2019-01-26T11:41:55.000Z
Qwen/Qwen-72B
1. YES
2. YES