Installer et compiler ces fichiers dans votre répertoire de travail.
![]() |
c18b.c ' |
---|
/* ---------------------------------- */
/* save as c18b.c */
/* ---------------------------------- */
#include "x_hfile.h"
#include "fb.h"
/* ---------------------------------- */
int main(void)
{
double a = 0.;
double b = 1.;
int n = 2*50;
double x1 = 0.;
double y1 = 1.;
double z1 = 1./2.;
double x2 = PI/2;
double y2 = 3.;
double z2 = 2.;
double m = 0;
/* ---------------------------------- */
clrscrn();
printf(" Let F(x,y,z) = M(x,y,z)n + N(x,y,z)h + N(x,y,z)k\n\n");
printf(" Be continuous on an open connected region D,\n");
printf(" And let C be a piecewise-smooth curve in D\n");
printf(" With endpoints A(x1,y1,z1) and B(x2,y2,z2).\n\n");
printf(" If F(x,y,z) = grad f(x,y,z) then \n\n");
printf(" ( ((x2,y2,z2) (x2,y2,z2)\n");
printf(" int( M(x,y,z)dx + N(x,y,z)dy = int( F.dr = [f(x,y)]\n");
printf(" (c ((x1,y1,z1) (x1,y1,z1)\n");
printf(" \n");
stop();
/* ---------------------------------- */
clrscrn();
printf(" Let F(x,y,z) = %si + %sj + %sk \n\n",Meq,Neq,Peq);
printf(" and has C parametrization :\n\n");
printf(" x = %s; y = %s; z = %s; %.1f < t =< %.1f \n\n\n",
geq, heq, keq, a, b);
printf(" Let f(x,y,z) = %s \n\n",feq);
printf(" Verify if F(x,y,z) = grad f(x,y,z)\n\n");
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(" then \n\n");
printf(" (b\n");
printf(" int( F.dr = %+.3f\n", m);
printf(" (a\n\n");
printf(" f(x2,y2,y2) - f(x1,y1,z1) = %+.3f\n\n", f(x2,y2,z2) - f(x1,y1,z1));
stop();
return 0;
}
/* ---------------------------------- */
/* ---------------------------------- */
Nous devons commencer par vérifier manuellement que F(x,y) = grad f(x,y). Ensuite nous vérifions que le calcul de l'intégrale de F(x,y) est bien égal à f(x2,y2) - f(x1,y1).
Exemple de sortie écran :
Let F(x,y,z) = M(x,y,z)n + N(x,y,z)h + N(x,y,z)k
Be continuous on an open connected region D,
And let C be a piecewise-smooth curve in D
With endpoints A(x1,y1,z1) and B(x2,y2,z2).
If F(x,y,z) = grad f(x,y,z) then
( ((x2,y2,z2) (x2,y2,z2)
int( M(x,y,z)dx + N(x,y,z)dy = int( F.dr = [f(x,y)]
(c ((x1,y1,z1) (x1,y1,z1)
Press return to continue.
Exemple de sortie écran :
Let F(x,y,z) = (y**2*cos(x))i + (2*y*sin(x) + exp(2*z))j + (2*y*exp(2*z))k
and has C parametrization :
x = 1/2*t*Pi; y = 2*t+1; z = 1.5*t+.5; 0.0 < t =< 1.0
Let f(x,y,z) = y**2*sin(x) + y*exp(2*z)
Verify if F(x,y,z) = grad f(x,y,z)
then
(b
int( F.dr = +170.076
(a
f(x2,y2,y2) - f(x1,y1,z1) = +170.076
Press return to continue.
Cet article est issu de Wikibooks. Le texte est sous licence Creative Commons - Attribution - Partage dans les Mêmes. Des conditions supplémentaires peuvent s'appliquer aux fichiers multimédias.