# Question:Integration of a piecewise function

## Question:Integration of a piecewise function

Maple
Hi! I have a problem and I don't know what is wrong. I have a piecewise defined function s(y) (see code at the bottom) and I want to integrate it from y=-Pi..2.338412729. I did this integration int(s,y=-evalf(Pi)..2.338412729); but it took so much time so I canceled it after half an hour! But if I enter the integral in the following way int(s,y=-evalf(Pi)..2); int(s,y=2..2.338412729); it takes Maple less than five seconds to evaluate those expressions. The problem is this whole integration process is integrated in a proc for optimization. So, I need to evaluate the expression int(s,y=-evalf(Pi)..2.338412729); . What is wrong with my piecewise function s(y) that Maple cannot evaluate it in a short time. Hopefully one of you can explain what the problem is and what i have to change. I am using Maple 12. Thank you for your answers!! Flo Here is the code of s(y): s:=piecewise(y <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
﻿