Mathc initiation/Fichiers c : c28ca


Sommaire


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

Crystal Clear mimetype source c.png c16a.c
'
/* --------------------------------- */
/* save as c16a.c                    */
/* --------------------------------- */
#include "x_hfile.h"
#include      "fa.h"
/* --------------------------------- */
int main(void)
{
double  h = .0001;
v2d     u = i_v2d(sqrt(2.)/2.,sqrt(2.)/2.);
pt2d    P = i_pt2d(3,-1);


 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-> x**2 - 5*x*y + 3*y**2


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

 in the direction from u = +0.7i +0.7j 


  Du_xy = -7.071 


 Press return to continue.