Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

What about

f(x)=sin(2*x + 3)
g(x)=2*cos(2*x + 2)
h=g(x)-f(x)
x0=find_root(h, -3,-1)
x1=find_root(h, -1,0)
p1=plot([f(x),g(x)],[x,x0,x1],fill=True,fillcolor='lightgrey')
p2=plot([f(x),g(x)],[x,x0+pi,x1+pi],fill=True,fillcolor='lightgrey')
p=plot([f(x),g(x)],[x,-pi,pi])
p+p1+p2