Calculus
D[f,x] | partial derivative |
D[f,x,y,…] | multiple derivative |
D[f,{x,n}] | n th derivative |
D[f,x,NonConstants->{v1,v2,…}] | with the vi taken to depend on x |
Copy to clipboard.
In[1]:= 1
✖
https://wolfram.com/xid/0bqfw6r6-hat
Direct link to example
Out[1]= 1
Copy to clipboard.
In[2]:= 2
✖
https://wolfram.com/xid/0bqfw6r6-u0b
Direct link to example
Out[2]= 2
You can differentiate with respect to any expression that does not involve explicit mathematical operations:
Copy to clipboard.
In[3]:= 3
✖
https://wolfram.com/xid/0bqfw6r6-gu
Direct link to example
Out[3]= 3
Copy to clipboard.
In[4]:= 4
✖
https://wolfram.com/xid/0bqfw6r6-ydo
Direct link to example
Out[4]= 4
If y does in fact depend on x, you can use the explicit functional form y[x]. "The Representation of Derivatives" describes how objects like y'[x] work:
Copy to clipboard.
In[5]:= 5
✖
https://wolfram.com/xid/0bqfw6r6-r59
Direct link to example
Out[5]= 5
Instead of giving an explicit function y[x], you can tell D that y implicitly depends on x. D[y,x,NonConstants->{y}] then represents , with y implicitly depending on x:
Copy to clipboard.
In[6]:= 6
✖
https://wolfram.com/xid/0bqfw6r6-mpf
Direct link to example
Out[6]= 6
D[f,{{x1,x2,…}}] | the gradient of a scalar function |
D[f,{{x1,x2,…},2}] | the Hessian matrix for f |
D[f,{{x1,x2,…},n}] | the n th-order Taylor series coefficient |
D[{f1,f2,…},{{x1,x2,…}}] | the Jacobian for a vector function f |
Copy to clipboard.
In[7]:= 7
✖
https://wolfram.com/xid/0bqfw6r6-jzo
Direct link to example
Out[7]= 7
Copy to clipboard.
In[8]:= 8
✖
https://wolfram.com/xid/0bqfw6r6-k62
Direct link to example
Out[8]= 8
Copy to clipboard.
In[9]:= 9
✖
https://wolfram.com/xid/0bqfw6r6-b57
Direct link to example
Out[9]= 9
Dt[f] | total differential df |
Dt[f,x] | total derivative |
Dt[f,x,y,…] | multiple total derivative … f |
Dt[f,x,Constants->{c1,c2,…}] | total derivative with ci constant (i.e. dci=0) |
y/:Dt[y,x]=0 | set =0 |
SetAttributes[c,Constant] | define c to be a constant in all cases |
When you find the derivative of some expression with respect to , you are effectively finding out how fast changes as you vary . Often will depend not only on , but also on other variables, say and . The results that you get then depend on how you assume that and vary as you change .
There are two common cases. Either and are assumed to stay fixed when changes, or they are allowed to vary with . In a standard partial derivative , all variables other than are assumed fixed. On the other hand, in the total derivative , all variables are allowed to change with .
In the Wolfram System, D[f,x] gives a partial derivative, with all other variables assumed independent of x. Dt[f,x] gives a total derivative, in which all variables are assumed to depend on x. In both cases, you can add an argument to give more information on dependencies.
Copy to clipboard.
In[1]:= 1
✖
https://wolfram.com/xid/0bqfw6r6-kll
Direct link to example
Out[1]= 1
Copy to clipboard.
In[2]:= 2
✖
https://wolfram.com/xid/0bqfw6r6-n5l
Direct link to example
Out[2]= 2
Copy to clipboard.
In[3]:= 3
✖
https://wolfram.com/xid/0bqfw6r6-s8n
Direct link to example
Out[3]= 3
You can also make an explicit definition for . You need to use y/: to make sure that the definition is associated with y:
Copy to clipboard.
In[4]:= 4
✖
https://wolfram.com/xid/0bqfw6r6-vna
Direct link to example
Out[4]= 4
Copy to clipboard.
In[5]:= 5
✖
https://wolfram.com/xid/0bqfw6r6-ys4
Direct link to example
Out[5]= 5
Copy to clipboard.
In[6]:= 6
✖
https://wolfram.com/xid/0bqfw6r6-md3
Direct link to example
Copy to clipboard.
In[7]:= 7
✖
https://wolfram.com/xid/0bqfw6r6-x3s
Direct link to example
Out[7]= 7
Copy to clipboard.
In[8]:= 8
✖
https://wolfram.com/xid/0bqfw6r6-k8m
Direct link to example
Copy to clipboard.
In[9]:= 9
✖
https://wolfram.com/xid/0bqfw6r6-poz
Direct link to example
Out[9]= 9
Copy to clipboard.
In[10]:= 10
✖
https://wolfram.com/xid/0bqfw6r6-mn5
Direct link to example
Out[10]= 10
Copy to clipboard.
In[11]:= 11
✖
https://wolfram.com/xid/0bqfw6r6-lzs
Direct link to example
Out[11]= 11
Copy to clipboard.
In[12]:= 12
✖
https://wolfram.com/xid/0bqfw6r6-tc7
Direct link to example
Out[12]= 12
Copy to clipboard.
In[1]:= 1
✖
https://wolfram.com/xid/0bqfw6r6-v8c
Direct link to example
Out[1]= 1
Copy to clipboard.
In[2]:= 2
✖
https://wolfram.com/xid/0bqfw6r6-t54
Direct link to example
Out[2]= 2
The Wolfram Language applies the chain rule for differentiation, and leaves the result in terms of f':
Copy to clipboard.
In[3]:= 3
✖
https://wolfram.com/xid/0bqfw6r6-bcn
Direct link to example
Out[3]= 3
Copy to clipboard.
In[4]:= 4
✖
https://wolfram.com/xid/0bqfw6r6-b0f
Direct link to example
Out[4]= 4
When a function has more than one argument, superscripts are used to indicate how many times each argument is being differentiated:
Copy to clipboard.
In[5]:= 5
✖
https://wolfram.com/xid/0bqfw6r6-m29
Direct link to example
Out[5]= 5
This represents . The Wolfram Language assumes that the order in which derivatives are taken with respect to different variables is irrelevant:
Copy to clipboard.
In[6]:= 6
✖
https://wolfram.com/xid/0bqfw6r6-jks
Direct link to example
Out[6]= 6
Copy to clipboard.
In[7]:= 7
✖
https://wolfram.com/xid/0bqfw6r6-itg
Direct link to example
Out[7]= 7
f '[x] | first derivative of a function of one variable |
f(n)[x] | n th derivative of a function of one variable |
f(n1,n2,… )[x] | derivative of a function of several variables, ni times with respect to variable i |
Derivatives in the Wolfram System work essentially the same as in standard mathematics. The usual mathematical notation, however, often hides many details. To understand how derivatives are represented in the Wolfram System, you must look at these details.
The standard mathematical notation is really a shorthand for , where is a "dummy variable". Similarly, is a shorthand for . As suggested by the notation , the object can in fact be viewed as a "pure function", to be evaluated with a particular choice of its parameter . You can think of the operation of differentiation as acting on a function , to give a new function, usually called .
With functions of more than one argument, the simple notation based on primes breaks down. You cannot tell, for example, whether stands for or , and for almost any , these will have totally different values. Once again, however, is just a dummy variable, whose sole purpose is to show with respect to which "slot" is to be differentiated.
In the Wolfram System, as in some branches of mathematics, it is convenient to think about a kind of differentiation that acts on functions, rather than expressions. An operation is needed that takes the function , and gives the derivative function . Operations such as this that act on functions, rather than variables, are known in mathematics as operators.
The object f' in the Wolfram System is the result of applying the differentiation operator to the function f. The full form of f' is in fact Derivative[1][f]. Derivative[1] is the Wolfram System differentiation operator.
The arguments in the operator Derivative[n1,n2,…] specify how many times to differentiate with respect to each "slot" of the function on which it acts. By using operators to represent differentiation, the Wolfram System avoids any need to introduce explicit "dummy variables".
Copy to clipboard.
In[1]:= 1
✖
https://wolfram.com/xid/0bqfw6r6-xm4
Direct link to example
Copy to clipboard.
In[2]:= 2
✖
https://wolfram.com/xid/0bqfw6r6-ejl
Direct link to example
Copy to clipboard.
In[3]:= 3
✖
https://wolfram.com/xid/0bqfw6r6-feh
Direct link to example
Copy to clipboard.
In[4]:= 4
✖
https://wolfram.com/xid/0bqfw6r6-j3r
Direct link to example
Out[4]= 4
Copy to clipboard.
In[5]:= 5
✖
https://wolfram.com/xid/0bqfw6r6-dcj
Direct link to example
Here is the second derivative with respect to the variable y, which appears in the second slot of g:
Copy to clipboard.
In[6]:= 6
✖
https://wolfram.com/xid/0bqfw6r6-k15
Direct link to example
Copy to clipboard.
In[7]:= 7
✖
https://wolfram.com/xid/0bqfw6r6-vpo
Direct link to example
Since Derivative only specifies how many times to differentiate with respect to each slot, the order of the derivatives is irrelevant:
Copy to clipboard.
In[8]:= 8
✖
https://wolfram.com/xid/0bqfw6r6-sla
Direct link to example
Here is a more complicated case, in which both arguments of g depend on the differentiation variable:
Copy to clipboard.
In[9]:= 9
✖
https://wolfram.com/xid/0bqfw6r6-xmz
Direct link to example
Out[9]= 9
Copy to clipboard.
In[10]:= 10
✖
https://wolfram.com/xid/0bqfw6r6-tjh
Direct link to example
The object f' behaves essentially like any other function in the Wolfram System. You can evaluate the function with any argument, and you can use standard the Wolfram System /. operations to change the argument. (This would not be possible if explicit dummy variables had been introduced in the course of the differentiation.)
This is the Wolfram System representation of the derivative of a function f, evaluated at the origin:
Copy to clipboard.
In[11]:= 11
✖
https://wolfram.com/xid/0bqfw6r6-ocl
Direct link to example
Copy to clipboard.
In[12]:= 12
✖
https://wolfram.com/xid/0bqfw6r6-zho
Direct link to example
Out[12]= 12
You can evaluate the result at the point by using the standard Wolfram System replacement operation:
Copy to clipboard.
In[13]:= 13
✖
https://wolfram.com/xid/0bqfw6r6-tgi
Direct link to example
Out[13]= 13
There is some slight subtlety when you need to deduce the value of f' based on definitions for objects like f[x_].
Copy to clipboard.
In[14]:= 14
✖
https://wolfram.com/xid/0bqfw6r6-v17
Direct link to example
When you take the derivative of h[x], the Wolfram System first evaluates h[x], then differentiates the result:
Copy to clipboard.
In[15]:= 15
✖
https://wolfram.com/xid/0bqfw6r6-kf9
Direct link to example
Out[15]= 15
Copy to clipboard.
In[16]:= 16
✖
https://wolfram.com/xid/0bqfw6r6-jnp
Direct link to example
Out[16]= 16
Copy to clipboard.
In[17]:= 17
✖
https://wolfram.com/xid/0bqfw6r6-w6m
Direct link to example
Out[17]= 17
The function f' is completely determined by the form of the function f. Definitions for objects like f[x_] do not immediately apply, however, to expressions like f'[x]. The problem is that f'[x] has the full form Derivative[1][f][x], which nowhere contains anything that explicitly matches the pattern f[x_]. In addition, for many purposes it is convenient to have a representation of the function f' itself, without necessarily applying it to any arguments.
What the Wolfram System does is to try and find the explicit form of a pure function which represents the object f'. When the Wolfram System gets an expression like Derivative[1][f], it effectively converts it to the explicit form D[f[#],#]& and then tries to evaluate the derivative. In the explicit form, the Wolfram System can immediately use values that have been defined for objects like f[x_]. If the Wolfram System succeeds in doing the derivative, it returns the explicit pure‐function result. If it does not succeed, it leaves the derivative in the original f' form.
Copy to clipboard.
In[18]:= 18
✖
https://wolfram.com/xid/0bqfw6r6-ii6
Direct link to example
Out[18]= 18
Copy to clipboard.
In[19]:= 19
✖
https://wolfram.com/xid/0bqfw6r6-x3e
Direct link to example
Out[19]= 19
You can define the derivative in the Wolfram Language of a function f of one argument simply by an assignment like f'[x_]=fp[x].
Copy to clipboard.
In[1]:= 1
✖
https://wolfram.com/xid/0bqfw6r6-g6
Direct link to example
Copy to clipboard.
In[2]:= 2
✖
https://wolfram.com/xid/0bqfw6r6-ku6
Direct link to example
Out[2]= 2
Copy to clipboard.
In[3]:= 3
✖
https://wolfram.com/xid/0bqfw6r6-myx
Direct link to example
Out[3]= 3
Copy to clipboard.
In[4]:= 4
✖
https://wolfram.com/xid/0bqfw6r6-w7e
Direct link to example
Out[4]= 4
Copy to clipboard.
In[5]:= 5
✖
https://wolfram.com/xid/0bqfw6r6-tr7
Direct link to example
Out[5]= 5
Copy to clipboard.
In[6]:= 6
✖
https://wolfram.com/xid/0bqfw6r6-un9
Direct link to example
Out[6]= 6
Copy to clipboard.
In[7]:= 7
✖
https://wolfram.com/xid/0bqfw6r6-nwt
Direct link to example
Out[7]= 7
To define derivatives of functions with several arguments, you have to use the general representation of derivatives in the Wolfram Language.
f'[x_]:=rhs | define the first derivative of f |
Derivative[n][f][x_]:=rhs | define the n th derivative of f |
Derivative[m,n,…][g][x_,_,…]:=rhs | |
define derivatives of g with respect to various arguments |
Copy to clipboard.
In[8]:= 8
✖
https://wolfram.com/xid/0bqfw6r6-jn0
Direct link to example
Copy to clipboard.
In[9]:= 9
✖
https://wolfram.com/xid/0bqfw6r6-54
Direct link to example
Out[9]= 9
Copy to clipboard.
In[1]:= 1
✖
https://wolfram.com/xid/0bqfw6r6-rp1
Direct link to example
Out[1]= 1
Copy to clipboard.
In[2]:= 2
✖
https://wolfram.com/xid/0bqfw6r6-wo3
Direct link to example
Out[2]= 2
The Wolfram Language knows how to do almost any integral that can be done in terms of standard mathematical functions. But you should realize that even though an integrand may contain only fairly simple functions, its integral may involve much more complicated functions—or may not be expressible at all in terms of standard mathematical functions.
Copy to clipboard.
In[3]:= 3
✖
https://wolfram.com/xid/0bqfw6r6-xhq
Direct link to example
Out[3]= 3
Copy to clipboard.
In[4]:= 4
✖
https://wolfram.com/xid/0bqfw6r6-ogh
Direct link to example
Out[4]= 4
This integral involves Erf:
Copy to clipboard.
In[5]:= 5
✖
https://wolfram.com/xid/0bqfw6r6-h4p
Direct link to example
Out[5]= 5
Copy to clipboard.
In[6]:= 6
✖
https://wolfram.com/xid/0bqfw6r6-xi7
Direct link to example
Out[6]= 6
Copy to clipboard.
In[7]:= 7
✖
https://wolfram.com/xid/0bqfw6r6-xbk
Direct link to example
Out[7]= 7
This integral simply cannot be done in terms of standard mathematical functions. As a result, the Wolfram Language just leaves it undone:
Copy to clipboard.
In[8]:= 8
✖
https://wolfram.com/xid/0bqfw6r6-lrv
Direct link to example
Out[8]= 8
Integrate[f,x] | the indefinite integral ∫f dx |
Integrate[f,x,y] | the multiple integral ∫dx dy f |
Integrate[f,{x,xmin,xmax}] | the definite integral f dx |
Integrate[f,{x,xmin,xmax},{y,ymin,ymax}] | |
the multiple integral dxdy f |
Copy to clipboard.
In[9]:= 9
✖
https://wolfram.com/xid/0bqfw6r6-w6k
Direct link to example
Out[9]= 9
Copy to clipboard.
In[10]:= 10
✖
https://wolfram.com/xid/0bqfw6r6-s3p
Direct link to example
Out[10]= 10
Copy to clipboard.
In[11]:= 11
✖
https://wolfram.com/xid/0bqfw6r6-pbp
Direct link to example
Out[11]= 11
Copy to clipboard.
In[12]:= 12
✖
https://wolfram.com/xid/0bqfw6r6-u41
Direct link to example
Out[12]= 12
This evaluates the multiple integral . The range of the outermost integration variable appears first:
Copy to clipboard.
In[13]:= 13
✖
https://wolfram.com/xid/0bqfw6r6-gua
Direct link to example
Out[13]= 13
Copy to clipboard.
In[14]:= 14
✖
https://wolfram.com/xid/0bqfw6r6-mbj
Direct link to example
Out[14]= 14
The Wolfram Language function Integrate[f,x] gives you the indefinite integral . You can think of the operation of indefinite integration as being an inverse of differentiation. If you take the result from Integrate[f,x], and then differentiate it, you always get a result that is mathematically equal to the original expression f.
In general, however, there is a whole family of results which have the property that their derivative is f. Integrate[f,x] gives you an expression whose derivative is f. You can get other expressions by adding an arbitrary constant of integration, or indeed by adding any function that is constant except at discrete points.
If you fill in explicit limits for your integral, any such constants of integration must cancel out. But even though the indefinite integral can have arbitrary constants added, it is still often very convenient to manipulate it without filling in the limits.
Copy to clipboard.
In[1]:= 1
✖
https://wolfram.com/xid/0bqfw6r6-dti
Direct link to example
Out[1]= 1
You can add an arbitrary constant to the indefinite integral, and still get the same derivative. Integrate simply gives you an expression with the required derivative:
Copy to clipboard.
In[2]:= 2
✖
https://wolfram.com/xid/0bqfw6r6-tv6
Direct link to example
Out[2]= 2
Copy to clipboard.
In[3]:= 3
✖
https://wolfram.com/xid/0bqfw6r6-v3p
Direct link to example
Out[3]= 3
Copy to clipboard.
In[4]:= 4
✖
https://wolfram.com/xid/0bqfw6r6-n3t
Direct link to example
Out[4]= 4
Copy to clipboard.
In[5]:= 5
✖
https://wolfram.com/xid/0bqfw6r6-gye
Direct link to example
Out[5]= 5
The Integrate function assumes that any object that does not explicitly contain the integration variable is independent of it, and can be treated as a constant. As a result, Integrate is like an inverse of the partial differentiation function D.
Copy to clipboard.
In[6]:= 6
✖
https://wolfram.com/xid/0bqfw6r6-i8a
Direct link to example
Out[6]= 6
The integration variable can be any expression that does not involve explicit mathematical operations:
Copy to clipboard.
In[7]:= 7
✖
https://wolfram.com/xid/0bqfw6r6-miz
Direct link to example
Out[7]= 7
Another assumption that Integrate implicitly makes is that all the symbolic quantities in your integrand have "generic" values. Thus, for example, the Wolfram Language will tell you that is even though this is not true in the special case .
The Wolfram Language gives the standard result for this integral, implicitly assuming that n is not equal to -1:
Copy to clipboard.
In[8]:= 8
✖
https://wolfram.com/xid/0bqfw6r6-pgd
Direct link to example
Out[8]= 8
Copy to clipboard.
In[9]:= 9
✖
https://wolfram.com/xid/0bqfw6r6-qoq
Direct link to example
Out[9]= 9
You should realize that the result for any particular integral can often be written in many different forms. The Wolfram Language tries to give you the most convenient form, following principles such as avoiding explicit complex numbers unless your input already contains them.
This integral is given in terms of ArcTan:
Copy to clipboard.
In[10]:= 10
✖
https://wolfram.com/xid/0bqfw6r6-ujg
Direct link to example
Out[10]= 10
This integral is given in terms of ArcTanh:
Copy to clipboard.
In[11]:= 11
✖
https://wolfram.com/xid/0bqfw6r6-dbb
Direct link to example
Out[11]= 11
Copy to clipboard.
In[12]:= 12
✖
https://wolfram.com/xid/0bqfw6r6-t58
Direct link to example
Out[12]= 12
Copy to clipboard.
In[13]:= 13
✖
https://wolfram.com/xid/0bqfw6r6-ej2
Direct link to example
Out[13]= 13
Even though they look quite different, both ArcTan[x] and -ArcTan[1/x] are indefinite integrals of :
Copy to clipboard.
In[14]:= 14
✖
https://wolfram.com/xid/0bqfw6r6-q5g
Direct link to example
Out[14]= 14
Integrate chooses to use the simpler of the two forms:
Copy to clipboard.
In[15]:= 15
✖
https://wolfram.com/xid/0bqfw6r6-bvj
Direct link to example
Out[15]= 15
Evaluating integrals is much more difficult than evaluating derivatives. For derivatives, there is a systematic procedure based on the chain rule that effectively allows any derivative to be worked out. But for integrals, there is no such systematic procedure.
One of the main problems is that it is difficult to know what kinds of functions will be needed to evaluate a particular integral. When you work out a derivative, you always end up with functions that are of the same kind or simpler than the ones you started with. But when you work out integrals, you often end up needing to use functions that are much more complicated than the ones you started with.
Copy to clipboard.
In[1]:= 1
✖
https://wolfram.com/xid/0bqfw6r6-iui
Direct link to example
Out[1]= 1
But for this integral the special function LogIntegral is needed:
Copy to clipboard.
In[2]:= 2
✖
https://wolfram.com/xid/0bqfw6r6-nwn
Direct link to example
Out[2]= 2
Copy to clipboard.
In[3]:= 3
✖
https://wolfram.com/xid/0bqfw6r6-koi
Direct link to example
Out[3]= 3
This integral involves an incomplete gamma function. Note that the power is carefully set up to allow any complex value of x:
Copy to clipboard.
In[5]:= 5
✖
https://wolfram.com/xid/0bqfw6r6-xg7
Direct link to example
Out[5]= 5
The Wolfram Language includes a very wide range of mathematical functions, and by using these functions a great many integrals can be done. But it is still possible to find even fairly simple‐looking integrals that just cannot be done in terms of any standard mathematical functions.
Here is a fairly simple‐looking integral that cannot be done in terms of any standard mathematical functions:
Copy to clipboard.
In[6]:= 6
✖
https://wolfram.com/xid/0bqfw6r6-tpd
Direct link to example
Out[6]= 6
The main point of being able to do an integral in terms of standard mathematical functions is that it lets one use the known properties of these functions to evaluate or manipulate the result one gets.
In the most convenient cases, integrals can be done purely in terms of elementary functions such as exponentials, logarithms and trigonometric functions. In fact, if you give an integrand that involves only such elementary functions, then one of the important capabilities of Integrate is that if the corresponding integral can be expressed in terms of elementary functions, then Integrate will essentially always succeed in finding it.
Integrals of rational functions are straightforward to evaluate, and always come out in terms of rational functions, logarithms and inverse trigonometric functions:
Copy to clipboard.
In[7]:= 7
✖
https://wolfram.com/xid/0bqfw6r6-rwe
Direct link to example
Out[7]= 7
The integral here is still of the same form, but now involves an implicit sum over the roots of a polynomial:
Copy to clipboard.
In[8]:= 8
✖
https://wolfram.com/xid/0bqfw6r6-w7d
Direct link to example
Out[8]= 8
Copy to clipboard.
In[9]:= 9
✖
https://wolfram.com/xid/0bqfw6r6-jjp
Direct link to example
Out[9]= 9
Copy to clipboard.
In[10]:= 10
✖
https://wolfram.com/xid/0bqfw6r6-qid
Direct link to example
Out[10]= 10
Copy to clipboard.
In[11]:= 11
✖
https://wolfram.com/xid/0bqfw6r6-l2s
Direct link to example
Out[11]= 11
Copy to clipboard.
In[12]:= 12
✖
https://wolfram.com/xid/0bqfw6r6-gcp
Direct link to example
Out[12]= 12
By nesting elementary functions you sometimes get integrals that can be done in terms of elementary functions:
Copy to clipboard.
In[13]:= 13
✖
https://wolfram.com/xid/0bqfw6r6-wcp
Direct link to example
Out[13]= 13
Copy to clipboard.
In[14]:= 14
✖
https://wolfram.com/xid/0bqfw6r6-jlv
Direct link to example
Out[14]= 14
Copy to clipboard.
In[15]:= 15
✖
https://wolfram.com/xid/0bqfw6r6-e6w
Direct link to example
Out[15]= 15
Copy to clipboard.
In[16]:= 16
✖
https://wolfram.com/xid/0bqfw6r6-nre
Direct link to example
Out[16]= 16
Integrals like this can systematically be done using Piecewise:
Copy to clipboard.
In[17]:= 17
✖
https://wolfram.com/xid/0bqfw6r6-fuv
Direct link to example
Out[17]= 17
Beyond working with elementary functions, Integrate includes a large number of algorithms for dealing with special functions. Sometimes it uses a direct generalization of the procedure for elementary functions. But more often its strategy is first to try to write the integrand in a form that can be integrated in terms of certain sophisticated special functions, and then having done this to try to find reductions of these sophisticated functions to more familiar functions.
Copy to clipboard.
In[18]:= 18
✖
https://wolfram.com/xid/0bqfw6r6-qou
Direct link to example
Out[18]= 18
Copy to clipboard.
In[20]:= 20
✖
https://wolfram.com/xid/0bqfw6r6-tui
Direct link to example
Out[20]= 20
A large book of integral tables will list perhaps a few thousand indefinite integrals. The Wolfram Language can do essentially all of these integrals. And because it contains general algorithms rather than just specific cases, the Wolfram Language can actually do a vastly wider range of integrals.
Copy to clipboard.
In[21]:= 21
✖
https://wolfram.com/xid/0bqfw6r6-q3n
Direct link to example
Out[21]= 21
To do this integral, however, requires a more general algorithm, rather than just a direct table lookup:
Copy to clipboard.
In[22]:= 22
✖
https://wolfram.com/xid/0bqfw6r6-c3p
Direct link to example
Out[22]= 22
Particularly if you introduce new mathematical functions of your own, you may want to teach the Wolfram Language new kinds of integrals. You can do this by making appropriate definitions for Integrate.
In the case of differentiation, the chain rule allows one to reduce all derivatives to a standard form, represented in the Wolfram Language using Derivative. But for integration, no such similar standard form exists, and as a result you often have to make definitions for several different versions of the same integral. Changes of variables and other transformations can rarely be done automatically by Integrate.
This integral cannot be done in terms of any of the standard mathematical functions built into the Wolfram Language:
Copy to clipboard.
In[23]:= 23
✖
https://wolfram.com/xid/0bqfw6r6-eog
Direct link to example
Out[23]= 23
Copy to clipboard.
In[24]:= 24
✖
https://wolfram.com/xid/0bqfw6r6-m0m
Direct link to example
Out[24]= 24
Copy to clipboard.
In[25]:= 25
✖
https://wolfram.com/xid/0bqfw6r6-pyt
Direct link to example
Copy to clipboard.
In[26]:= 26
✖
https://wolfram.com/xid/0bqfw6r6-ff2
Direct link to example
Out[26]= 26
As it turns out, the integral can in principle be represented as an infinite sum of hypergeometric functions, or as a suitably generalized Kampé de Fériet hypergeometric function of two variables.
Integrate[f,x] | the indefinite integral |
Integrate[f,{x,xmin,xmax}] | the definite integral |
Integrate[f,{x,xmin,xmax},{y,ymin,ymax}] | |
the multiple integral |
Copy to clipboard.
In[1]:=1
✖
https://wolfram.com/xid/0bqfw6r6-x4w
Direct link to example
Out[1]=1
Copy to clipboard.
In[2]:=2
✖
https://wolfram.com/xid/0bqfw6r6-tvl
Direct link to example
Out[2]=2
The y integral is done first. Its limits can depend on the value of x. This ordering is the same as is used in functions like Sum and Table:
Copy to clipboard.
In[3]:=3
✖
https://wolfram.com/xid/0bqfw6r6-yk
Direct link to example
Out[3]=3
In simple cases, definite integrals can be done by finding indefinite forms and then computing appropriate limits. But there is a vast range of integrals for which the indefinite form cannot be expressed in terms of standard mathematical functions, but the definite form still can be.
Copy to clipboard.
In[4]:=4
✖
https://wolfram.com/xid/0bqfw6r6-dp6
Direct link to example
Out[4]=4
Copy to clipboard.
In[5]:=5
✖
https://wolfram.com/xid/0bqfw6r6-uzb
Direct link to example
Out[5]=5
Here is an integral where the indefinite form can be found, but it is much more efficient to work out the definite form directly:
Copy to clipboard.
In[6]:=6
✖
https://wolfram.com/xid/0bqfw6r6-qxn
Direct link to example
Out[6]=6
Just because an integrand may contain special functions, it does not mean that the definite integral will necessarily be complicated:
Copy to clipboard.
In[7]:=7
✖
https://wolfram.com/xid/0bqfw6r6-xk1
Direct link to example
Out[7]=7
Copy to clipboard.
In[8]:=8
✖
https://wolfram.com/xid/0bqfw6r6-mv9
Direct link to example
Out[8]=8
Copy to clipboard.
In[9]:=9
✖
https://wolfram.com/xid/0bqfw6r6-2e
Direct link to example
Out[9]=9
Even when you can find the indefinite form of an integral, you will often not get the correct answer for the definite integral if you just subtract the values of the limits at each end point. The problem is that within the domain of integration there may be singularities whose effects are ignored if you follow this procedure.
Copy to clipboard.
In[10]:=10
✖
https://wolfram.com/xid/0bqfw6r6-eui
Direct link to example
Out[10]=10
Copy to clipboard.
In[11]:=11
✖
https://wolfram.com/xid/0bqfw6r6-s4a
Direct link to example
Out[11]=11
Copy to clipboard.
In[12]:=12
✖
https://wolfram.com/xid/0bqfw6r6-nkp
Direct link to example
Out[12]=12
Copy to clipboard.
In[13]:=13
✖
https://wolfram.com/xid/0bqfw6r6-eau
Direct link to example
Out[13]=13
Copy to clipboard.
In[14]:=14
✖
https://wolfram.com/xid/0bqfw6r6-0w
Direct link to example
Out[14]=14
The definite integral, however, gives the correct result which depends on . The assumption assures convergence:
Copy to clipboard.
In[15]:=15
✖
https://wolfram.com/xid/0bqfw6r6-gk4
Direct link to example
Out[15]=15
Integrate[f,{x,xmin,xmax},PrincipalValue->True] | |
the Cauchy principal value of a definite integral |
Copy to clipboard.
In[16]:=16
✖
https://wolfram.com/xid/0bqfw6r6-wau
Direct link to example
Out[16]=16
Copy to clipboard.
In[17]:=17
✖
https://wolfram.com/xid/0bqfw6r6-cx1
Direct link to example
Out[17]=17
Copy to clipboard.
In[18]:=18
✖
https://wolfram.com/xid/0bqfw6r6-uio
Direct link to example
Out[18]=18
Copy to clipboard.
In[19]:=19
✖
https://wolfram.com/xid/0bqfw6r6-u2u
Direct link to example
Out[19]=19
When parameters appear in an indefinite integral, it is essentially always possible to get results that are correct for almost all values of these parameters. But for definite integrals this is no longer the case. The most common problem is that a definite integral may converge only when the parameters that appear in it satisfy certain specific conditions.
Copy to clipboard.
In[20]:=20
✖
https://wolfram.com/xid/0bqfw6r6-loq
Direct link to example
Out[20]=20
For the definite integral, however, must satisfy a condition in order for the integral to be convergent:
Copy to clipboard.
In[21]:=21
✖
https://wolfram.com/xid/0bqfw6r6-y38
Direct link to example
Out[21]=21
Copy to clipboard.
In[22]:=22
✖
https://wolfram.com/xid/0bqfw6r6-g57
Direct link to example
Out[22]=22
option name | default value | |
GenerateConditions | Automatic | whether to generate explicit conditions |
Assumptions | $Assumptions | what relations about parameters to assume |
Options for Integrate.
Copy to clipboard.
In[23]:=23
✖
https://wolfram.com/xid/0bqfw6r6-i9p
Direct link to example
Out[23]=23
Even when a definite integral is convergent, the presence of singularities on the integration path can lead to discontinuous changes when the parameters vary. Sometimes a single formula containing functions like Sign can be used to summarize the result. In other cases, however, an explicit If is more convenient.
The If here gives the condition for the integral to be convergent:
Copy to clipboard.
In[24]:=24
✖
https://wolfram.com/xid/0bqfw6r6-x9a
Direct link to example
Out[24]=24
Copy to clipboard.
In[25]:=25
✖
https://wolfram.com/xid/0bqfw6r6-gah
Direct link to example
Out[25]=25
The result is discontinuous as a function of . The discontinuity can be traced to the essential singularity of at :
Copy to clipboard.
In[26]:=26
✖
https://wolfram.com/xid/0bqfw6r6-wzo
Direct link to example
Out[26]=26
There is no convenient way to represent this answer in terms of Sign, so the Wolfram Language generates an explicit If:
Copy to clipboard.
In[27]:=27
✖
https://wolfram.com/xid/0bqfw6r6-nvi
Direct link to example
Out[27]=27
Copy to clipboard.
In[28]:=28
✖
https://wolfram.com/xid/0bqfw6r6-i26
Direct link to example
Out[28]=28
Copy to clipboard.
In[1]:= 1
✖
https://wolfram.com/xid/0bqfw6r6-byazaq
Direct link to example
Out[1]= 1
Copy to clipboard.
In[2]:= 2
✖
https://wolfram.com/xid/0bqfw6r6-ccwfc5
Direct link to example
Out[2]= 2
Even though an integral may be straightforward over a simple rectangular region, it can be significantly more complicated even over a circular region.
Copy to clipboard.
In[3]:= 3
✖
https://wolfram.com/xid/0bqfw6r6-buvdbe
Direct link to example
Out[3]= 3
Particularly if there are parameters inside the conditions that define regions, the results for integrals over regions may break into several cases.
Copy to clipboard.
In[4]:= 4
✖
https://wolfram.com/xid/0bqfw6r6-hvp
Direct link to example
Out[4]= 4
Copy to clipboard.
In[5]:= 5
✖
https://wolfram.com/xid/0bqfw6r6-wyi
Direct link to example
Out[5]= 5
Copy to clipboard.
In[6]:= 6
✖
https://wolfram.com/xid/0bqfw6r6-d8y
Direct link to example
Out[6]= 6
Copy to clipboard.
In[8]:=8
✖
https://wolfram.com/xid/0bqfw6r6-rovw6r
Direct link to example
Out[8]=8
When the Wolfram Language cannot give you an explicit result for an integral, it leaves the integral in a symbolic form. It is often useful to manipulate this symbolic form.
The Wolfram Language cannot give an explicit result for this integral, so it leaves the integral in symbolic form:
Copy to clipboard.
In[1]:= 1
✖
https://wolfram.com/xid/0bqfw6r6-iq
Direct link to example
Out[1]= 1
Copy to clipboard.
In[2]:= 2
✖
https://wolfram.com/xid/0bqfw6r6-w3b
Direct link to example
Out[2]= 2
Copy to clipboard.
In[3]:= 3
✖
https://wolfram.com/xid/0bqfw6r6-jf5
Direct link to example
Out[3]= 3
Copy to clipboard.
In[4]:= 4
✖
https://wolfram.com/xid/0bqfw6r6-dbw
Direct link to example
Out[4]= 4
Copy to clipboard.
In[5]:= 5
✖
https://wolfram.com/xid/0bqfw6r6-ul4
Direct link to example
Out[5]= 5
Copy to clipboard.
In[6]:= 6
✖
https://wolfram.com/xid/0bqfw6r6-xsx
Direct link to example
Out[6]= 6
Copy to clipboard.
In[7]:= 7
✖
https://wolfram.com/xid/0bqfw6r6-f8p
Direct link to example
Out[7]= 7
You can use the Wolfram Language function DSolve to find symbolic solutions to ordinary and partial differential equations.
Solving a differential equation consists essentially in finding the form of an unknown function. In the Wolfram Language, unknown functions are represented by expressions like y[x]. The derivatives of such functions are represented by y'[x], y''[x], and so on.
The Wolfram Language function DSolve returns as its result a list of rules for functions. There is a question of how these functions are represented. If you ask DSolve to solve for y[x], then DSolve will indeed return a rule for y[x]. In some cases, this rule may be all you need. But this rule, on its own, does not give values for y'[x] or even y[0]. In many cases, therefore, it is better to ask DSolve to solve not for y[x], but instead for y itself. In this case, what DSolve will return is a rule which gives y as a pure function, in the sense discussed in "Pure Functions".
Copy to clipboard.
In[2]:=2
✖
https://wolfram.com/xid/0bqfw6r6-csy
Direct link to example
Out[2]=2
Copy to clipboard.
In[3]:=3
✖
https://wolfram.com/xid/0bqfw6r6-vmb
Direct link to example
Out[3]=3
Copy to clipboard.
In[4]:=4
✖
https://wolfram.com/xid/0bqfw6r6-fj
Direct link to example
Out[4]=4
Copy to clipboard.
In[5]:=5
✖
https://wolfram.com/xid/0bqfw6r6-xxm
Direct link to example
Out[5]=5
Substituting the solution into the original equation yields True:
Copy to clipboard.
In[5]:= 5
✖
https://wolfram.com/xid/0bqfw6r6-s54
Direct link to example
Out[5]= 5
DSolve[eqn,y[x],x] | solve a differential equation for y[x] |
DSolve[eqn,y,x] | solve a differential equation for the function y |
In standard mathematical notation, one typically represents solutions to differential equations by explicitly introducing "dummy variables" to represent the arguments of the functions that appear. If all you need is a symbolic form for the solution, then introducing such dummy variables may be convenient. However, if you actually intend to use the solution in a variety of other computations, then you will usually find it better to get the solution in pure‐function form, without dummy variables. Notice that this form, while easy to represent in the Wolfram Language, has no direct analog in standard mathematical notation.
DSolve[{eqn1,eqn2,…},{y1,y2,…},x] | |
solve a list of differential equations |
Copy to clipboard.
In[6]:=6
✖
https://wolfram.com/xid/0bqfw6r6-nz6
Direct link to example
Out[6]=6
Copy to clipboard.
In[7]:=7
✖
https://wolfram.com/xid/0bqfw6r6-zea
Direct link to example
Out[7]=7
You can add constraints and boundary conditions for differential equations by explicitly giving additional equations such as y[0]==0.
Copy to clipboard.
In[8]:= 8
✖
https://wolfram.com/xid/0bqfw6r6-rnz
Direct link to example
Out[8]= 8
If you ask the Wolfram Language to solve a set of differential equations and you do not give any constraints or boundary conditions, then the Wolfram Language will try to find a general solution to your equations. This general solution will involve various undetermined constants. One new constant is introduced for each order of derivative in each equation you give.
The default is that these constants are named C[n], where the index n starts at 1 for each invocation of DSolve. You can override this choice, by explicitly giving a setting for the option GeneratedParameters. Any function you give is applied to each successive index value n to get the constants to use for each invocation of DSolve.
Copy to clipboard.
In[8]:=8
✖
https://wolfram.com/xid/0bqfw6r6-v22
Direct link to example
Out[8]=8
Each independent initial or boundary condition you give reduces the number of undetermined constants by one:
Copy to clipboard.
In[9]:=9
✖
https://wolfram.com/xid/0bqfw6r6-mh4
Direct link to example
Out[9]=9
You should realize that finding exact formulas for the solutions to differential equations is a difficult matter. In fact, there are only fairly few kinds of equations for which such formulas can be found, at least in terms of standard mathematical functions.
The most widely investigated differential equations are linear ones, in which the functions you are solving for, as well as their derivatives, appear only linearly.
Copy to clipboard.
In[10]:=10
✖
https://wolfram.com/xid/0bqfw6r6-yme
Direct link to example
Out[10]=10
Copy to clipboard.
In[11]:=11
✖
https://wolfram.com/xid/0bqfw6r6-kma
Direct link to example
Out[11]=11
If you have only a single linear differential equation, and it involves only a first derivative of the function you are solving for, then it turns out that the solution can always be found just by doing integrals.
But as soon as you have more than one differential equation, or more than a first‐order derivative, this is no longer true. However, some simple second‐order linear differential equations can nevertheless be solved using various special functions from "Special Functions". Indeed, historically many of these special functions were first introduced specifically in order to represent the solutions to such equations.
Copy to clipboard.
In[12]:=12
✖
https://wolfram.com/xid/0bqfw6r6-x6l
Direct link to example
Out[12]=12
Copy to clipboard.
In[13]:=13
✖
https://wolfram.com/xid/0bqfw6r6-pu7
Direct link to example
Out[13]=13
Copy to clipboard.
In[14]:=14
✖
https://wolfram.com/xid/0bqfw6r6-kyc
Direct link to example
Out[14]=14
Copy to clipboard.
In[15]:=15
✖
https://wolfram.com/xid/0bqfw6r6-fc4
Direct link to example
Out[15]=15
Copy to clipboard.
In[16]:=16
✖
https://wolfram.com/xid/0bqfw6r6-p1g
Direct link to example
Out[16]=16
Beyond second order, the kinds of functions needed to solve even fairly simple linear differential equations become extremely complicated. At third order, the generalized Meijer G function MeijerG can sometimes be used, but at fourth order and beyond absolutely no standard mathematical functions are typically adequate, except in very special cases.
Here is a third‐order linear differential equation which can be solved in terms of generalized hypergeometric functions:
Copy to clipboard.
In[17]:=17
✖
https://wolfram.com/xid/0bqfw6r6-j9a
Direct link to example
Out[17]=17
Copy to clipboard.
In[18]:=18
✖
https://wolfram.com/xid/0bqfw6r6-u4i
Direct link to example
Out[18]=18
For nonlinear differential equations, only rather special cases can usually ever be solved in terms of standard mathematical functions. Nevertheless, DSolve includes fairly general procedures which allow it to handle almost all nonlinear differential equations whose solutions are found in standard reference books.
First‐order nonlinear differential equations in which does not appear on its own are fairly easy to solve:
Copy to clipboard.
In[19]:=19
✖
https://wolfram.com/xid/0bqfw6r6-oj9
Direct link to example
Out[19]=19
Copy to clipboard.
In[20]:=20
✖
https://wolfram.com/xid/0bqfw6r6-2hlah
Direct link to example
Out[20]=20
Copy to clipboard.
In[21]:=21
✖
https://wolfram.com/xid/0bqfw6r6-j0l
Direct link to example
Out[21]=21
Copy to clipboard.
In[22]:=22
✖
https://wolfram.com/xid/0bqfw6r6-ite
Direct link to example
Out[22]=22
Copy to clipboard.
In[23]:=23
✖
https://wolfram.com/xid/0bqfw6r6-m5p
Direct link to example
Out[23]=23
In practical applications, it is quite often convenient to set up differential equations that involve piecewise functions. You can use DSolve to find symbolic solutions to such equations.
Copy to clipboard.
In[24]:=24
✖
https://wolfram.com/xid/0bqfw6r6-d3w
Direct link to example
Out[24]=24
Copy to clipboard.
In[25]:=25
✖
https://wolfram.com/xid/0bqfw6r6-ia2
Direct link to example
Out[25]=25
Beyond ordinary differential equations, one can consider differential-algebraic equations that involve a mixture of differential and algebraic equations.
Copy to clipboard.
In[26]:=26
✖
https://wolfram.com/xid/0bqfw6r6-cah
Direct link to example
Out[26]=26
DSolve[eqn,y[x1,x2,…],{x1,x2,…}] | |
solve a partial differential equation for y[x1,x2,…] | |
DSolve[eqn,y,{x1,x2,…}] | solve a partial differential equation for the function y |
DSolve is set up to handle not only ordinary differential equations in which just a single independent variable appears, but also partial differential equations in which two or more independent variables appear.
This finds the general solution to a simple partial differential equation with two independent variables:
Copy to clipboard.
In[36]:=36
✖
https://wolfram.com/xid/0bqfw6r6-zfe
Direct link to example
Out[36]=36
Copy to clipboard.
In[37]:=37
✖
https://wolfram.com/xid/0bqfw6r6-neo
Direct link to example
Out[37]=37
The basic mathematics of partial differential equations is considerably more complicated than that of ordinary differential equations. One feature is that whereas the general solution to an ordinary differential equation involves only arbitrary constants, the general solution to a partial differential equation, if it can be found at all, must involve arbitrary functions. Indeed, with independent variables, arbitrary functions of arguments appear. DSolve by default names these functions C[n].
Copy to clipboard.
In[28]:=28
✖
https://wolfram.com/xid/0bqfw6r6-trn
Direct link to example
Out[28]=28
Copy to clipboard.
In[29]:=29
✖
https://wolfram.com/xid/0bqfw6r6-jmj
Direct link to example
Out[29]=29
Copy to clipboard.
In[31]:=31
✖
https://wolfram.com/xid/0bqfw6r6-fwy
Direct link to example
Out[31]=31
Copy to clipboard.
In[32]:=32
✖
https://wolfram.com/xid/0bqfw6r6-h40
Direct link to example
Out[32]=32
For an ordinary differential equation, it is guaranteed that a general solution must exist, with the property that adding initial or boundary conditions simply corresponds to forcing specific choices for arbitrary constants in the solution. But for partial differential equations this is no longer true. Indeed, it is only for linear partial differential and a few other special types that such general solutions exist.
Other partial differential equations can be solved only when specific initial or boundary values are given, and in the vast majority of cases no solutions can be found as exact formulas in terms of standard mathematical functions.
Copy to clipboard.
In[33]:=33
✖
https://wolfram.com/xid/0bqfw6r6-k3d
Direct link to example
Out[33]=33
Copy to clipboard.
In[34]:=34
✖
https://wolfram.com/xid/0bqfw6r6-clh
Direct link to example
Out[34]=34
Copy to clipboard.
In[35]:=35
✖
https://wolfram.com/xid/0bqfw6r6-vo7
Direct link to example
Out[35]=35
Laplace Transforms
LaplaceTransform[expr,t,s] | the Laplace transform of expr |
InverseLaplaceTransform[expr,s,t] | the inverse Laplace transform of expr |
The Laplace transform of a function is given by . The inverse Laplace transform of is given for suitable by .
Copy to clipboard.
In[1]:= 1
✖
https://wolfram.com/xid/0bqfw6r6-lk6
Direct link to example
Out[1]= 1
Copy to clipboard.
In[2]:= 2
✖
https://wolfram.com/xid/0bqfw6r6-mil
Direct link to example
Out[2]= 2
Copy to clipboard.
In[3]:= 3
✖
https://wolfram.com/xid/0bqfw6r6-c3b
Direct link to example
Out[3]= 3
Copy to clipboard.
In[4]:= 4
✖
https://wolfram.com/xid/0bqfw6r6-s39
Direct link to example
Out[4]= 4
InverseLaplaceTransform returns the original function:
Copy to clipboard.
In[6]:=6
✖
https://wolfram.com/xid/0bqfw6r6-kl6l8d
Direct link to example
Out[6]=6
Copy to clipboard.
In[5]:= 5
✖
https://wolfram.com/xid/0bqfw6r6-njf
Direct link to example
Out[5]= 5
Laplace transforms have the property that they turn integration and differentiation into essentially algebraic operations. They are therefore commonly used in studying systems governed by differential equations.
Copy to clipboard.
In[6]:= 6
✖
https://wolfram.com/xid/0bqfw6r6-dq6
Direct link to example
Out[6]= 6
LaplaceTransform[expr,{t1,t2,…},{s1,s2,…}] | |
the multidimensional Laplace transform of expr | |
InverseLaplaceTransform[expr,{s1,s2,…},{t1,t2,…}] | |
the multidimensional inverse Laplace transform of expr |
Fourier Transforms
FourierTransform[expr,t,ω] | the Fourier transform of expr |
InverseFourierTransform[expr,ω,t] | the inverse Fourier transform of expr |
Integral transforms can produce results that involve "generalized functions" such as HeavisideTheta:
Copy to clipboard.
In[1]:= 1
✖
https://wolfram.com/xid/0bqfw6r6-vgn
Direct link to example
Out[1]= 1
Copy to clipboard.
In[2]:= 2
✖
https://wolfram.com/xid/0bqfw6r6-lhs
Direct link to example
Out[2]= 2
In the Wolfram Language the Fourier transform of a function is by default defined to be . The inverse Fourier transform of is similarly defined as .
In different scientific and technical fields different conventions are often used for defining Fourier transforms. The option FourierParameters in the Wolfram Language allows you to choose any of these conventions you want.
common convention
|
setting
|
Fourier transform
|
inverse Fourier transform
|
Wolfram Language default |
{0,1}
| ||
pure mathematics |
{1,-1}
| ||
classical physics |
{-1,1}
| ||
modern physics |
{0,1}
| ||
systems engineering |
{1,-1}
| ||
signal processing |
{0,-2Pi}
| ||
general case |
{a,b}
|
Typical settings for FourierParameters with various conventions.
Copy to clipboard.
In[3]:= 3
✖
https://wolfram.com/xid/0bqfw6r6-edu
Direct link to example
Out[3]= 3
Here is the same Fourier transform with the choice of parameters typically used in signal processing:
Copy to clipboard.
In[4]:= 4
✖
https://wolfram.com/xid/0bqfw6r6-tc5
Direct link to example
Out[4]= 4
FourierSinTransform[expr,t,ω] | Fourier sine transform |
FourierCosTransform[expr,t,ω] | Fourier cosine transform |
InverseFourierSinTransform[expr,ω,t] | |
inverse Fourier sine transform | |
InverseFourierCosTransform[expr,ω,t] | |
inverse Fourier cosine transform |
In some applications of Fourier transforms, it is convenient to avoid ever introducing complex exponentials. Fourier sine and cosine transforms correspond to integrating respectively with and instead of , and using limits 0 and rather than and .
Copy to clipboard.
In[5]:= 5
✖
https://wolfram.com/xid/0bqfw6r6-u8f
Direct link to example
Out[5]= 5
FourierTransform[expr,{t1,t2,…},{ω1,ω2,…}] | |
the multidimensional Fourier transform of expr | |
InverseFourierTransform[expr,{ω1,ω2,…},{t1,t2,…}] | |
the multidimensional inverse Fourier transform of expr | |
FourierSinTransform[expr,{t1,t2,…},{ω1,ω2,…}]
,
FourierCosTransform[expr,{t1,t2,…},{ω1,ω2,…}] | |
the multidimensional sine and cosine Fourier transforms of expr | |
InverseFourierSinTransform[expr,{ω1,ω2,…},{t1,t2,…}]
,
InverseFourierCosTransform[expr,{ω1,ω2,…},{t1,t2,…}] | |
the multidimensional inverse Fourier sine and cosine transforms of expr |
Copy to clipboard.
In[6]:= 6
✖
https://wolfram.com/xid/0bqfw6r6-xih
Direct link to example
Out[6]= 6
Copy to clipboard.
In[7]:= 7
✖
https://wolfram.com/xid/0bqfw6r6-itv
Direct link to example
Out[7]= 7
Z Transforms
ZTransform[expr,n,z] | Z transform of expr |
InverseZTransform[expr,z,n] | inverse Z transform of expr |
The Z transform of a function is given by . The inverse Z transform of is given by the contour integral . Z transforms are effectively discrete analogs of Laplace transforms. They are widely used for solving difference equations, especially in digital signal processing and control theory. They can be thought of as producing generating functions, of the kind commonly used in combinatorics and number theory.
Copy to clipboard.
In[1]:= 1
✖
https://wolfram.com/xid/0bqfw6r6-udz
Direct link to example
Out[1]= 1
Copy to clipboard.
In[2]:= 2
✖
https://wolfram.com/xid/0bqfw6r6-kgc
Direct link to example
Out[2]= 2
Copy to clipboard.
In[3]:= 3
✖
https://wolfram.com/xid/0bqfw6r6-j2x
Direct link to example
Out[3]= 3
In many practical situations it is convenient to consider limits in which a fixed amount of something is concentrated into an infinitesimal region. Ordinary mathematical functions of the kind normally encountered in calculus cannot readily represent such limits. However, it is possible to introduce generalized functions or distributions which can represent these limits in integrals and other types of calculations.
DiracDelta[x] | Dirac delta function |
HeavisideTheta[x] | Heaviside theta function , equal to 0 for and 1 for |
Copy to clipboard.
In[3]:=3
✖
https://wolfram.com/xid/0bqfw6r6-r8a
Direct link to example
Out[3]=3
Copy to clipboard.
In[4]:=4
✖
https://wolfram.com/xid/0bqfw6r6-esz
Direct link to example
Out[4]=4
Copy to clipboard.
In[3]:= 3
✖
https://wolfram.com/xid/0bqfw6r6-j2c
Direct link to example
Out[3]= 3
The limit of the functions for infinite is effectively a Dirac delta function, whose integral is again 1:
Copy to clipboard.
In[4]:= 4
✖
https://wolfram.com/xid/0bqfw6r6-g70
Direct link to example
Out[4]= 4
DiracDelta evaluates to 0 at all real points except :
Copy to clipboard.
In[5]:= 5
✖
https://wolfram.com/xid/0bqfw6r6-irq
Direct link to example
Out[5]= 5
Inserting a delta function in an integral effectively causes the integrand to be sampled at discrete points where the argument of the delta function vanishes.
Copy to clipboard.
In[6]:= 6
✖
https://wolfram.com/xid/0bqfw6r6-blp
Direct link to example
Out[6]= 6
Copy to clipboard.
In[7]:= 7
✖
https://wolfram.com/xid/0bqfw6r6-i4o
Direct link to example
Out[7]= 7
Copy to clipboard.
In[8]:= 8
✖
https://wolfram.com/xid/0bqfw6r6-cxg
Direct link to example
Out[8]= 8
The Heaviside function HeavisideTheta[x] is the indefinite integral of the delta function. It is variously denoted , , , and . As a generalized function, the Heaviside function is defined only inside an integral. This distinguishes it from the unit step function UnitStep[x], which is a piecewise function.
Copy to clipboard.
In[16]:=16
✖
https://wolfram.com/xid/0bqfw6r6-h9s
Direct link to example
Out[16]=16
Copy to clipboard.
In[22]:=22
✖
https://wolfram.com/xid/0bqfw6r6-cp6
Direct link to example
Out[22]=22
Copy to clipboard.
In[13]:= 13
✖
https://wolfram.com/xid/0bqfw6r6-s1m
Direct link to example
Out[13]= 13
Copy to clipboard.
In[14]:= 14
✖
https://wolfram.com/xid/0bqfw6r6-v02
Direct link to example
Out[14]= 14
Dirac delta functions can be used in DSolve to find the impulse response or Green's function of systems represented by linear and certain other differential equations.
Copy to clipboard.
In[3]:=3
✖
https://wolfram.com/xid/0bqfw6r6-n7z
Direct link to example
Out[3]=3
DiracDelta[x1,x2,…] | multidimensional Dirac delta function |
HeavisideTheta[x1,x2,…] | multidimensional Heaviside theta function |
Multidimensional generalized functions are essentially products of univariate generalized functions.
Copy to clipboard.
In[26]:=26
✖
https://wolfram.com/xid/0bqfw6r6-izc0s5
Direct link to example
Out[26]=26
Related to the multidimensional Dirac delta function are two integer functions: discrete delta and Kronecker delta. Discrete delta is 1 if all the , and is zero otherwise. Kronecker delta is 1 if all the are equal, and is zero otherwise.
DiscreteDelta[n1,n2,…] | discrete delta |
KroneckerDelta[n1,n2,…] | Kronecker delta |