Aller au contenu

Mathc initiation/001R

Un livre de Wikilivres.


Sommaire

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

c00b.c
/* --------------------------------- */
/* save as c00b.c                    */
/* --------------------------------- */
#include  "x_hfile.h"
#include       "fb.h"
/* --------------------------------- */
int main(void)
{
double  M = simpson_dzdydx(f,
                           uz, vz, LOOP,
                           sy, ty, LOOP,
                           ax, bx, LOOP);
                               
double  N = simpson_dzdydx(g,
                           uz, vz, LOOP,
                           sy, ty, LOOP,
                           ax, bx, LOOP);
                           
double  P = simpson_dzdydx(h,
                           uz, vz, LOOP,
                           sy, ty, LOOP,
                           ax, bx, LOOP);                           

 clrscrn();
 printf("Second property of linearity,                              \n\n" 
 
"   (b (d (f                      (b (d (f             (b (d (f       \n"
"int(g(x,y,z)+h(x,y,z)dzdydx = int(g(x,y,z)dzdydx + int(h(x,y,z)dzdydx\n"
"   (a (c (e                      (a (c (e             (a (c (e  \n\n\n");
        
 printf(" g  : (x,y,z)-> %s                 \n",  geq);
 printf(" h  : (x,y,z)-> %s               \n\n",  heq);
 
 printf(" f  : (x,y,z)-> %s               \n\n",  feq);
 printf("     f(x,y,z) = g(x,y,z)+h(x,y,z)\n\n");
 stop();
  
 clrscrn();  
 printf(" f  : (x,y,z)-> %s                 \n\n",  feq);
    
 printf("         (%.3f  (%s  (%s             \n", bx, teq, veq);
 printf(" M =  int(    int(   int(     %s  dzdydx = %.6f \n", feq, M);
 printf("         (%.3f  (%s     (%s      \n\n\n", ax, seq, ueq);

 printf(" g  : (x,y,z)-> %s                 \n\n", geq);
 
 printf("        (%.3f  (%s  (%s              \n", bx, teq, veq);
 printf(" N = int(    int(   int(     %s  dzdydx = %.6f \n", geq,  N);
 printf("        (%.3f  (%s     (%s       \n\n\n", ax, seq, ueq);
 
 
 printf(" h  : (x,y,z)-> %s                 \n\n", heq);
 
 printf("        (%.3f  (%s  (%s              \n", bx, teq, veq);
 printf(" P = int(    int(   int(     %s  dzdydx = %.6f \n", heq, P);
 printf("        (%.3f  (%s     (%s       \n\n\n", ax, seq, ueq);
 stop();

 clrscrn();
 printf("Second property of linearity                      \n\n" 
 
        "          (b (d (f                                  \n"
        " M   = int( g(x,y) + h(x,y) dzdydx           = %.6f \n"
        "          (a (c (e                                \n\n"

        "          (b (d (f            (b (d (f              \n"
        " N+P = int( g(x,y)dzdydx + int( h(x,y)dzdydx = %.6f \n"
        "          (a (c (e            (a (c (e          \n\n\n",                
        M, N+P);
  stop();

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

Verifier avec mathematica : Free: wolframalpha.com

integral (x**2 + y + z**2  +1)  dz dy dx from 0 to 1 from x to (x**2)  from (x*y) to (x**2*y**3)

Exemple de sortie écran :

Second property of linearity,                            

   (b (d (f                      (b (d (f             (b (d (f       
int(g(x,y,z)+h(x,y,z)dzdydx = int(g(x,y,z)dzdydx + int(h(x,y,z)dzdydx
   (a (c (e                      (a (c (e             (a (c (e  


 g  : (x,y,z)-> (x**2+y)                 
 h  : (x,y,z)-> (+z**2+1)               

 f  : (x,y,z)-> (x**2+y)+(z**2+1)               

     f(x,y,z) = g(x,y,z)+h(x,y,z)

 Press return to continue. 


 f  : (x,y,z)-> (x**2+y)+(z**2+1)                 

         (1.000  (x**2  (x**2*y**3             
 M =  int(    int(   int(     (x**2+y)+(z**2+1)  dzdydx = 0.059097 
         (0.000  (x     (x*y      


 g  : (x,y,z)-> (x**2+y)                 

        (1.000  (x**2  (x**2*y**3              
 N = int(    int(   int(     (x**2+y)  dzdydx = 0.027671 
        (0.000  (x     (x*y       


 h  : (x,y,z)-> (+z**2+1)                 

        (1.000  (x**2  (x**2*y**3              
 P = int(    int(   int(     (+z**2+1)  dzdydx = 0.031426 
        (0.000  (x     (x*y       


 Press return to continue. 


Second property of linearity                      

          (b (d (f                                  
 M   = int( g(x,y) + h(x,y) dzdydx           = 0.059097 
          (a (c (e                                

          (b (d (f            (b (d (f              
 N+P = int( g(x,y)dzdydx + int( h(x,y)dzdydx = 0.059097 
          (a (c (e            (a (c (e          


 Press return to continue.