1 define_variable(pi,apply('ev,[%pi,numer:true]),float)$
3 define_variable(freq,3.3,float,"the frequency in radians/second")$
5 v(x):=(modedeclare(x,float),x*abs(sin(freq*x)))$
7 h1(freq):=romberg('v,0,pi)$
10 /* an alternative syntax is */
12 h2(freq):=romberg(t*abs(sin(freq*t)),t,0,pi)$