# set terminal pngcairo transparent enhanced font "arial,10" fontscale 1.0 size 600, 400 # set output 'bivariat.6.png' set key at 4.00000, -3.00000 right top vertical Right noreverse enhanced autotitle nobox set style data lines set title "Min(x,y) and Max(x,y)" set xrange [ -5.00000 : 5.00000 ] noreverse writeback set x2range [ * : * ] noreverse writeback set yrange [ -10.0000 : 10.0000 ] noreverse writeback set y2range [ * : * ] noreverse writeback set zrange [ * : * ] noreverse writeback set cbrange [ * : * ] noreverse writeback set rrange [ * : * ] noreverse writeback set colorbox vertical origin screen 0.9, 0.2 size screen 0.05, 0.6 front noinvert bdefault integral_f(x) = (x>0)?int1a(x,x/ceil(x/delta)):-int1b(x,-x/ceil(-x/delta)) int1a(x,d) = (x<=d*.1) ? 0 : (int1a(x-d,d)+(f(x-d)+4*f(x-d*.5)+f(x))*d/6.) int1b(x,d) = (x>=-d*.1) ? 0 : (int1b(x+d,d)+(f(x+d)+4*f(x+d*.5)+f(x))*d/6.) f(x)=sin(x-1)-.75*sin(2*x-1)+(x**2)/8-5 integral2_f(x,y) = (xy-d*.5) ? 0 : (int2(x+d,y,d) + (f(x)+4*f(x+d*.5)+f(x+d))*d/6.) ack(m,n) = (m == 0) ? n + 1 : (n == 0) ? ack(m-1,1) : ack(m-1,ack(m,n-1)) min(x,y) = (x < y) ? x : y max(x,y) = (x > y) ? x : y NO_ANIMATION = 1 delta = 0.2 plot sin(x), x**2, x**3, max(sin(x), min(x**2, x**3))+0.5