diff options
| author | Christian Kolset <christian.kolset@gmail.com> | 2025-09-10 10:44:31 -0600 |
|---|---|---|
| committer | Christian Kolset <christian.kolset@gmail.com> | 2025-09-10 10:57:10 -0600 |
| commit | 988717825b29901dff1ac22432be1372434badd7 (patch) | |
| tree | 9ecba453d8e4b4df3bf10e6c3a473471823b103d /tutorials | |
| parent | cdf6be9e545f097c0ecd46cd2be716c84f729a0b (diff) | |
Added fsolve with lambda fundtion
Diffstat (limited to 'tutorials')
| -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 |
