Mathc initiation/Fichiers c : c28cd


Sommaire


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

c16d.c
/* --------------------------------- */
/* save as c16d.c                    */
/* --------------------------------- */
#include "x_hfile.h"
#include      "fd.h"
/* --------------------------------- */
int main(void)
{
double h = .0001;
v3d    u = i_v3d(-3,0,1);
pt3d   P = i_pt3d(5,7,1);;

    
 clrscrn();
 printf(" Let w=f(x,y,z), and u=ai+bj+ck be a unit vector. \n\n");
 printf(" The directional derivative of f at P(x,y,z) in\n");
 printf(" the direction of u, denoted by D_u f(x,y,z), is\n\n");
 printf("                     f(x+sa,y+sb,z+sb)-f(x,y,z)\n");
 printf("    D_u f(x,y) = lim --------------------------\n");
 printf("                 s->0        s          \n\n\n\n");

 printf(" If f is a differentiable function of three variables\n");
 printf(" and u=ai+bj+ck is a unit vector then \n\n");
 printf("    D_u f(x,y,z) = f_x(x,y,z)a+f_y(x,y,z)b \n\n\n\n");

 printf("    D_u f(x,y,z) = Grad f(x,y,z).u\n\n\n");
 stop();


 clrscrn();
 printf("  f   : x,y,z-> %s\n\n\n",feq);
 printf(" Find the directionnal derivative of f at p(%+.1f,%+.1f,%+.1f)\n\n"
           ,P.x,P.y,P.z);
 printf(" in the direction from u = %+.1fi %+.1fj  %+.1fk \n\n\n"
           ,u.i,u.j,u.k);
                                                
 printf("  Du_xyz = %+.3f \n\n\n",Du_xyz(f,h,P,u));
 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.


Exemple de sortie écran :

 Let w=f(x,y,z), and u=ai+bj+ck be a unit vector. 

 The directional derivative of f at P(x,y,z) in
 the direction of u, denoted by D_u f(x,y,z), is

                     f(x+sa,y+sb,z+sb)-f(x,y,z)
    D_u f(x,y) = lim --------------------------
                 s->0        s          



 If f is a differentiable function of three variables
 and u=ai+bj+ck is a unit vector then 

    D_u f(x,y,z) = f_x(x,y,z)a+f_y(x,y,z)b 



    D_u f(x,y,z) = Grad f(x,y,z).u


 Press return to continue.

Exemple de sortie écran :

  f   : x,y,z-> (x+y)*(y+z)


 Find the directionnal derivative of f at p(+5.0,+7.0,+1.0)

 in the direction from u = -3.0i +0.0j  +1.0k 


  Du_xyz = -3.795 


 Press return to continue.