2 years, 69 days

## How to remove all occurrences of a varia...

Maple

Consider the worksheet below.

 (1)

I want to integrate the above expression. The differential is already present in the expression. Currently, I have to manually remove the differential to use the int procedure as below.

 (2)

Since I want to put this operation inside a procedure, this removal of dz needs to happen programatically.

For even more context, dtau is a differential torque.

I am integrating these infinitesimal torques.

dtau is calculated based on a magnetic field B.

I would like to have a procedure that accepts a field B and computes the torque integral.

## Is there a value that when passed to a p...

Maple

I tried inserting contents of my worksheet here but for some reason procedure test2 does not appear. Therefore, here is a screenshot.

What I would like is for the call r() above to print out 3,2 and then 5.

Basically, I'd like to know how I can call a function that has default parameter values with a value that makes the function use the default parameter value.

In the code above, the variable r is assigned to the return value of test2, which is the function called "inner". The function inner accepts an argument "b" and calls the function "test" passing in this "b" as the second argument. If I don't pass any argument to "inner" then it defaults to Null, which then gets passed to "test".

I want this Null to force "test" to use its default value for parameter "b".

PS As an extra, why does it give a "not able to parse" error when we declare a local inside of a proc as above? Note that I have it commented out.

## How to work with functions that contain ...

Maple 2022

I'd like to be able to define functions with units and then use them.

In the example below, things don't work with Maple input. I've shown one example, with the function f2.

It seems to work better with 2D input, but it seems that it is not possible to make plots.

In the example below, I define f4 as a function of two variables that returns a function of one variable.

I'd like to call the outer function, obtain a function as a result (r1 below) and then plot the latter.

 (1)

 (2)

f2:=x->xUnit(m)

 (3)

 (4)

 (5)

 (6)

 (7)

 (8)

 (9)

The contents above aren't showing the error that Maple gives when I try to plot.

Here is a screenshot

## How to print a variable with units?...

Maple 2022

I have a variable with the unit Volt.

I'd like to print something like "The voltage is %f" where the floating point is the value of the variable with the unit.

I've tried the options below so far.

How would one accomplish this?

 (1)

 5*Units:-Unit(V)

 5*Units:-Unit(V)

 5*Units:-Unit(V)

 5*Units:-Unit(V)

 5 Units:-Unit(V)

 (2)

 (3)

 (4)

## What is Ei_1(x) when solving an integral...

Maple

 (1)

 (2)

What is Ei1 in Maple?