Feature SS-85
5 votes

Unit-proof numerical integration

Created by Martin Kraska on 3/27/2014 3:16 PM Last Updated by Martin Kraska on 7/30/2017 9:06 PM
%
 (hrs)
Logged: 0   (hrs)

 Description

Problem description:

  • SMath int(4) cannot handle units in the integration variable/integration limits.
  • Maxima int(4) can do this, but provides symbolic solutions only.
  • Thus, we need a numeric procedure for integrals units in the limit expressions which cannot be solved by Maxima or for those, for whom Maxima is not an option.

Provide a unit-proof numerical integration function, possibly with adaptive accuracy.

An example implementation, based on SMath int(4) and UoM() from the Custom Functions plugin is given here and in the attachment.

    Martin Kraska (Sunday, July 30, 2017 9:04 PM) #

A temporary approach for the implementation within the Maxima-plugin:

If the integral can't be handled symbolically,

 

  • then apply the variable transformation as shown in the original description of the request
  • switch off the re-direction of int() to Int()
  • return the transformed expression to SMath.

 

Then, SMath should be able to handle the integral

An alternative would be to look for numeric procedures in Maxima and call them if numeric evaluation is requested.

 

    Martin Kraska (Monday, March 6, 2017 11:55 AM) #

Thank you for the explanation.

BTW, I can't reproduce the problem

    Davide (Monday, March 6, 2017 11:21 AM) #

When I say "indirect assignments" or "inherited units" I mean "things that comes from outside the math region where you have set the ignore units feature"; the feature works correctly only if units are given directly inside the math region in which ignore units is enabled. If that math region contains a variable previously defined in another math region, it shows issues.

    Martin Kraska (Monday, March 6, 2017 11:05 AM) #

What is indirect assignment?

What are inherited units?

    Davide (Monday, March 6, 2017 10:53 AM) #

at() is a function of Custom Functions plugin. If you open 2nd attachment (9/10/2016) in Attachments tab you should be able to run the example shown in the screenshot below.

"Ignore Units" feature has known issues with inherited units.

 

    I am (Monday, March 6, 2017 12:36 AM) #

Evidently, currently (0.98.6179)  for integration it should be used absolutly unit-free functions due to this. And, unfortunally, the example below doesn't work for me. What is the function at() used there?

    Martin Kraska (Saturday, September 10, 2016 4:45 AM) #

This is how it works now:

    Martin Kraska (Wednesday, September 7, 2016 3:21 PM) #

In 0.98.6089, the proposal doesn't work any more:

 

The basic idea still seems to work: