Change of variable
This functionality does not run in MATLAB.
intlib::changevar(integral
, eq
, <var
>)
intlib::changevar(integral, eq)
performs
a change of variable for indefinite and definite integrals.
Mathematically, the substitution rule is formally defined for indefinite integrals as
and for definite integrals as
intlib::changevar(integral, eq)
performs
in integral
the change of variable defined by eq
and
returns an unevaluated new integral. You can use the eval
command to find
the closed form of this new integral providing that the closed form
exists.
intlib::changevar
works for indefinite as
well as for definite integrals.
The first argument should contain a symbolic integral of type "int"
.
Such an expression can be obtained with hold
or freeze
. See Example 1.
If more than two variables occur in eq
, the
new variable must be given as third argument.
If MuPAD^{®} cannot solve the given equation eq
an
error will occur.
As a first example we perform a change of variable for the integral
.
By using the hold
function
we ensure that the first argument is of type "int"
:
intlib::changevar(hold(int)(f(x + c), x = a..b), t = x + c, t)
Note that in this case the substitution equation has two further variables besides x. Thus it is necessary to specify the new integration variable as third argument.
In the following example we use the change of variable method for solving the integral . First we perform the transformation t = ln(x):
f1 := intlib::changevar(hold(int)(cos(ln(x)), x), t = ln(x), t)
Now we can evaluate the integral with the MuPAD integrator:
f2:=eval(f1)
Finally we change the variable t back to x and get the result:
F := simplify(f2  t = ln(x))
We can also verify the solution of the integral:
simplify(diff(F,x)  cos(ln(x)))

The integral: an arithmetical expression containing a symbolic 

Equation defining the new integration variable in terms of the old one: an equation 

The new integration variable: an identifier 
Arithmetical expression.