prologues:=2;
input courbescp13;
beginfig(1);
depart((0,0),(14,7),(4,1),2,2);
draw grille(0.5);
draw axes;
graduantx.bot;
graduanty.ulft;
draw courbe1(-2,5,100,((x+1)**2)*exp(-x)) withcolor violet;
draw labelise1(btex $y=(x+1)^2e^{-x}$ etex,0.8);
draw courbe2(-1,3,100,x) withcolor bleu;
draw labelise2(btex $y=x\quad(\Delta)$ etex,0.9);
draw tangente1(0);
labeloffset:=2*labeloffset;
label.top(btex $M_0$ etex,Cb1 intersectionpoint Cb2);
labeloffset:=labeloffset/2;
draw Projectiona(Cb1 intersectionpoint Cb2);
label.bot(btex $x_0$ etex,(xpart(Cb1 intersectionpoint Cb2),1cm));
label.rt(btex $\cal C$ etex,pointcourbe1(-1.5));
label.top(btex $B$ etex,pointcourbe1(1));
draw Projectiona(pointcourbe1(1));
endfig;
end