Mathc initiation/a328
Installer et compiler ces fichiers dans votre répertoire de travail.
c00d.c |
---|
/* ---------------------------------- */
/* save as c00d.c */
/* ---------------------------------- */
#include "x_hfile.h"
#include "fd.h"
/* ---------------------------------- */
int main(void)
{
double W = 0;
clrscrn();
printf(" Evaluate the work (W) done by F along C,\n\n");
printf(" With :\n\n");
printf(" F (x,y,z) -> %si %sj %sk\n\n", Meq, Neq, Peq);
printf(" and C has the parametrization :\n\n");
printf(" x = %s; y = %s; z = %s; %.1f < t =< %.1f \n\n",
geq, heq, keq, a, b);
printf(" (\n");
printf(" W = int( F.dr\n");
printf(" (C\n\n");
printf(" Where r = xi + yj + zk and then dr = dxi + dyj + dzk\n\n");
printf(" (\n");
printf(" These give W = int( F.(dxi + dyj + dzk)\n");
printf(" (C\n\n");
stop();
clrscrn();
printf(" Evaluate :\n\n");
printf(" (\n");
printf(" W = int( (%si %sj %sk).(dxi + dyj + dzk)\n", Meq, Neq, Peq);
printf(" (C\n\n");
printf(" (\n");
printf(" W = int( %s dx %s dy %s dz \n", Meq, Neq, Peq);
printf(" (C\n\n\n");
printf(" if C has the parametrization :\n\n");
printf(" x = %s; y = %s; z = %s; %.1f < t =< %.1f \n\n\n",
geq, heq,keq, a, b);
W = lint3d_ds( M,
g,h,k,
a,b,LOOP);
W += lint3d_ds( N,
g,h,k,
a,b,LOOP);
W += lint3d_ds( P,
g,h,k,
a,b,LOOP);
printf(" (\n");
printf(" W = int( F.dr = %+.3f\n", W);
printf(" (C\n\n");
stop();
return 0;
}
/* ---------------------------------- */
/* ---------------------------------- */
Exemple de sortie écran :
Evaluate the work (W) done by F along C,
With :
F (x,y,z) -> +yi +zj +xk
and C has the parametrization :
x = (t); y = (t**2); z = (t**3); 0.0 < t =< 2.0
(
W = int( F.dr
(C
Where r = xi + yj + zk and then dr = dxi + dyj + dzk
(
These give W = int( F.(dxi + dyj + dzk)
(C
Press return to continue.
Exemple de sortie écran :
Evaluate :
(
W = int( (+yi +zj +xk).(dxi + dyj + dzk)
(C
(
W = int( +y dx +z dy +x dz
(C
if C has the parametrization :
x = (t); y = (t**2); z = (t**3); 0.0 < t =< 2.0
(
W = int( F.dr = +69.386
(C
Press return to continue.