You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Return the critical points of `p` (real zeros of the derivative) within `I` in sorted order.
213
+
214
+
* `p`: a polynomial
215
+
216
+
* `I`: a specification of a closed or infinite domain, defaulting to `Polynomials.domain(p)`. When specified, the values of `extrema(I)` are used with closed endpoints when finite.
217
+
218
+
* `endpoints::Bool`: if `true`, return the endpoints of `I` along with the critical points
219
+
220
+
221
+
Can be used in conjuction with `findmax`, `findmin`, `argmax`, `argmin`, `extrema`, etc.
222
+
223
+
## Example
224
+
```
225
+
x = variable()
226
+
p = x^2 - 2
227
+
cps = Polynomials.critical_points(p)
228
+
findmin(p, cps) # (-2.0, 2.0)
229
+
argmin(p, cps) # 0.0
230
+
extrema(p, cps) # (-2.0, Inf)
231
+
cps = Polynomials.critical_points(p, (0, 2))
232
+
extrema(p, cps) # (-2.0, 2.0)
233
+
```
234
+
"""
235
+
functioncritical_points(p::AbstractPolynomial{T}, I =domain(p);
0 commit comments