Mathc initiation/Fichiers c : c28cb


Sommaire


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

c16b.c
/* --------------------------------- */
/* save as c16b.c                    */
/* --------------------------------- */
#include "x_hfile.h"
#include      "fb.h"
/* --------------------------------- */
int main(void)
{
double h = .0001;
v2d    u = i_v2d(1,5); 
pt2d   P = i_pt2d(3,-2);

 clrscrn();
 printf(" Let w=f(x,y), and u=ai+bj be a unit vector. \n\n");
 printf(" The directional derivative of f at P(x,y) in\n");
 printf(" the direction of u, denoted by D_u f(x,y), is\n\n");
 printf("                     f(x+sa,y+sb)-f(x,y)\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 two variables\n");
 printf(" and u=ai+bj is a unit vector then \n\n");
 printf("    D_u f(x,y) = f_x(x,y)a+f_y(x,y)b \n\n\n\n");

 printf("    D_u f(x,y) = Grad f(x,y).u\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(" in the direction from u = %+.1fi %+.1fj \n\n\n"
           ,u.i,u.j);
                                                
 printf("  Du_xy = %+.3f \n\n\n",Du_xy(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), and u=ai+bj be a unit vector. 

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

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



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

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



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


 Press return to continue.

Exemple de sortie écran :

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


 Find the directionnal derivative of f at p(+3.0,-2.0)

 in the direction from u = +1.0i +5.0j 


  Du_xy = +1.642 


 Press return to continue.