On 19 Aug., 08:34, Ondrej Certik <ond...@certik.cz> wrote:
...
> Is there any other interpretation besides:
>
> int f(x)  d g(x)  = int f(x) * dg/dx    dx
>
> ? Example used in physics:
>
> int P(cos(x)) sin(x) dx = int P(cos(x)) dcos(x)
>
> where P is a Legendre polynomial.

Indeed this seems like a natural interpretation, and it would be
convenient (at least for physicists, perhaps also for engineers) if f
(x).integral(g(x)) would return "int f(x) d g(x)", rather than to try
and match g(x) as a sub-expression of f(x).

Of course, said physicist/engineer could compute d g(x) and change the
integrand accordingly, so that s/he is left with just the integration
variable x. But this is one additional step of work that would better
be automated.

On the other hand, how should Maxima know that in the end, we want the
integration variable x? For example, if g depends on two parameters
x,y, but y is supposed to be a constant parameter rather than a
variable?

What do you think about the following syntax:
 f.integral(x,g)  - f a function, x a variable, g (optional, default g
(x)=x) is a function
Output:
 int f(x) dg(x) = int f(x) dg(x)/dx dx

If I am not mistaken, that would also be meaningful if f or g depended
on further variables.

Advantage of that syntax: g is optional, hence, existing code wouldn't
break. And the corresponding changes could be done in the Sage library
("integral") without to touch Maxima.

Cheers,
Simon
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to