Add support for external html docs
[maxima.git] / demo / romberg.dem
blobac8391050dc1b96b10a41db03309fa1845539b38
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)$
15 h1(5.5);
17 h2(5.5);
19 translate(h1,v,h2)$
21 h1(5.5);
23 h2(5.5);
25 compile(functions);
27 h1(5.5);
29 h2(5.5);