input courbes; beginfig(1); repere(10cm,10cm,4cm,4cm,1cm,1cm); trace.axes(1pt); marque.unites(1mm); draw rpoint(r_xmin,-r_xmin+1)--rpoint(r_xmax,-r_xmax+1); draw rpoint(r_xmin,1)--rpoint(r_xmax,1); vardef fx(expr t) = t enddef; vardef fy(expr t) = -t/2+1+sqrt(t**2+1)/2 enddef; path courbe; courbe = ftrace(r_xmin,r_xmax,100) en_place; draw courbe withpen pencircle scaled 1.5pt withcolor red; draw (courbe reflectedabout (origine,rpoint(1,1))) withpen pencircle scaled 1.5pt withcolor (1,0,1); decoupe.repere; etiquette.axes; etiquette.unites; label.top(btex $y=f(x)$ etex scaled 1.5,rpoint(r_xmax-2,1.2)) withcolor red; label.rt(btex $y=f^{-1}(x)$ etex scaled 1.5,rpoint(1.3,r_ymax-1)) withcolor (1,0,1); label.ulft(btex $y=-x+1$ etex, rpoint(-1.5,2.5)); label.bot(btex $y=1$ etex, rpoint(-1.5,1)); endfig; end |