FunctionContinuous[f,x]
tests whether
is a real-valued continuous function for x∈Reals.
FunctionContinuous[f,x,dom]
tests whether
is a continuous function for x∈dom.
FunctionContinuous[{f1,f2,…},{x1,x2,…},dom]
tests whether
are continuous functions for x1,x2,…∈dom.
FunctionContinuous[{funs,cons},xvars,dom]
tests whether
are continuous functions for xvars∈dom restricted by the constraints cons.
FunctionContinuous
FunctionContinuous[f,x]
tests whether
is a real-valued continuous function for x∈Reals.
FunctionContinuous[f,x,dom]
tests whether
is a continuous function for x∈dom.
FunctionContinuous[{f1,f2,…},{x1,x2,…},dom]
tests whether
are continuous functions for x1,x2,…∈dom.
FunctionContinuous[{funs,cons},xvars,dom]
tests whether
are continuous functions for xvars∈dom restricted by the constraints cons.
Details and Options
- A function
is continuous in a set
if for all
and for all
there is a
such that for all
,
implies
. - A function
is continuous in a set
if for all
and for all
there is a
such that for all
,
implies
. - If funs contains parameters other than xvars, the result is typically a ConditionalExpression.
- Possible values for dom are Reals and Complexes. The default is Reals.
- If dom is Reals, then all variables, parameters, constants and function values are restricted to be real.
- cons can contain equations, inequalities or logical combinations of these.
- The functions funs need to be defined for all values that satisfy the constraints cons.
- The following options can be given:
-
Assumptions $Assumptions assumptions on parameters GenerateConditions True whether to generate conditions on parameters PerformanceGoal $PerformanceGoal whether prioritize speed or quality - Possible settings for GenerateConditions include:
-
Automatic nongeneric conditions only True all conditions False no conditions None return unevaluated if conditions are needed - Possible settings for PerformanceGoal are "Speed" and "Quality".
Examples
open all close allBasic Examples (4)
Test continuity of real functions:
FunctionContinuous[Sin[x], x]Test continuity of complex functions:
FunctionContinuous[Sqrt[x], x, Complexes]Test continuity over restricted domains:
FunctionContinuous[{Log[x], x > 0}, x]Test continuity of multivariate functions:
FunctionContinuous[Gamma[x ^ 2 + y ^ 2 + 1, E ^ (x y)], {x, y}]Scope (6)
FunctionContinuous[Tanh[x], x]FunctionContinuous[Floor[x], x]Plot[{Tanh[x], Floor[x]}, {x, -3, 3}]FunctionContinuous[Exp[z], z, Complexes]FunctionContinuous[Log[z], z, Complexes]GraphicsRow[ComplexPlot[#, {z, -2 - 2I, 2 + 2I}]& /@ {Exp[z], Log[z]}, ImageSize -> Medium]Functions with restricted domains:
FunctionContinuous[{Tan[x], -Pi / 2 < x < Pi / 2}, x]FunctionContinuous[{Log[z], Im[z] ≠ 0}, z]FunctionContinuous[Erf[Sin[x + y] / (x ^ 2 + y ^ 2 + 1)], {x, y}]FunctionContinuous[Erf[Sin[x + y] / (x ^ 2 + y ^ 2 - 1)], {x, y}]GraphicsRow[Plot3D[Erf[Sin[x + y] / (x ^ 2 + y ^ 2 + #)], {x, -2, 2}, {y, -2, 2}]& /@ {1, -1}, ImageSize -> Medium]Complex multivariate functions:
FunctionContinuous[LaguerreL[E ^ (x + z), Sin[y z]], {x, y, z}, Complexes]FunctionContinuous[Erf[Sin[x + y] / (x ^ 2 + y ^ 2 + 1)], {x, y}, Complexes]FunctionContinuous[{Erf[Sin[x + y] / (x ^ 2 + y ^ 2 + 1)], x ^ 2 + y ^ 2 ≠ -1}, {x, y}, Complexes]Functions with symbolic parameters:
FunctionContinuous[Gamma[x ^ 2 + a], x]FunctionContinuous[Sin[x y] / (x ^ 2 + a x y + y ^ 2 + b), {x, y}]Options (4)
Assumptions (1)
FunctionContinuous cannot find the answer for arbitrary values of the parameter
:
FunctionContinuous[Sin[x + y] / (Exp[x y] + a), {x, y}]With the assumption that
, FunctionContinuous succeeds:
FunctionContinuous[Sin[x + y] / (Exp[x y] + a), {x, y}, Assumptions -> a > 0]GenerateConditions (2)
By default, FunctionContinuous may generate conditions on symbolic parameters:
FunctionContinuous[Log[x ^ 2 + a], x]With GenerateConditionsNone, FunctionContinuous fails instead of giving a conditional result:
FunctionContinuous[Log[x ^ 2 + a], x, GenerateConditions -> None]This returns a conditionally valid result without stating the condition:
FunctionContinuous[Log[x ^ 2 + a], x, GenerateConditions -> False]By default, all conditions are reported:
FunctionContinuous[Cos[x y] / a, {x, y}]With GenerateConditionsAutomatic, conditions that are generically true are not reported:
FunctionContinuous[Cos[x y] / a, {x, y}, GenerateConditions -> Automatic]PerformanceGoal (1)
Use PerformanceGoal to avoid potentially expensive computations:
FunctionContinuous[1 / (x ^ 4 + a x ^ 3 y + b x y ^ 3 + y ^ 4 + c), {x, y}, PerformanceGoal -> "Speed"]The default setting uses all available techniques to try to produce a result:
FunctionContinuous[1 / (x ^ 4 + a x ^ 3 y + b x y ^ 3 + y ^ 4 + c), {x, y}]Applications (14)
Classes of Continuous Functions (6)
{FunctionContinuous[x, x], FunctionContinuous[x^2 + 1, x], FunctionContinuous[x^3 - 2 x^2 - 5 x + 6, x]}Sin, Cos and Exp are continuous:
{FunctionContinuous[Sin[x], x], FunctionContinuous[Cos[x], x], FunctionContinuous[Exp[x], x]}Grid[Partition[Table[Plot[f, {x, -5, 5}], {f, {x, x^2 + 1, x^3 - 2 x^2 - 5 x + 6, Sin[x], Cos[x], Exp[x]}}], 3]]These functions are continuous in the complex plane as well:
Table[FunctionContinuous[f, x, Complexes], {f, {x, x^2 + 1, x^3 - 2 x^2 - 5 x + 6, Sin[x], Cos[x], Exp[x]}}]Visualize these functions over
:
Grid[Partition[Table[ComplexPlot3D[f, {x, 5}], {f, {x, x^2 + 1, x^3 - 2 x^2 - 5 x + 6, Sin[x], Cos[x], Exp[x]}}], 3]]The reciprocal of a continuous function
is continuous wherever
:
FunctionContinuous[{(1/x), x ≠ 0}, x]Thus, rational functions may or may not be continuous over the reals:
FunctionContinuous[(4/x^2 + 4), x]FunctionContinuous[(1/x^2 - 4), x]Plot[{(4/x^2 + 4), (1/x^2 - 4)}, {x, -4, 4}, PlotTheme -> {"DashedLines", "Detailed"}]However, as every nonconstant polynomial has a root in the plane, rational functions are never continuous on
:
FunctionContinuous[(4/x^2 + 4), x, Complexes]Visualizing the function in the complex plane shows the blowup at
:
ComplexPlot3D[(4/x^2 + 4), {x, 4}]As Cot and Csc are rational functions of Sin and Cos, they are continuous when sine is nonzero:
{FunctionContinuous[{Cot[x], (x/π)∉ℤ}, x], FunctionContinuous[{Csc[x], (x/π)∉ℤ}, x]}Visualize the functions along with sine:
Plot[{Cot[x], Csc[x], Sin[x]}, {x, -3π, 3π}, PlotLegends -> "Expressions", PlotTheme -> "DashedLines"]Similarly, Tan and Sec are continuous when cosine is nonzero:
{FunctionContinuous[{Tan[x], (x/π) - (1/2)∉ℤ}, x], FunctionContinuous[{Sec[x], (x/π) - (1/2)∉ℤ}, x]}Plot[{Tan[x], Sec[x], Cos[x]}, {x, -3π, 3π}, PlotLegends -> "Expressions", PlotTheme -> "DashedLines"]This same principle applies to the hyperbolic trigonometric functions Coth and Csch:
{FunctionContinuous[{Coth[x], x ≠ 0}, x], FunctionContinuous[{Csch[x], x ≠ 0}, x]}Visualize the functions along with Sinh:
Plot[{Coth[x], Csch[x], Sinh[x]}, {x, -3, 3}, PlotLegends -> "Expressions", PlotTheme -> "DashedLines"]As Cosh is never zero, the remaining two functions, Tanh and Sech, are continuous:
Reduce[Cosh[x] == 0, x, Reals]{FunctionContinuous[Tanh[x], x], FunctionContinuous[Sech[x], x]}The compositions of continuous functions are continuous:
FunctionContinuous[Sin[x ^ 2 + 3x + 2], x]FunctionContinuous[Exp[Sin[x]], x]FunctionContinuous[Cos[Sin[x]]^2 + Sin[x]Cos[x] + Exp[-x], x]A composition of a discontinuous function
and a continuous function
will be continuous as long as
maps the domain into a continuous subdomain of
. Let, for example,
be Sqrt. Sqrt is discontinuous on the reals:
FunctionContinuous[Sqrt[x], x]However, it is continuous on
:
FunctionContinuous[{Sqrt[x], x > 0}, x]Exp maps
:
FunctionRange[E^x, x, y]Thus, the composition of Sqrt with Exp is continuous on
:
FunctionContinuous[Sqrt[E^x], x]FunctionContinuous[x ^ (3 / 2), x]Multivariate polynomials are continuous over the reals and complexes:
{FunctionContinuous[x ^ 2 + 3x y - 7y ^ 2, {x, y}], FunctionContinuous[x ^ 2 + 3x y - 7y ^ 2, {x, y}, ℂ]}Rational multivariate functions may or may not be continuous over the reals:
{FunctionContinuous[(x^2 - y^2/x^2 + y^2 + 1), {x, y}], FunctionContinuous[(x^2 - y^2 + 1/x^2 - y), {x, y}]}They are always discontinuous over the complexes:
FunctionContinuous[(x^2 - y^2/x^2 + y^2 + 1), {x, y}, ℂ]Sometimes a discontinuous rational function can be extended to a continuous one:
f[x_, y_] := ( -6 + 8 x - 2 x^2 + 5 y - 6 x y + x^2 y - y^2 + x y^2/5 - 2 x + x^2 - 4 y + y^2)
g[x_, y_] := Piecewise[{{0, x == 1 && y == 2}, {f[x, y], True}}]{FunctionContinuous[f[x, y], {x, y}], FunctionContinuous[g[x, y], {x, y}]}By composing with continuous univariate functions, many more continuous functions can be generated:
{FunctionContinuous[ArcTan[x ^ 2 + 3x y - 7y ^ 2], {x, y}], FunctionContinuous[Cos[(x^2 - y^2/x^2 + y^2 + 1)], {x, y}], FunctionContinuous[Sin[(x^2 - y^2/Exp[x^2 - y])], {x, y}]}Visualize the continuous functions:
Grid[Partition[Table[Plot3D[f, {x, -5, 5}, {y, -5, 5}, PlotRange -> All, Exclusions -> None, ImageSize -> 165], {f, {x ^ 2 + 3x y + 7y ^ 2, (x^2 - y^2/x^2 + y^2 + 1), g[x, y], ArcTan[x ^ 2 + 3x y - 7y ^ 2], Cos[(x^2 - y^2/x^2 + y^2 + 1)], Sin[(x^2 - y^2 + 1/Exp[x^2 - y])]}}], 3]]Calculus (5)
For continuous functions, limits can be computed by substitution:
{FunctionContinuous[Cosh[x], x], Underscript[, x -> 0]Cosh[x], Cosh[0]}{FunctionContinuous[ArcTan[x], x], Underscript[, x -> 1]ArcTan[x], ArcTan[1]}{FunctionContinuous[BesselJ[1, x], x], Underscript[, x -> 1]BesselJ[1, 0], BesselJ[1, 0]}The functions
and
agree on the real line except at zero:
Reduce[(Sin[x]/x) == Sinc[x], x, Reals]Sinc is continuous:
FunctionContinuous[Sinc[x], x]{Sinc[0], Underscript[, x -> 0]Sinc[x]}The function
is not continuous:
FunctionContinuous[(Sin[x]/x), x]In particular, it is discontinuous at the origin, so its limit there cannot be computed by substitution:
FunctionDiscontinuities[(Sin[x]/x), x]Since the two functions are equal for
, they have the same limit there:
Underscript[, x -> 0](Sin[x]/x) == Underscript[, x -> 0]Sinc[x]The following function is discontinuous:
f[x_] := Exp[-(1/x^2)]FunctionContinuous[f[x], x]Its only discontinuity is at the origin:
FunctionDiscontinuities[f[x], x]The discontinuity results from
being undefined there:
f[0]Limit[f[x], x -> 0]Define
as an extension of
to the origin:
g[x_] := Piecewise[{{f[x], x != 0}, {0, x == 0}}]This extension is a continuous function:
FunctionContinuous[g[x], x]Plot[g[x], {x, -10, 10}, PlotRange -> All]h[x_] := Piecewise[{{x*Sin[1/x], x != 0}, {0, x == 0}}]FunctionContinuous[h[x], x]However, its first derivative is not continuous:
FunctionContinuous[h'[x], x]FunctionAnalytic[h[x], x]While
goes smoothly to zero, its derivative oscillates wildly at the origin:
{MinLimit[h'[x], x -> 0], MaxLimit[h'[x], x -> 0]}Visualize
and its first derivative:
Plot[{h[x], h'[x]}, {x, -1, 1}, PlotRange -> {-4, 4}, PlotTheme -> "DashedLines"]The definite integral of a bounded function
is continuous, even if
is discontinuous. Consider the following
:
f[x_] := Piecewise[{{-x + 1, x < 0}, {x, 0 < x < 1}, {x ^ 2, True}}]FunctionContinuous[f[x], x]Define
to be its definite integral from the origin to an arbitrary real value:
g[x_] = Integrate[f[t], {t, 0, x}, Assumptions -> x∈Reals];FunctionContinuous[g[x], x]Visualize the function and its integral:
Plot[{f[x], g[x]}, {x, -2, 2}, PlotTheme -> {"Detailed", "DashedLines"}]Probability (3)
The CDF of a continuous probability distribution is continuous:
cdf1 = CDF[NormalDistribution[], x];
cdf2 = CDF[BetaDistribution[3, 1], x];
cdf3 = CDF[BinormalDistribution[0], {x, y}];{FunctionContinuous[cdf1, x], FunctionContinuous[cdf2, x], FunctionContinuous[cdf3, {x, y}]}Grid[{{Plot[cdf1, {x, -5, 5}], Plot[cdf2, {x, -5, 5}], Plot3D[cdf3, {x, -5, 5}, {y, -5, 5}]}}]The CDF of a discrete distribution is discontinuous:
cdfs = {CDF[PoissonDistribution[1], n], CDF[BernoulliDistribution[(1/2)], n], CDF[GeometricDistribution[1 / 2], n]};Table[FunctionContinuous[cdf, n], {cdf, cdfs}]These distributions have piecewise-constant cumulative distribution functions:
Table[Plot[cdf, {n, -5, 5}, ExclusionsStyle -> Dashed], {cdf, cdfs}]The CDF of a mixed distribution is discontinuous:
cdf1 = CDF[CensoredDistribution[{-1, 2}, CauchyDistribution[0, 1]], x];
cdf2 = CDF[CensoredDistribution[{-1, 1}, NormalDistribution[]], x];
cdf3 = CDF[CensoredDistribution[{{-∞, 1 / 2}, {1 / 3, 3 / 5}}, BinormalDistribution[0]], {x, y}];{FunctionContinuous[cdf1, x], FunctionContinuous[cdf2, x], FunctionContinuous[cdf3, {x, y}]}These distributions have piecewise, but nonconstant, cumulative distribution functions:
Grid[{{Plot[cdf1, {x, -5, 5}, ExclusionsStyle -> ColorData[106][2]], Plot[cdf2, {x, -5, 5}, ExclusionsStyle -> ColorData[106][2]], Plot3D[cdf3, {x, -5, 5}, {y, -5, 5}]}}]Properties & Relations (3)
At each point of the domain, the limit of a continuous function is equal to its value:
f = Sin[2 ^ x] ^ 2 + x / 3;FunctionContinuous[f, x]Use Limit to compute limits:
Limit[f, x -> 1] == (f /. x -> 1)A function continuous in an interval attains each value between its minimum and maximum:
f = Log[Cos[3x E ^ x] ^ 2 + 2x];FunctionContinuous[{f, 0 ≤ x ≤ 1}, x]Use Minimize and Maximize to find minima and maxima:
{min, pmin} = Minimize[{f, 0 ≤ x ≤ 1}, x]{max, pmax} = Maximize[{f, 0 ≤ x ≤ 1}, x]Check that
is between the minimum and the maximum:
min < 1 / 2 < maxUse Solve to find the points where
attains the value
:
sols = Solve[f == 1 / 2 && 0 ≤ x ≤ 1, x]Plot[{f, 1 / 2}, {x, 0, 1}, Rule[...]]Use FunctionAnalytic to check whether a function is analytic:
f = 2 ^ Sin[x ^ 2 + 7] - x;FunctionAnalytic[f, x]Analytic functions are continuous:
FunctionContinuous[f, x]Continuous functions may not be analytic:
FunctionContinuous[Abs[x], x]FunctionAnalytic[Abs[x], x]Possible Issues (2)
A function needs to be defined everywhere to be continuous:
FunctionContinuous[Sin[x] / x, x]FunctionContinuous[{Sin[x] / x, x ≠ 0}, x]FunctionContinuous[Sinc[x], x]A function needs to be real valued to be continuous over the real domain:
FunctionContinuous[Sqrt[x], x]FunctionContinuous[{Sqrt[x], x ≥ 0}, x]See Also
FunctionDiscontinuities FunctionSingularities Limit Piecewise FunctionAnalytic FunctionMeromorphic
Function Repository: FunctionDifferentiability
Related Guides
History
Text
Wolfram Research (2020), FunctionContinuous, Wolfram Language function, https://reference.wolfram.com/language/ref/FunctionContinuous.html.
CMS
Wolfram Language. 2020. "FunctionContinuous." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/FunctionContinuous.html.
APA
Wolfram Language. (2020). FunctionContinuous. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FunctionContinuous.html
BibTeX
@misc{reference.wolfram_2026_functioncontinuous, author="Wolfram Research", title="{FunctionContinuous}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/FunctionContinuous.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_functioncontinuous, organization={Wolfram Research}, title={FunctionContinuous}, year={2020}, url={https://reference.wolfram.com/language/ref/FunctionContinuous.html}, note=[Accessed: 13-June-2026]}