Accelerating the pace of engineering and science

# Documentation Center

• Trial Software
• Product Updates

# intlib::changevar

Change of variable

### Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.

## Syntax

```intlib::changevar(integral, eq, <var>)
```

## Description

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.

## Examples

### Example 1

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.

### Example 2

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)))`

## Parameters

 integral The integral: an arithmetical expression containing a symbolic "int" call eq Equation defining the new integration variable in terms of the old one: an equation var The new integration variable: an identifier

## Return Values

Arithmetical expression.

## See Also

### MuPAD Functions

Was this topic helpful?