Aller au contenu

Mathc initiation/Fichiers h : c47fb

Un livre de Wikilivres.


Sommaire

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

c16b3.c
/* --------------------------------- */
/* save as c16b3.c                   */
/* --------------------------------- */
#include "x_hfile.h"
#include      "fb.h"
/* --------------------------------- */
int main(void)
{
double  a = -2;
double  b = 0;
pt2d    p = {a,b};

int     n = 5;

 clrscrn();
 printf(" Use Newton's method to approximate,\n");
 printf(" the solutions of the following system :\n\n\n");

 printf("  |        %s = 0    \n", feq);
 printf("  | %s = 0\n\n\n", geq);

     p = newton_fxy(  n,
                      f,
                      g,
                      p);

  printf(" the solutions of the following system is :\n\n\n");
  printf("         x = %f  y = %f  \n\n\n",p.x,p.y);
  
                    G_2dp( -8,8,
                           -4,4,
                           feq,f,
                           geq,g,
                           p
                           );

 printf(" ... load \"a_main.plt\" ... with gnuplot.  \n\n");

 stop();

 return 0;
}
/* --------------------------------- */
/* --------------------------------- */
Use Newton's method to approximate, the solutions of the following system

Exemple de sortie écran :

 Use Newton's method to approximate,
 the solutions of the following system :


  |        (x**2)/4  + (y**2)/9  - 1 = 0    
  | ((x-1)**2)/10 + ((y+1)**2)/5 - 1 = 0


 the solutions of the following system is :


         x = -1.991565  y = -0.275244  


 Open the file "a_main.plt" with gnuplot.

 Press return to continue.