help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-gsl] Integration routine qawc


From: Silke Diedenhofen
Subject: [Help-gsl] Integration routine qawc
Date: Mon, 07 Nov 2005 11:20:57 +0100

Hello!

I have a problem using qawc. 

This is the function I like to integrate:

double f (double omega, void * params) {
      double Wg = *(double *) params;
      double omega_0 = *(double *) params;
      double h_quer = *(double *) params;
      double theta_1 = *(double *) params;
      double tmp_4_1 = *(double *) params;
      double tmp_4_2 = *(double *) params;
      double theta_2 =  *(double *) params;
      double f = 1.3e60 * (PI/omega)*(tmp_4_1 *
(pow(gsl_sf_airy_Ai_deriv((Wg-h_quer*omega)/(h_quer * theta_1),
GSL_PREC_DOUBLE), 2)- (Wg-h_quer*omega)/(h_quer * theta_1) *
pow(gsl_sf_airy_Ai((Wg-h_quer*omega)/(h_quer * theta_1),
GSL_PREC_DOUBLE),2))+ tmp_4_2 *
(pow(gsl_sf_airy_Ai_deriv((Wg-h_quer*omega)/(h_quer * theta_2),
GSL_PREC_DOUBLE), 2)- (Wg-h_quer*omega)/(h_quer * theta_2) *
pow(gsl_sf_airy_Ai((Wg-h_quer*omega)/(h_quer * theta_2),
GSL_PREC_DOUBLE),2))) / (pow(omega, 2)- omega_0);
      return f; } 
double omega_0 = pow(2*PI*C/lambda_m, 2); 
double Wg = 2 * PI * C/0.00000087;
double h_quer = H/(2*PI);
double theta_1 = pow((pow(q, 2) * pow(E_field,2))/(2*m1_stern*h_quer_Js),
0.333333);
double theta_2 = pow((pow(q, 2) * pow(E_field,2))/(2*m2_stern*h_quer_Js) ,
0.3333333);
double tmp_4_1 = pow(m1_stern, 1.5) * (1+(m0/m1))* pow(theta_1, 0.5);
double tmp_4_2 = pow(m2_stern, 1.5) * (1+(m0/m2))* pow(theta_2, 0.5);
gsl_integration_qawc (&F, 1.88e15, 2.69e15, omega_0, 0, 1e-7, 1000, w,
&result, &error);

And this is the error:

gsl: ../integration/qawc.c:217: ERROR: could not integrate function
Default GSL error handler invoked.

abnormal program termination

Do you know what is wrong???

Thanks and regards,

Silke




reply via email to

[Prev in Thread] Current Thread [Next in Thread]