# FunctionSign

FunctionSign[f,{x1,x2,}]

finds the real sign of the function f with variables x1,x2, over the reals.

FunctionSign[f,{x1,x2,},dom]

finds the real sign with variables restricted to the domain dom.

FunctionSign[{f,cons},{x1,x2,},dom]

gives the sign when variables are restricted by the constraints cons.

# Details and Options  • Function sign is also known as positive, non-negative, negative, non-positive, strictly positive and strictly negative.
• By default, the following definitions are used:
• +1 non-negative, i.e. for all  0 identically zero, i.e. for all  -1 non-positive, i.e. for all  Indeterminate neither non-negative nor non-positive
• The zero function is both non-negative and non-positive.
• With the setting , the following definitions are used:
• +1 positive, i.e. for all  -1 negative, i.e. for all  Indeterminate neither positive nor negative
• Possible values for dom include: Reals, Integers, PositiveReals, PositiveIntegers, etc. The default is Reals.
• The function f should be a real-valued function for all xi in the domain dom that satisfy the constraints cons.
• cons can contain equations, inequalities or logical combinations of these.
• The following options can be given:
•  Assumptions \$Assumptions assumptions on parameters GenerateConditions True whether to generate conditions on parameters PerformanceGoal \$PerformanceGoal whether to prioritize speed or quality StrictInequalities False whether to require a strict sign
• 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 allclose all

## Basic Examples(3)

Find the sign of a function:

Find the sign of a function with variables restricted by constraints:

Find the sign of a function over the integers:

## Scope(7)

Univariate functions:

A function that is not real valued has an Indeterminate sign:

The function is real valued and non-negative for positive :

Univariate functions with constraints on the variable:

The strict sign of a function: is non-negative, but not strictly positive:

Multivariate functions:

Multivariate functions with constraints on variables:

Functions with symbolic parameters:

## Options(5)

### Assumptions(1)

FunctionSign gives a conditional answer here:

With these assumptions, the function has the opposite sign:

### GenerateConditions(2)

By default, FunctionSign may generate conditions on symbolic parameters:

With , FunctionSign fails instead of giving a conditional result:

This returns a conditionally valid result without stating the condition:

By default, all conditions are reported:

With , conditions that are generically true are not reported:

### PerformanceGoal(1)

Use PerformanceGoal to avoid potentially expensive computations:

The default setting uses all available techniques to try to produce a result:

### StrictInequalities(1)

By default, FunctionSign computes the non-strict sign:

With , FunctionSign computes the strict sign: is non-negative, but not strictly positive. is strictly positive:

## Applications(14)

### Basic Applications(3)

Check the sign of :

The graph of lies in the upper half-plane:

Check the sign of :

The graph of lies in the lower half-plane:

Check the sign of :

The graph of is not contained in either the upper or the lower half-plane:

Show that restricted to is non-negative:

The sum of functions with sign has sign :

The sign of the product of functions is the product of signs:

### Calculus(6)

The derivative of a non-decreasing function is non-negative:

If is non-negative, then , for , is non-negative:

A sequence is non-decreasing iff its differences are non-negative:

Sums of non-negative sequences are non-decreasing:

Check the convergence of a non-negative series using d'Alembert's criterion:

Check non-negativity of :

Test whether the limit of is less than :

Prove that the integral is divergent:

Show that :

Show that is non-negative:

Show that the integral of is divergent: ### Probability & Statistics(3)

PDF is always non-negative:

CDF is always non-negative:

SurvivalFunction is always non-negative:

### Geometry(2)

RegionDistance is always non-negative:

Integral of a non-negative function over a region is non-negative:

## Properties & Relations(2)

The sum and product of non-negative functions are non-negative:

A continuous anti-derivative of a non-negative function is non-decreasing:

Use Integrate to compute an anti-derivative:

Use FunctionContinuous to check that the anti-derivative is continuous:

Use FunctionMonotonicity to verify that the anti-derivative is non-decreasing:

Plot the function and the anti-derivative:

## Possible Issues(1)

A function must be defined everywhere to have a fixed sign: