Aller au contenu

Mathc initiation/a147

Un livre de Wikilivres.


Sommaire


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

c00f.c
/* ---------------------------------- */
/* save as c00f.c                     */
/* ---------------------------------- */
#include  "x_hfile.h"
#include       "ff.h"
/* ---------------------------------- */
int main(void)
{
double t = PI/2.;
double speed;

v3d n;

 clrscrn();
 printf(" If \n\n" 
        " r(t) = f(t)i + g(t)j + h(t)k\n\n" 
        " is the position vector of a moving point\n" 
        " P, find its velocity, acceleration, and \n" 
        " speed at the given time t.\n\n");

 printf(" With \n\n");
 printf(" f : t-> %s    \n", feq);
 printf(" g : t-> %s    \n", geq);
 printf(" h : t-> %s  \n\n", heq);
 printf(" t = %+.2f   \n\n", t);

     n.i = fx_x(f,t,H);
     n.j = fx_x(g,t,H);
     n.k = fx_x(h,t,H);

   speed = norm3d(n);

 printf(" r' (%+.2f) =   v(%+.3f)   = %+.3fi  %+.3fj %+.3fk\n\n",
           t,t,n.i,n.j,n.k);
 printf(" The speed  = ||v(%+.3f)|| =  %+.3f        \n\n",t,speed);

     n.i = fx_xx(f,t,H);
     n.j = fx_xx(g,t,H);
     n.k = fx_xx(h,t,H);

 printf(" r''(%+.2f) =   a(%+.3f)   = %+.3fi  %+.3fj  %+.3fk\n\n",
         t,t,n.i,n.j,n.k);

 stop();

 return 0;
}
/* ---------------------------------- */
/* ---------------------------------- */


Exemple de sortie écran :

 If 

 r(t) = f(t)i + g(t)j + h(t)k

 is the position vector of a moving point
 P, find its velocity, acceleration, and 
 speed at the given time t.

 With 

 f : t-> exp(t)*cos(t)    
 g : t-> exp(t)*sin(t)    
 h : t-> exp(t)  

 t = +1.57   

 r' (+1.57) =   v(+1.571)   = -4.810i  +4.810j +4.810k

 The speed  = ||v(+1.571)|| =  +8.332        

 r''(+1.57) =   a(+1.571)   = -9.621i  -0.000j  +4.810k

 Press return to continue.