>> From: "Stef Pillaert"
Hello,
I'm only using MAPLE for a few days now, and ran into a little problem.
When I try to integrate a piecewise-function with indefinite integrals, I
have a problem:
> restart;
> b:=x->piecewise(x>0,2*x);
> c:=x->int(b(x),x);
> d:=x->int(c(x),x);
> d(x);
{ 0 x <= 0
{
{ 3
{ 1/3 x 0 < x
> d(4);
Error, (in int) wrong number (or type) of arguments
So I can't use d. However, if I copy the result of d(x) into the next line:
> dd:=x->PIECEWISE([0, x <= 0],[1/3*x^3, 0 < x]);
> dd(4);
64/3
Why doesn't this work with d(4)?
I tried to find a way arround this, by defining the integrals like this:
> restart;
> b:=x->piecewise(x>0,2*x):
> c:=x->int(b(xx),xx=0..x):
> d:=x->int(c(xx),xx=0..x):
> c(x);
2 2
x - x Heaviside(-x)
But now, I run into another problem:
> d(x);
Error, (in limit) invalid arguments
Can someone show me the light in my problems (Maple 5.1)
Thanks,
Stef.
|