Aller au contenu

Mathc initiation/a93

Un livre de Wikilivres.


Sommaire


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

c003.c
/* --------------------------------- */
/* save as c003.c                    */
/* --------------------------------- */
#include  "x_hfile.h"
#include       "fa.h"
/* --------------------------------- */
int main(void)
{
CTRL_splot p;

p.xmin  =  -1;  p.xmax    =  1;
p.ymin  =  -1;  p.ymax    =  1;
p.zmin  = -.5;  p.zmax    = .5;
p.rot_x =  55;  p.rot_z   = 57;
p.scale =   1;  p.scale_z =  1;

double   h = .001; 
pt2d     Q = i_pt2d(-.5,-.5);

 clrscrn();

 printf(" Draw the equation of the tangent\n\n");
 printf(" at the point P(%.2f,%.2f),\n\n",Q.x,Q.y);
 printf(" on the plan x = %.2f for f(x,y).\n\n\n",Q.x);
 printf(" f : (x,y)-> %s\n\n\n", feq);
 
 printf(" Cartesian form :\n\n");  
 printf(" z = %f y %+f\n\n",
        fxy_y(f,h,Q),
        f(Q.x,Q.y)-fxy_y(f,h,Q)*Q.y);
 
 
     G_3d_ty(   p,
                feq,f,
                Q,h);

 printf(" ... load \"a_main.plt\" ... with gnuplot.  \n\n");
 
 stop();

 return 0;
}
/* --------------------------------- */
/* --------------------------------- */


Exemple de sortie écran :

 Draw the equation of the tangent

 at the point P(-0.5,-0.5),

 on the plan x = -0.5 for f(x,y).


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


 Cartesian form :

 z = 0.959996 y +0.079998

 Open the file "a_main.plt" with gnuplot.

 Press return to continue.


Equation d'une tangente :

                          x constant
                          y variable

   y = f(x)               z = f(x,y)


   y = ax + b             z = ay + b        
                              
   
   a = f'(x)              a = f_y(x,y) 
   
   b = y - ax             b = z - ay 
   b = y - f'(x)x         b = z - f_y(x,y)y
   b = f(x) - f'(x)x      b = f(x,y) - f_y(x,y)y