Mathc initiation/Fichiers h : c37a3

Un livre de Wikilivres.


Sommaire


Installer et compiler ces fichiers dans votre répertoire de travail.

c00a.c
/* --------------------------------- */
/* save as c00a.c                    */
/* --------------------------------- */
#include "x_hfile.h"
#include      "fa.h"
/* --------------------------------- */
int main(void)
{
	CTRL_splot p;
		
p.xmin  = -6,     p.xmax    =   4;
p.ymin  = -4,     p.ymax    =   6;
p.zmin  = -6,     p.zmax    =   6;
p.rot_x = 90,     p.rot_z   =  39;
p.scale =  1,     p.scale_z =   1;

pt2d     Q = i_pt2d(-2,1);

 clrscrn();
 
 printf(" Let f be a function of two variables.          \n\n");
 printf(" A pair (a,b) is a critical point of f if either\n\n");
 printf("    (I)  f_x(a,b) = 0 and f_y(a,b) = 0          \n\n");
 printf("    (II) f_x(a,b) or f_y(a,b) does not exit.\n\n\n\n");

 printf(" Verify is p(%0.2f,%0.2f) is a critical point of f.\n\n\n",Q.x,Q.y);
 printf(" f   : x,y-> %s\n\n\n",   feq  );
 printf(" f_x(%0.2f,%0.2f) = %0.9f    \n\n",Q.x,Q.y, fxy_x(f,H,Q));
 printf(" f_y(%0.2f,%0.2f) = %0.9f  \n\n\n",Q.x,Q.y, fxy_y(f,H,Q));
 
 stop();

 clrscrn();
 
 printf(" f : (x,y)-> %s\n\n\n", feq);

     G_3d_p(    p,
                feq,f,
                Q);

 printf(" Open the file ... load \"a_main.plt\" ... with gnuplot.\n\n");
 
 stop();
 
 return 0;
}
/* --------------------------------- */
/* --------------------------------- */


Exemple de sortie écran :

Let f be a function of two variables.          

 A pair (a,b) is a critical point of f if either

    (I)  f_x(a,b) = 0 and f_y(a,b) = 0          

    (II) f_x(a,b) or f_y(a,b) does not exit.



 Verify is p(-2.00,1.00) is a critical point of f.


 f   : x,y-> -x**2 - 4*x - y**2 + 2*y - 1


 f_x(-2.00,1.00) = 0.000000000    

 f_y(-2.00,1.00) = 0.000000000  


 Press return to continue.


Exemple de sortie écran :

 f : (x,y)-> -x**2 - 4*x - y**2 + 2*y - 1


 Open the file ... load "a_main.plt" ... with gnuplot.

 Press return to continue.