Function
see math notation, mean value theorem, intermediate value theorem
definition
a function HH between sets A and B is a relation between A and B such that:
HH a b /\ B b > A aor alternativelyB h a > A a--- there exists some output for every inputHH a b_1 /\ HH a b_2 < b_1 = b_2or alternativelya_1 = a_2 < h a_1 = h a_2--- there exists exactly one output for any input
one can use the horizontal line test to determine whether the graph of a curve is the graph of a function
types
applications
Function Vector Space
see vector, vector space
definition HH f if and only if the function f is defined on its whole function › domain
#xxx if and only if it is a set theoryetical function?
properties
zero function O x = 0
function addition (f : g) x = f x : g x
multiplication by a scalar cf x = c | f x
Domain
Codomain
Range
Root
definition the domain of a function is the set of arguments for which it will produce an output
definition the codomain of a function is the set of all outputs it may or may not produce
definition the range of a function is the set of all outputs it definitely can produce
definition the roots of a function f are the values of x such that f x = 0
this asymmetry between the "input" and the "output" of a function is what distinguishes it from a relation --- https://youtu.be/O2lZkr-aAqk?t=724
properties
codomain D x < C f x
range D x == R f x
D x > A f x
Parity
Even Function
an even function is symmetrical about the y axis
definition f x = f ..x > RR x
Odd Function
an odd function is symmetrical about the y axis, but also flipped about the x axis
definition ..f x = f ..x > RR x
Periodic Function
definition f x = f (x : p) /\ RR p > RR x
definition above, p is said to be the period of f
Multivalued Function
definition a function is multivalued if it maps a single input to multiple outputs
#todo link with improved expression evaluation superpositions
#xxx aren't those "superpositions" just the List monad (non-determinism)?
Increasing Function
Decreasing Function
definition a function f is increasing on an interval a -| * -| b if x_1 -| x_2 < f x_1 -| f x_2, or dd f |- 0 on that interval
definition a function f is decreasing on an interval a -| * -| b if x_1 |- x_2 < f x_1 |- f x_2, or dd f -| 0 on that interval
Concavity
definition a function f is concave up at x if dd2 f x |- 0; it bends upwards
definition a function f is concave down at x if dd2 f x -| 0; it bends downwards
a point where function › concavity changes (from up to down or down to up) is a function › inflection point
Extremum
see function › inflection point, derivative
extrema are the largest and smallest value of the function, either within a given range (the local or relative extrema), or on the entire function › domain (the global or absolute extrema). --- Wikipedia
definition
the global extrema x of a function f with function › domain D are defined as
f x |- f y > D y and f x -| f y > D y
definition the global extrema of a function are the absolute highest and lowest points of the function
definition the local extrema of a function are the highest and lowest points of the function within a given range
theorem if f has a local function › extremum at c, the point (c, f c) is a function › critical point of f, but not conversely
First Derivative Test
let f be a continuous ‹function near x = c and c be a critical number of f. then, f has a local function › extremum at c if dd f changes sign at c
Second Derivative Test
let f be a continuous ‹function near x = c and c be a critical number of f where dd f c = 0. then, f has
- a local maximum at
cifdd2 f c -| 0 - a local minimum at
cifdd2 f c |- 0
note the test is inconclusive if
dd2 f c = 0or if it does not exist
Inflection Point
definition An inflection point [...] is a point on a smooth plane curve at which the function › curvature changes sign --- Wikipedia
definition a function f has an inflection point at c if it is continuous at c and its function › concavity changes sign at c
note a function having its second derivative equal to zero at
cdoes not implycis a function › inflection point. as an example,f x = x4does not have a function › inflection point at(x, f x) = (0, 0)
Critical Point
see function, math notation
definition function of one variable a point (c, f c) is a critical point of the function f if dd f c = 0 or it does not exist
definition function of multiple variables a point (c, f c) is a critical point of the function f if all components of dd f c either are zero or do not exist
definition above, c would be said to be a critical number of f
Continuous Function
see math notation
definition a function f x is continuous at x = a if f x {x -> a} = f a #todo lim
note above,
f x {x -> a}#todo lim must exist andf xmust be defined atx = a
definition a function is continuous from the left at a when f x {x -> a "from the left"} = f a #todo lim and both other conditions are met
definition a function is continuous from the right at a when f x {x -> a "from the right"} = f a #todo lim and both other conditions are met
definition a function is continuous on an interval a -| * -| b if it is continuous on every point from a to b exclusively, and continuous from the right at a and from the left at b
definition a function is continuous (globally continuous) if it is continuous on every point of its function › domain
theorem
if f x and g x are continuous at a, then the following functions are also continuous at a:
f : gf .. gf | gc ' fwherecis a scalarf -- gifg a + 0(restriction not necessary, see improved expression evaluation)
Slope
definition dd f
Tangent Line
used to represent function › slope at a point
a tangent line has the same function › slope as a given function at a point
definition
L x = f a : (x..a | dd f a), where
Lis the line tangent tofata
applications
the tangent of a function f approximates f (x ...) near a point (x ...)
function › tangent lines are used in newton's method
Curvature
definition dd2 f
Osculating Circle
used to represent function › curvature at a point
--- https://youtu.be/jvPPXbo87ds?t=1847
an osculating circle has the same function › slope and the same function › curvature as a given function at a point
Average
see integral
definition
"ave" f = $ f {b..a} -- b .. a, where
$ fis an antiderivative offwith respect tox"ave" fis the average of the functionfon the intervala -| * -| b
--- https://youtu.be/7gigNsz4Oe8?t=3093
--- https://youtu.be/FnJqaIESC2s
Arclength
see integral
definition "arc" f = $ t. "abs" (dd f t) where f t = (x, f x ...) --- https://tutorial.math.lamar.edu/classes/calciii/vectorarclength.aspx
definition "arc" f = $ x. "abs" (1, dd f x), see euclidean vector › magnitude
Injective Function
aka one-to-one function
definition a function f is said to be injective if f x_1 = f x_2 < x_1 = x_2, see universal ‹set. for every output value there exists at most one input mapping to it
given the graph of a function, one can use the horizontal line test to determine whether it is injective or not
a function can be proven to be injective by proving that two output values being equal implies that the corresponding input values are equal
Surjective Function
aka onto function
definition a function f with function › codomain C is said to be surjective if C y < f x = y, see universal ‹set. for every output value there exists at least one input mapping to it
a function can be proven to be surjective by proving one can construct an input value for the function given an arbitrary output value
example proving a function is surjective
let
y = f m n = m : n. then, supposem = 0. solving forn, we getn = y. therefore, the function is surjective
example proving a function is not surjective
let
y = f m n = m2 : n2.y = ..1would cause a contradiction as the square of an integer is always a positive integer and the sum of two positive integers is always a positive integer. therefore, the function is not surjective
example proving a function is surjective
let
y = f m n = m. then, we getm = yand therefore the function is surjective
example proving a function is not surjective
let
y = f m n = "abs" n.y = ..1would cause a contradiction as the real› absolute value of an integer is always a positive integer. therefore, the function is not surjective
example proving a function is surjective
let
y = f m n = m .. n. then, supposen = 0. solving form, we getm = y. therefore, the function is surjective
Bijective Function
definition a function f is said to be bijective if it is both injective and surjective. for every output value there exists exactly one input mapping to it
a function can be proven to be bijective by proving it is both injective and surjective
Analytic Function
see derivative
definition an analytic function is a function that is locally given by a convergent ‹series power ‹series --- Wikipedia
properties
a analytic ‹function is infinitely differentiable, but an infinitely differentiable function is not necessarily analytic --- https://youtu.be/X0razs3zR94?t=598
analytic continuation of a analytic ‹function is uniquely determined --- https://youtu.be/YuIIjLr6vUA?t=1746
Partial Function
Total Function
--- https://wiki.haskell.org/Partial_functions
--- https://www.parsonsmatt.org/2017/10/11/type_safety_back_and_forth.html by Matt Parson
definition a partial function maps a sub‹set of its function › domin to some element of its function › codomain
definition a total function maps every element of its function › domain to some element of its function › codomain
in computer science and functional programming, total functions are functions that don't "lie" in their type signature. a total function never panic!s, never throw exceptions, and always terminates
example
fn reciprocal(x: f64) -> f64 { 1 / x }the function has type
fn(f64) -> f64, yetf(0.0)is undefined. you could add anifcheck and throw an exception, but the type signature would still be a lie. in functional programming, one should prefer either: