release
Syntax
Description
Examples
Unevaluated Integral
Define a symbolic call to an integral without evaluating it. Set the 'Hold'
option to true when defining the integral using the int
function.
syms x F = int(cos(x),'Hold',true)
F =
Use release
to evaluate the integral by ignoring the 'Hold'
option.
G = release(F)
G =
Unevaluated Integral and Integration by Parts
Find the integral of .
Define the integral without evaluating it by setting the 'Hold'
option to true
.
syms x g(y) F = int(x*exp(x),'Hold',true)
F =
You can apply integration by parts to F
by using the integrateByParts
function. Use exp(x)
as the differential to be integrated.
G = integrateByParts(F,exp(x))
G =
To evaluate the integral in G
, use the release
function to ignore the 'Hold'
option.
Gcalc = release(G)
Gcalc =
Compare the result to the integration result returned by int
without setting the 'Hold'
option.
Fcalc = int(x*exp(x))
Fcalc =
Integration by Substitution
Find the integral of using integration by substitution.
Define the integral without evaluating it by setting the 'Hold'
option to true
.
syms x t F = int(cos(log(x)),'Hold',true)
F =
Substitute the expression log(x)
with t
.
G = changeIntegrationVariable(F,log(x),t)
G =
To evaluate the integral in G
, use the release
function to ignore the 'Hold'
option.
H = release(G)
H =
Restore log(x)
in place of t
.
H = simplify(subs(H,t,log(x)))
H =
Compare the result to the integration result returned by int
without setting the 'Hold'
option to true
.
Fcalc = int(cos(log(x)))
Fcalc =
Input Arguments
expr
— Expression containing integrals
symbolic expression | symbolic function | symbolic vector | symbolic matrix
Expression containing integrals, specified as a symbolic expression, function, vector, or matrix.
Version History
Introduced in R2019b
See Also
Ouvrir l'exemple
Vous possédez une version modifiée de cet exemple. Souhaitez-vous ouvrir cet exemple avec vos modifications ?
Commande MATLAB
Vous avez cliqué sur un lien qui correspond à cette commande MATLAB :
Pour exécuter la commande, saisissez-la dans la fenêtre de commande de MATLAB. Les navigateurs web ne supportent pas les commandes MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)