Close
Close window
depends - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.
Maplesoft logo
Maplesoft logo

Online Help

All Products Maple MapleSim


[フレーム] [フレーム]

depends

check for mathematical dependence

Calling Sequence

depends(f, x)

Parameters

f

-

expression, or list or set of expressions

x

-

name, or list or set of names

Description

The function depends returns true if any of the expressions contained in f are mathematically dependent on any of the names contained in x.

The expression f is mathematically dependent on the name x if x is not a constant and not undefined, and if f contains at least one instance of x which is not simply a dummy variable. Examples of dummy variables are index variables in sums, products, integrals, and limits. Dummy variables also appear in integral transforms.

If f is a complicated expression, then depends may not be able to determine that it is independent of x. In such cases, f should simplified before depends is called.

There is a facility for the user to add additional functions to depends. If the function depends/myfunc is defined, then depends will use this function to check for dependence whenever it encounters myfunc. The function depends/myfunc should accept as its parameters the arguments that myfunc expects in the same order, followed by a final parameter which will be a set containing all the names that dependence is being checked against. Note that myfunc may be either a user-defined function or a standard library function.

Unrelated to the above, there is also a procedure parameter modifier, depends , that can be used in declaration to indicate that a parameter's type depends on the value of another parameter.

Examples

>

dependssinx+cosz,x,y

true

(1)
>

dependssinx+cosz,x,z

true

(2)
>

dependsintfx,x=a..b,x

false

(3)
>

dependsintfx,x=a..b,a

true

(4)
>

dependslimit1x,x=0,x

false

(5)
>

dependssum1x,x=1..n,x

false

(6)
>

dependssum1x,x=1..n,n

true

(7)
>

dependsinttrans:-laplaceft,t,s,t

false

(8)

In some cases f must be simplified before depends is called to get the correct answer.

>

dependssinx2+cosx2,x

true

(9)
>

dependssimplifysinx2+cosx2,trig,x

false

(10)


Download Help Document

AltStyle によって変換されたページ (->オリジナル) /