help-gsl
[Top][All Lists]

## Re: [Help-gsl] Can you do this in GSL?

 From: mail Subject: Re: [Help-gsl] Can you do this in GSL? Date: Tue, 18 Jan 2005 07:25:44 +0100

On 17 Jan 2005 at 20:13, Kenneth Geisshirt wrote:

> Anders Misfeldt wrote:
>
> > I wrote the integral wrong. Sorry! The correct function is:
> >
> > 0.067*b^3 = \int_0^b x^2/(exp(x)+1) dx
>
> Assume that F(b) = \int_0^b x^2/(exp(x)+1) dx. Your equation is then
> 0.067*b^3 = F(b) - F(0) = F(b). Now differentiate wrt b, and you have
> 0.2*b^2 = F'(b) = f(b).
>
> You can calculate f(b) as a finite difference, f(b) =
> (F(b+h)-F(b-h))/2h. In general you can calculate F(b) using an
> integration function found in GSL. Last, your solve the equation G(b) =
> f(b)-0.2*b^2 = 0 using a nonlinear equation solver in GSL.

If you differentiate w.r.t. b the rhs gives the integrand with x=b
so the solution comes by taking log - no GSL needed ...