({{, (RefLink[LogisticSigmoid, paclet:ref/LogisticSigmoid])[z] 
gives the logistic sigmoid function.}})

OpenersNotesSection(Spacer1)Details

Mathematical function, suitable for both symbolic and numeric manipulation.

In (RefLink[TraditionalForm, paclet:ref/TraditionalForm]), the logistic sigmoid function is sometimes denoted as σ(z).

The logistic function σ(z)==1/(1+exp(-z)) is a solution to the differential equation y'==y (1-y).

(RefLink[LogisticSigmoid, paclet:ref/LogisticSigmoid])[z] has no branch cut discontinuities.

(RefLink[LogisticSigmoid, paclet:ref/LogisticSigmoid]) can be evaluated to arbitrary numerical precision.

(RefLink[LogisticSigmoid, paclet:ref/LogisticSigmoid]) automatically threads over lists.

OpenersPrimaryExamplesSection(Spacer1)Examples  (25)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Plot[LogisticSigmoid[x],{x,-4,4}]

LogisticSigmoid[x]//FunctionExpand

OpenersExampleSection1(Spacer1)Scope  (24)

OpenersExampleSubsection0(Spacer1)Numerical Evaluation  (4)

Evaluate numerically:

N[LogisticSigmoid[57]]

LogisticSigmoid[.8]

Evaluate to high precision:

N[LogisticSigmoid[1/9],50]

The precision of the output tracks the precision of the input:

LogisticSigmoid[1.0000000000000000000000]

Complex number input:

N[LogisticSigmoid[1+9 I]]

Evaluate efficiently at high precision:

LogisticSigmoid[2/7`100]//Timing

LogisticSigmoid[5/11`100000];//Timing

OpenersExampleSubsection1(Spacer1)Specific Values   (3)

The value of (RefLink[LogisticSigmoid, paclet:ref/LogisticSigmoid]) at 2 π(RefLink[I, paclet:ref/I]) n for integer n is 1/2:

Table[LogisticSigmoid[2 I π n],{n,-1,3}]

Values at infinity:

LogisticSigmoid[{Infinity,-Infinity}]//Quiet

Find a value of x for which (RefLink[LogisticSigmoid, paclet:ref/LogisticSigmoid])[x]=0.8:

xval=x/.Solve[LogisticSigmoid[x]== 0.8&&-1<x<5,x][[1]]//Quiet

Plot[LogisticSigmoid[x],{x,-5,5},Epilog->{PointSize[Large],Red,Point[{xval,LogisticSigmoid[xval]}]}]

OpenersExampleSubsection2(Spacer1)Visualization  (3)

Plot the (RefLink[LogisticSigmoid, paclet:ref/LogisticSigmoid])[x] function:

Plot[LogisticSigmoid[x],{x,0,4}]

Plot the real part of (LogisticSigmoid[x+i y]):

ContourPlot[Re[LogisticSigmoid[x+I y]],{x,-5,5},{y,-5,5},Contours->24]

Plot the imaginary part of (LogisticSigmoid[x+i y]):

ContourPlot[Im[LogisticSigmoid[x+I y]],{x,-5,5},{y,-5,5},Contours->24]

Polar plot with (LogisticSigmoid[ϕ]):

PolarPlot[LogisticSigmoid[ϕ],{ϕ,-2π,8π},Frame->True]

OpenersExampleSubsection3(Spacer1)Function Properties  (5)

(RefLink[LogisticSigmoid, paclet:ref/LogisticSigmoid]) is defined for all real and complex values:

FunctionDomain[LogisticSigmoid[x],x]

FunctionDomain[LogisticSigmoid[z],z,Complexes]

The function range of (RefLink[LogisticSigmoid, paclet:ref/LogisticSigmoid]):

FunctionRange[LogisticSigmoid[x],x,y]

The range for complex values:

FunctionRange[LogisticSigmoid[z],z,y,Complexes]

(RefLink[LogisticSigmoid, paclet:ref/LogisticSigmoid]) has the mirror property (LogisticSigmoid[z*])=(LogisticSigmoid[z])*:

FullSimplify[LogisticSigmoid[Conjugate[z]]==Conjugate[LogisticSigmoid[z]]]

(RefLink[LogisticSigmoid, paclet:ref/LogisticSigmoid]) threads elementwise over lists:

LogisticSigmoid[{-0.2,0.1,0.3}]

(RefLink[TraditionalForm, paclet:ref/TraditionalForm]) formatting:

LogisticSigmoid[z]//TraditionalForm

OpenersExampleSubsection4(Spacer1)Differentiation  (3)

First derivative with respect to z:

D[LogisticSigmoid[z],z]

Higher derivatives with respect to z:

Table[D[LogisticSigmoid[z],{z,k}],{k,1,3}]//FullSimplify

Plot the higher derivatives with respect to z:

Plot[%,{z,-5,5},PlotLegends->{"First Derivative","Second Derivative","Third Derivative"}]

Formula for the k(^th) derivative with respect to z:

D[LogisticSigmoid[z],{z,k}]// FullSimplify

OpenersExampleSubsection5(Spacer1)Integration  (3)

Compute the indefinite integral using (RefLink[Integrate, paclet:ref/Integrate]):

Integrate[LogisticSigmoid[x],x]

Verify the anti-derivative:

FullSimplify[D[%,x]]

Definite integral:

Integrate[LogisticSigmoid[x],{x,0,5}]

More integrals:

Integrate[Exp[-x] LogisticSigmoid[x],x]//FullSimplify

Integrate[ x LogisticSigmoid[(x^2)],{x,0,3}]//FullSimplify

OpenersExampleSubsection6(Spacer1)Series Expansions  (3)

Find the Taylor expansion using (RefLink[Series, paclet:ref/Series]):

Series[LogisticSigmoid[x],{x,0,7}]

Plots of the first three approximations around x=0:

terms=Normal@Table[Series[LogisticSigmoid[x],{x,0,m}],{m,1,5,2}];
Plot[{LogisticSigmoid[x],terms},{x,-10,10},PlotLegends->"Expressions"]

Find the series expansion at (RefLink[Infinity, paclet:ref/Infinity]):

Series[LogisticSigmoid[x],{x,Infinity,1}]

Taylor expansion at a generic point:

Series[LogisticSigmoid[x],{x,x0,2}]//Normal// FullSimplify

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[Exp, paclet:ref/Exp])  ▪  (RefLink[LogisticDistribution, paclet:ref/LogisticDistribution])  ▪  (RefLink[UnitStep, paclet:ref/UnitStep])  ▪  (RefLink[HeavisideTheta, paclet:ref/HeavisideTheta])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Numerical Functions, paclet:guide/NumericalFunctions])}, {▪(RefLinkPlain[Machine Learning, paclet:guide/MachineLearning])}, {▪(RefLinkPlain[Neural Networks, paclet:guide/NeuralNetworks])}})}})