# Analysis Notes

## derivative

for a function f to have a derivative, it is necessary for the function f to be continuous, but continuity alone is not sufficient.

example of continuous function that's nowhere differentiable [ Weierstrass function ] [ 2017-10-10 https://en.wikipedia.org/wiki/Weierstrass_function ]

example of continuous function that's not differentiable at 0.
`f(x) := x^(1/3)`

(because it's got a vertical tangent there.
meaning, limit at a is infinity or negative infinity.
`Limit[ (f(a+h) - f(a))/h,{h,a}]) == ∞`

Similar is vertical cusp, where the limit from left or right is positive/negative ∞.
But, something seems wrong here. Because, such curve is actually smooth.
For example, a circle.
And if we parametrize such curve as R1 to R2, where we have the jacobian matrix, the derivative exist?

## Differentiable function

[ Differentiable function ] [ 2017-10-10 https://en.wikipedia.org/wiki/Differentiable_function ]

a differentiable function of **one real variable** is a function whose derivative exists at each point in its domain. As a result, the graph of a differentiable function must have a (non-vertical) tangent line at each point in its domain, be relatively smooth, and cannot contain any breaks, bends, or cusps.

### Differentiability in higher dimensions

If all the partial derivatives of a function exist and are continuous in a neighborhood of a point, then the function is differentiable at that point, and it is of class C1.

Formally, a function of several real variables f: Rm → Rn is said to be differentiable at a point x0 if there exists a linear map J: Rm → Rn such that

lim h → 0 ∥ f ( x 0 + h ) − f ( x 0 ) − J ( h ) ∥ R n ∥ h ∥ R m = 0. {\displaystyle \lim _{\mathbf {h} \to \mathbf {0} }{\frac {\|\mathbf {f} (\mathbf {x_{0}} +\mathbf {h} )-\mathbf {f} (\mathbf {x_{0}} )-\mathbf {J} \mathbf {(h)} \|_{\mathbf {R} ^{n}}}{\|\mathbf {h} \|_{\mathbf {R} ^{m}}}}=0.} \lim _{\mathbf {h} \to \mathbf {0} }{\frac {\|\mathbf {f} (\mathbf {x_{0}} +\mathbf {h} )-\mathbf {f} (\mathbf {x_{0}} )-\mathbf {J} \mathbf {(h)} \|_{\mathbf {R} ^{n}}}{\|\mathbf {h} \|_{\mathbf {R} ^{m}}}}=0.

If a function is differentiable at x0, then all of the partial derivatives exist at x0, in which case the linear map J is given by the Jacobian matrix. A similar formulation of the higher-dimensional derivative is provided by the fundamental increment lemma found in single-variable calculus.

Note that existence of the partial derivatives (or even all of the directional derivatives) does not in general guarantee that a function is differentiable at a point. For example, the function f: R2 → R defined by

f ( x , y ) = { x if y ≠ x 2 0 if y = x 2 {\displaystyle f(x,y)={\begin{cases}x&{\text{if }}y\neq x^{2}\\0&{\text{if }}y=x^{2}\end{cases}}} f(x,y)={\begin{cases}x&{\text{if }}y\neq x^{2}\\0&{\text{if }}y=x^{2}\end{cases}}

is not differentiable at (0, 0), but all of the partial derivatives and directional derivatives exist at this point. For a continuous example, the function

f ( x , y ) = { y 3 / ( x 2 + y 2 ) if ( x , y ) ≠ ( 0 , 0 ) 0 if ( x , y ) = ( 0 , 0 ) {\displaystyle f(x,y)={\begin{cases}y^{3}/(x^{2}+y^{2})&{\text{if }}(x,y)\neq (0,0)\\0&{\text{if }}(x,y)=(0,0)\end{cases}}} f(x,y)={\begin{cases}y^{3}/(x^{2}+y^{2})&{\text{if }}(x,y)\neq (0,0)\\0&{\text{if }}(x,y)=(0,0)\end{cases}}

is not differentiable at (0, 0), but again all of the partial derivatives and directional derivatives exist.