diff options
Diffstat (limited to 'tutorials/module_2/2_num_methods_1.md')
| -rw-r--r-- | tutorials/module_2/2_num_methods_1.md | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tutorials/module_2/2_num_methods_1.md b/tutorials/module_2/2_num_methods_1.md index 1ab4fa8..d50088c 100644 --- a/tutorials/module_2/2_num_methods_1.md +++ b/tutorials/module_2/2_num_methods_1.md @@ -30,6 +30,14 @@ solution = fsolve(equations, initial_guess) print("Solution:", solution) ``` +```python +from scipy.optimize import fsolve + +f = lambda x: x**3-100*x**2-x+100 + +fsolve(f, [2, 80]) +``` + ## root from SciPy ```python from scipy.optimize import root |
