Mathc initiation/Fichiers h : c41a2
Installer et compiler ces fichiers dans votre répertoire de travail.
c004.c |
---|
/* --------------------------------- */
/* save as c004.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_x(f,h,Q),
f(Q.x,Q.y)-fxy_x(f,h,Q)*Q.x);
G_3d_tx( 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.479999 y -0.640000
Open the file "a_main.plt" with gnuplot.
Press return to continue.
Equation d'une tangente :
x variable
y constant
y = f(x) z = f(x,y)
y = ax + b z = ax + b
a = f'(x) a = f_x(x,y)
b = y - ax b = z - ax
b = y - f'(x)x b = z - f_x(x,y)x
b = f(x) - f'(x)x b = f(x,y) - f_x(x,y)x