Question: function definition

I am new to this, so should be simple.

i define a function p

> p := proc (x) options operator, arrow; 10*x-20*piecewise(x < 2, 0, 2 <= x, x-2) end proc;

i can then evaluate this function

> p(3);

and i get an answer

I then define a function

F := proc (x) options operator, arrow; -(int(p(x), x)) end proc

when i try and evaluate this i get the following error message

> F(2);

 

Error, (in int) integration range or variable must be specified in the second argument, got 2

 

can anyone help??

 

thanks

 

Please Wait...