%@AUTEUR:Guillaume Connan prologues:=2; verbatimtex %&latex \documentclass{article} \begin{document} etex input courbes; input geo; color vert_e, turquoise, orange, vert_fonce, rose, vert_mer, bleu_ciel, or, rouge_v,bleu_m,bleu,bleu_f; vert_e:=(0,0.790002,0.340007); turquoise:=(0.250999,0.878399,0.815699); orange:=(0.589999,0.269997,0.080004); vert_fonce:=(0,1.4*0.392193,0); rose:=(1.0, 0.752907, 0.796106); bleu_ciel:=(1.2*0.529405,1.2*0.807794,1);%.2*0.921598); or:=(1,0.843104,0); rouge_v:=(0.829997,0.099994,0.119999); bleu_m:=(0.7*0.529405,0.7*0.807794,0.7);%*0.921598); bleu_f:=(0.211762,0.3231176,0.3686392); bleu:=(0.529405,0.807794,1); % Déclarations des constantes % numeric xmin, xmax, ymin, ymax, N; ux:=.005cm; uy:=.004cm; xmin := -280 ; xmax :=900; ymin := -350; ymax :=900; % Définitions des axes et labels associés numeric p,q; % shift des axes p:=200; q:=120; vardef axes = drawarrow ((ux*xmin,0) -- (ux*xmax,0))shifted (0,p*uy) ; % axe des x drawarrow ((0,uy*ymin) -- (0,uy*ymax))shifted (q*ux,0); % axe des y label(btex $x$ etex,(950*ux,200*uy)); % label de l'axe des x label(btex $y$ etex,(120*ux,950*uy)); % label de l'axe des y enddef; beginfig(1); axes; vardef f(expr x) =x-50*cosd(x) enddef; vardef trace (suffix g)(expr a,b,inc) = save i; numeric i; for i=a step inc until b: (i*ux,g(i)*uy) .. endfor (b*ux,g(b)*uy) enddef; path P; P:=trace(f,-280,830,10) ; draw P withcolor bleu_m; label.rt(btex $y=x-\cos x$ etex,(830*ux,f(830)*uy)) withcolor bleu_m; % Tangentes horizontales pair A,B,C,D,T,a,b,c,d; A=(-110*ux,0) ; B=(250*ux,0); C=(610*ux,0); a=(-110*ux,f(-110)*uy); b=(250*ux,f(250)*uy); c=(610*ux,f(610)*uy); T=(80*ux,0); drawarrow (a--(a shifted T))withcolor bleu_f; drawarrow (a--(a shifted -T))withcolor bleu_f; drawarrow (b--(b shifted T))withcolor bleu_f; drawarrow (b--(b shifted -T))withcolor bleu_f; drawarrow (c--(c shifted T))withcolor bleu_f; drawarrow (c--(c shifted -T))withcolor bleu_f; pair d,e,f; d=(a yscaled 0)shifted(0,p*uy); draw (a--d) dashed evenly withcolor bleu_f; e=(b yscaled 0)shifted(0,p*uy); draw (b--e) dashed evenly withcolor bleu_f; f=(c yscaled 0)shifted(0,p*uy); draw (c--f) dashed evenly withcolor bleu_f; draw (d shifted (0,20*uy))--(d shifted (0,-20*uy)) withcolor bleu_f; label.top(btex \small{$\displaystyle\frac{-3\pi}{2}$} etex,d shifted (0,20*uy)) withcolor bleu_f; draw (e shifted (0,20*uy))--(e shifted (0,-20*uy)) withcolor bleu_f; label.bot(btex \small{$\displaystyle\frac{\pi}{2}$} etex,e shifted (0,-20*uy)) withcolor bleu_f; draw (f shifted (0,20*uy))--(f shifted (0,-20*uy)) withcolor bleu_f; label.bot(btex \small{$\displaystyle\frac{5\pi}{2}$} etex,f shifted (0,-20*uy)) withcolor bleu_f; label.ulft(btex \small{$0$} etex,((q-20)*ux,(p+20)*uy)); endfig; end