Tango
Documentation for Tango.
Tango.get_tangent
— Functionget_tangent(f,x_0,ϵ=1e-7)
Returns a function that represents the tangent line to the function f
at x_0
.
Tango.numderiv
— Functionnumderiv(f,x::Float64,ϵ=1e-7::Float64)
Compute the numerical derivative of a function f
at x
using a step size ϵ
. The default value of ϵ
is 1e-7
.
''f'(x) = \frac{f(x_0+\epsilon)-f(x)}{\epsilon}''
Examples
```julia-repl
julia> f(x) = x^2
julia> numderiv(f,2.0)
4.000000330961484
Tango.plot_tangent
— Functionplot_tangent(f,x_0,ϵ=1e-7)
Plots the function f
and its tangent line at x_0
.