Mathc initiation/Fichiers c : c59cb2
Installer et compiler ces fichiers dans votre répertoire de travail.
![]() |
c18b2.c |
---|
/* ---------------------------------- */
/* save as c18b2.c */
/* ---------------------------------- */
#include "x_hfile.h"
#include "fb.h"
/* ---------------------------------- */
int main(void)
{
double a = 0;
double b = 2*PI;
int n = 2*100;
double m = 0;
/* ---------------------------------- */
clrscrn();
printf(" Evaluate the line integral :\n\n");
printf(" / // \n");
printf(" | || \n");
printf(" O F.T ds = || (curl F).n dS \n");
printf(" | || \n");
printf(" / C // \n");
printf(" S \n\n");
printf(" / / \n");
printf(" | | \n");
printf(" O F.T ds = O F dr \n");
printf(" | | \n");
printf(" / C / C \n\n");
printf(" / \n");
printf(" | \n");
printf(" O M(x,y,z) dx + N(x,y,z) dy + P(x,y,z) dz = \n");
printf(" | \n");
printf(" / C \n\n");
stop();
/* ---------------------------------- */
clrscrn();
m =lineintegral_dx(M,g,h,k,
a,b,n,
H);
m +=lineintegral_dy(N,g,h,k,
a,b,n,
H);
m +=lineintegral_dz(P,g,h,k,
a,b,n,
H);
printf(" Let S be the part of the graph of z = %s with z >= 0. \n", feq);
printf(" Let C be the trace of S on the x-y-plane. \n\n");
printf(" Verify Stokes's theorem for the vector field, \n\n");
printf(" F(x,y,z) = %si %sj %sk\n\n\n",Meq,Neq,Peq);
printf(" if C has the parametrization :\n\n");
printf(" x = %s; y = %s; z = %s; (z = %s) \n\n", geq, heq,keq, feq);
printf(" %.1f < t =< %.1f \n\n",a, b);
printf(" With the line integral you find :\n");
printf(" / \n");
printf(" | \n");
printf(" O (%s) dx + (%s) dy + (%s) dz = %+.3f \n", Meq, Neq, Peq,m);
printf(" | \n");
printf(" / C \n\n");
stop();
return 0;
}
/* ---------------------------------- */
/* ---------------------------------- */
Vérifions le théorème de Stoke partie 2.
Exemple de sortie écran :
Evaluate the line integral :
Evaluate the line integral :
/ //
| ||
O F.T ds = || (curl F).n dS
| ||
/ C //
S
/ /
| |
O F.T ds = O F dr
| |
/ C / C
/
|
O M(x,y,z) dx + N(x,y,z) dy + P(x,y,z) dz =
|
/ C
Press return to continue.
Exemple de sortie écran :
Let S be the part of the graph of z = 4-x**2-y**2 with z >= 0.
Let C be the trace of S on the x-y-plane.
Verify Stokes's theorem for the vector field,
F(x,y,z) = + 2*yi + exp(z)j - atan(x)k
if C has the parametrization :
x = 2*cos(t); y = 2*sin(t); z = 0; (z = 4-x**2-y**2)
0.0 < t =< 6.3
With the line integral you find :
/
|
O (+ 2*y) dx + (+ exp(z)) dy + ( - atan(x)) dz = -25.133
|
/ C
Press return to continue.