Mathc initiation/Fichiers c : c28cj
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c16j.c |
---|
/* --------------------------------- */
/* save as c16j.c */
/* --------------------------------- */
#include "x_hfile.h"
#include "fj.h"
/* --------------------------------- */
int main(void)
{
double h = .0001;
double angle = PI/3.;
pt2d P = i_pt2d(2,-1);
v2d u = i_v2d(cos(angle), sin(angle));
clrscrn();
printf(" The directionnal derivative. \n\n");
printf(" Let u be a unit vector and let a be the angle,\n");
printf(" measured in the counterclockwise direction,\n");
printf(" from the positive x axis to the position vector\n");
printf(" corresponding to u.\n\n\n\n");
printf(" Da_f(x,y) = f_x cos(a) + f_y sin(a).\n\n\n\n\n\n");
stop();
clrscrn();
printf(" f : x,y-> %s\n\n\n",feq);
printf(" Find the directionnal derivative of f at p(%+.1f,%+.1f)\n\n"
,P.x,P.y);
printf(" with the angle a = %+.3f\n\n\n", angle);
printf(" Da_fxy = %+.3f \n\n\n",Da_xy(f,h,P,angle));
stop();
clrscrn();
printf(" u is a unit vector then : ||u|| = 1,\n\n");
printf(" The i-component of u is : ||u||cos(a) = 1 cos(a) = %+.3f\n",
cos(angle));
printf(" The j-component of u is : ||u||sin(a) = 1 sin(a) = %+.3f\n\n\n",
sin(angle));
printf(" f : x,y-> %s\n\n\n",feq);
printf(" Find the directionnal derivative of f at P(%+.1f,%+.1f)\n\n"
,P.x,P.y);
printf(" in the direction from u = %+.3fi %+.3fj \n\n\n"
,u.i,u.j);
printf(" With the vector u : Du_fxy = %+.3f \n\n",Du_xy(f,h,P,u));
printf(" With the angle a : Da_fxy = %+.3f \n\n",Da_xy(f,h,P,angle));
stop();
return 0;
}
/* --------------------------------- */
Dérivée directionnelle (Directional derivative)
En analyse mathématique, la notion de dérivée directionnelle permet de quantifier la variation locale d'une fonction dépendant de plusieurs variables, en un point donné et le long d'une direction donnée dans l'espace de ces variables.
Cette fois nous allons travailler par rapport à un angle donné.
Exemple de sortie écran :
The directionnal derivative.
Let u be a unit vector and let a be the angle,
measured in the counterclockwise direction,
from the positive x axis to the position vector
corresponding to u.
Da_f(x,y) = f_x cos(a) + f_y sin(a).
Press return to continue.
Exemple de sortie écran :
f : x,y-> (x*y - y**2)**4
Find the directionnal derivative of f at p(+2.0,-1.0)
with the angle a = +1.047
Da_fxy = -320.123
Press return to continue.
Exemple de sortie écran :
u is a unit vector then : ||u|| = 1,
The i-component of u is : ||u||cos(a) = 1 cos(a) = +0.500
The j-component of u is : ||u||sin(a) = 1 sin(a) = +0.866
f : x,y-> (x*y - y**2)**4
Find the directionnal derivative of f at P(+2.0,-1.0)
in the direction from u = +0.500i +0.866j
With the vector u : Du_fxy = -320.123
With the angle a : Da_fxy = -320.123
Press return to continue.