x = var('x')
c1 = plot(e^(-x/2), (x,0,6), rgbcolor=(0,0,1), legend_label='e^(-x/2)')
c2 = plot((e^(-x/2))*cos(2*pi*x), (x,0,6), rgbcolor=(3,2,5), legend_label='(e^(-x/2))*cos(2*pi*x)')
c = c1+c2
c.set_legend_options(shadow=True)
c.set_legend_options(loc=(4))
show(c, axes_labels=(['x', 'f(x)']))