Skip to content

Commit 1099b2a

Browse files
committed
wip
1 parent 4cfd8a1 commit 1099b2a

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

docs/src/nondiff_points.md

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,31 +81,40 @@ Saying it is `3` is the arguably the nicest, but it is also the most expensive t
8181
plot(ceil)
8282
```
8383

84-
Here it seems most useful to say the derivative is zero everywhere.
84+
Here it is most useful to say the derivative is zero everywhere.
8585
The limits are zero from both sides.
8686

87-
The other option for `ceil` would be to say it is 1 everywhere.
87+
The other option for `x->ceil(x)` would be relax the problem into `x->x`, and thus say it is 1 everywhere
8888
But that it too weird, if the use wanted a relaxation of the problem then they would provide one.
89-
Imposing one on `ceil` for everyone is not reasonable.
89+
We can not be imposing that relaxation on to `ceil` for everyone is not reasonable.
9090

9191
### Primal finite, and derivative nonfinite and same on both sides
9292

9393
```@example nondiff
9494
plot(cbrt)
9595
```
96-
s(derivative nonfinite and different on each side is not possible with a finite and defined primal.)
97-
### Primal and derivative Non-finite and same on both sides
96+
97+
98+
99+
### Primal and derivative Non-finite and different on both sides
98100
```@example nondiff
99101
plot(x->inv(x^2))
100102
plot!(; xlims=(-1,1), ylims=(-100,100)) #hide
101103
```
102104

103-
### Primal and gradient Non-finite and differing on both sides
105+
In this case the primal isn't finite, so the value of the derivative can be assumed to matter less.
106+
It is not surprising to see a nonfinite gradient for nonfinite primal.
107+
So it is fine to have a the gradient being nonfinite.
108+
109+
## Primal finite and derivative nonfinite and different on each side
104110
```@example nondiff
105-
plot(inv)
106-
plot!(; xlims=(-1,1), ylims=(-100,100)) #hide
111+
plot(x-> sign(x) * cbrt(x))
107112
```
108113

114+
In this example, the primal is defined and finite, so we would like a derivative to defined.
115+
We are back in the case of a local minimal like we were for `abs`.
116+
We can make most of the same arguments as we made there to justify saying the derivative is zero.
117+
109118
### Not defined on one-side
110119
```@example nondiff
111120
plot(x->exp(2log(x)))
@@ -127,6 +136,8 @@ Also nice in this case is that it agrees with the symbolic simplification of `x-
127136
plot(log)
128137
```
129138

139+
Here there is no harm in taking the value on the defined, finite
140+
130141
### sub/super-differential convention
131142
**TODO: Incorperate this with rest of the document. Or move to design notes**
132143

0 commit comments

Comments
 (0)