This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Re: Integrals
- From: Axel dot Vogt dot Muenchen at t-online dot de (Axel Vogt)
- To: Przemyslaw Sliwa <przemyslaw dot sliwa at db dot com>
- Cc: gsl-discuss at sources dot redhat dot com
- Date: Sun, 09 Jan 2005 15:48:09 +0100
- Subject: Re: Integrals
- Organization: none
- References: <OF3ACB9FDB.16FE66F6-ON80256F82.00623B9F-00256F82.0062E00B@db.com>
- Reply-to: mail at axelvogt dot de
As nobody takes it ... just take the real part using GSL_REAL.
I guess phi is your integration variable and looking at your
adress/signature some thoughts: this is for option pricing by
applying Fourier inversion for characteristic functions f, no?
In this case the integration is over the whole positive reals
with oscillating integrand, may be non-constant periodics and
sometimes weird damping, the singularity in 0 is removable.
If you want to cover extreme sitautions as well you wish to
be very careful, even with adaptive schemes
If you not need extremly exact values you can use FFT (fast
Fourier transform) with interpolation on the grid. This has
the advantage that for (v,T fixed) you get all values for
your strike k within 1 FFT (but a notational orgy and worth
only for repeated use).
But that's just a thought ... and if i guessed wrong then
just take it as comment that you Q is somewhat vague.
Axel
Przemyslaw Sliwa wrote:
>
> Thanks for this,
>
> One additional question would be how to calculate the integral of a real part of a function:
>
> exp(- 1 \phi \ln(k) f(x, v, T; \phi))
> ---------------------------------------------
> i\phi
>
> I used the LaTeX notation. Can anyone help me with this?
>
> Thanks
>
> Przemyslaw
>
>
> Axel Hutt
> <Axel.Hutt@physik.hu To: Przemyslaw Sliwa/DMGCON/DMG UK/DeuBa@DMG UK
> -berlin.de> cc: gsl-discuss@sources.redhat.com
> Subject: Re: Integrals
> 01/06/2005 05:37 PM
>
>
>
> Przemyslaw Sliwa wrote:
>
> >All,
> > INF
> > /
> >I would like to know if it is possible to calculate the integral of type I f(x)dx using gsl. If yes can someone explain me how it is done?
> > /
> > -INF
> >
> >Thank you for help,
> >
> >Pshemek
> >
> >
> >
> you may take a look at
>
> http://sources.redhat.com/gsl/ref/gsl-ref_16.html#SEC254
>
> Hope that helps.
>
> Axel
>
> --
>
> This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.