Go Back   Rhinocerus > Newsgroup > Newsgroup comp.lang.* 1 > Newsgroup comp.lang.fortran

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 10-20-2006, 07:24 AM
meek@skyway.usask.ca
Guest
 
Posts: n/a
Default RE: integral along a hyperbola

In a previous article, "oogunlade@hotmail.com" <oogunlade@hotmail.com> wrote:
>Hi, I want to integrate a function f(z) along an hyperbola in the
>complex plane from point a(x1,y1) to b(x2,y2). The equation of the
>hyperbola is x*y=c where c is a known constant.
>I have tried parametric form x=c/t ; y=t where t is a parmetization of
>my contour. The limits of t hence are y1 to y2 . hence z(t) becomes(c/t
>+ i*t) and dz(t)=(i- c/t^2)dt.(i.e z'(t)dt)
>
>Hence my integral becomes integration: int [f(z)dz)] along the
>hyperbola becomes int[ f{z(t)}z'(t)dt ]
>
>I have done then used reimans sum to compute my integral but no joy.
>Can anyone please tell me how to proceed or what I have done wrong or
>any better easier ways.
>

"No joy" is a little vague. Do you mean the program crashed
or that you know the right answer and didn't get it ... or ?
Maybe you want to integrate along ds =sqrt(dx^2+dy^2) ?
Chris
Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

  #2 (permalink)  
Old 10-20-2006, 12:07 PM
meek@skyway.usask.ca
Guest
 
Posts: n/a
Default RE: integral along a hyperbola

You misread : ds = sqrt (dx^2+dy^2); since y=c/x, dy=-c dx/x^2
so subst for dy to get ds in terms of dx.
Chris
In a previous article, "oogunlade@hotmail.com" <oogunlade@hotmail.com> wrote:
>Hi thanks for your post, integrating along ds=sqrt(x^2+y^2) will mean
>integrating along the hypotenus of a right angled triange and will give
>wrong results
>meek@skyway.usask.ca wrote:
>> In a previous article, "oogunlade@hotmail.com" <oogunlade@hotmail.com> wrote:
>> >Hi, I want to integrate a function f(z) along an hyperbola in the
>> >complex plane from point a(x1,y1) to b(x2,y2). The equation of the
>> >hyperbola is x*y=c where c is a known constant.
>> >I have tried parametric form x=c/t ; y=t where t is a parmetization of
>> >my contour. The limits of t hence are y1 to y2 . hence z(t) becomes(c/t
>> >+ i*t) and dz(t)=(i- c/t^2)dt.(i.e z'(t)dt)
>> >
>> >Hence my integral becomes integration: int [f(z)dz)] along the
>> >hyperbola becomes int[ f{z(t)}z'(t)dt ]
>> >
>> >I have done then used reimans sum to compute my integral but no joy.
>> >Can anyone please tell me how to proceed or what I have done wrong or
>> >any better easier ways.
>> >

>> "No joy" is a little vague. Do you mean the program crashed
>> or that you know the right answer and didn't get it ... or ?
>> Maybe you want to integrate along ds =sqrt(dx^2+dy^2) ?
>> Chris

>

Reply With Quote
  #3 (permalink)  
Old 10-20-2006, 12:50 PM
oogunlade@hotmail.com
Guest
 
Posts: n/a
Default integral along a hyperbola

Hi, I want to integrate a function f(z) along an hyperbola in the
complex plane from point a(x1,y1) to b(x2,y2). The equation of the
hyperbola is x*y=c where c is a known constant.
I have tried parametric form x=c/t ; y=t where t is a parmetization of
my contour. The limits of t hence are y1 to y2 . hence z(t) becomes(c/t
+ i*t) and dz(t)=(i- c/t^2)dt.(i.e z'(t)dt)

Hence my integral becomes integration: int [f(z)dz)] along the
hyperbola becomes int[ f{z(t)}z'(t)dt ]

I have done then used reimans sum to compute my integral but no joy.
Can anyone please tell me how to proceed or what I have done wrong or
any better easier ways.

Reply With Quote
  #4 (permalink)  
Old 10-20-2006, 01:30 PM
oogunlade@hotmail.com
Guest
 
Posts: n/a
Default Re: integral along a hyperbola

NO JOY MEANS I GOT WAY OFF THE EXPECTED VALUE
meek@skyway.usask.ca wrote:
> In a previous article, "oogunlade@hotmail.com" <oogunlade@hotmail.com> wrote:
> >Hi, I want to integrate a function f(z) along an hyperbola in the
> >complex plane from point a(x1,y1) to b(x2,y2). The equation of the
> >hyperbola is x*y=c where c is a known constant.
> >I have tried parametric form x=c/t ; y=t where t is a parmetization of
> >my contour. The limits of t hence are y1 to y2 . hence z(t) becomes(c/t
> >+ i*t) and dz(t)=(i- c/t^2)dt.(i.e z'(t)dt)
> >
> >Hence my integral becomes integration: int [f(z)dz)] along the
> >hyperbola becomes int[ f{z(t)}z'(t)dt ]
> >
> >I have done then used reimans sum to compute my integral but no joy.
> >Can anyone please tell me how to proceed or what I have done wrong or
> >any better easier ways.
> >

> "No joy" is a little vague. Do you mean the program crashed
> or that you know the right answer and didn't get it ... or ?
> Maybe you want to integrate along ds =sqrt(dx^2+dy^2) ?
> Chris


Reply With Quote
  #5 (permalink)  
Old 10-20-2006, 01:32 PM
oogunlade@hotmail.com
Guest
 
Posts: n/a
Default Re: integral along a hyperbola

Hi thanks for your post, integrating along ds=sqrt(x^2+y^2) will mean
integrating along the hypotenus of a right angled triange and will give
wrong results
meek@skyway.usask.ca wrote:
> In a previous article, "oogunlade@hotmail.com" <oogunlade@hotmail.com> wrote:
> >Hi, I want to integrate a function f(z) along an hyperbola in the
> >complex plane from point a(x1,y1) to b(x2,y2). The equation of the
> >hyperbola is x*y=c where c is a known constant.
> >I have tried parametric form x=c/t ; y=t where t is a parmetization of
> >my contour. The limits of t hence are y1 to y2 . hence z(t) becomes(c/t
> >+ i*t) and dz(t)=(i- c/t^2)dt.(i.e z'(t)dt)
> >
> >Hence my integral becomes integration: int [f(z)dz)] along the
> >hyperbola becomes int[ f{z(t)}z'(t)dt ]
> >
> >I have done then used reimans sum to compute my integral but no joy.
> >Can anyone please tell me how to proceed or what I have done wrong or
> >any better easier ways.
> >

> "No joy" is a little vague. Do you mean the program crashed
> or that you know the right answer and didn't get it ... or ?
> Maybe you want to integrate along ds =sqrt(dx^2+dy^2) ?
> Chris


Reply With Quote
  #6 (permalink)  
Old 10-20-2006, 05:14 PM
meek@skyway.usask.ca
Guest
 
Posts: n/a
Default RE: integral along a hyperbola

In a previous article, "oogunlade@hotmail.com" <oogunlade@hotmail.com> wrote:
>Hi Thanks, i think i see what you mean, let me see if i get this right,
>my integral int {f(z)dz} becomes int{f(z)ds} i.e int {
>f(x+i*c/x)*sqrt{dx^2[1+c^2/x^4]}, so by simply dividing my x axis to m
>small intervals i get dx, different values of x and then summing up get
>my integral.
>I will give it a go.

... ok - so you mean Z is complex ... in that case don't
quote me, but provided x is montonic increasing
you can use a standard integral routine for Re(F)/sqrt[1+c^2/x^4]
and ditto for Im(F)/[ ...] ; e.g. Simpsons rule, or Gaussian
quadrature, ...
Of course- I'm assuming you *do* want to integrate along s.
It will not give you the same result as integrating F(z)dx.

Chris
>meek@skyway.usask.ca wrote:

<snip old>
Reply With Quote
  #7 (permalink)  
Old 10-20-2006, 10:56 PM
oogunlade@hotmail.com
Guest
 
Posts: n/a
Default Re: integral along a hyperbola

Hi Thanks, i think i see what you mean, let me see if i get this right,
my integral int {f(z)dz} becomes int{f(z)ds} i.e int {
f(x+i*c/x)*sqrt{dx^2[1+c^2/x^4]}, so by simply dividing my x axis to m
small intervals i get dx, different values of x and then summing up get
my integral.
I will give it a go.
meek@skyway.usask.ca wrote:
> You misread : ds = sqrt (dx^2+dy^2); since y=c/x, dy=-c dx/x^2
> so subst for dy to get ds in terms of dx.
> Chris
> In a previous article, "oogunlade@hotmail.com" <oogunlade@hotmail.com> wrote:
> >Hi thanks for your post, integrating along ds=sqrt(x^2+y^2) will mean
> >integrating along the hypotenus of a right angled triange and will give
> >wrong results
> >meek@skyway.usask.ca wrote:
> >> In a previous article, "oogunlade@hotmail.com" <oogunlade@hotmail.com> wrote:
> >> >Hi, I want to integrate a function f(z) along an hyperbola in the
> >> >complex plane from point a(x1,y1) to b(x2,y2). The equation of the
> >> >hyperbola is x*y=c where c is a known constant.
> >> >I have tried parametric form x=c/t ; y=t where t is a parmetization of
> >> >my contour. The limits of t hence are y1 to y2 . hence z(t) becomes(c/t
> >> >+ i*t) and dz(t)=(i- c/t^2)dt.(i.e z'(t)dt)
> >> >
> >> >Hence my integral becomes integration: int [f(z)dz)] along the
> >> >hyperbola becomes int[ f{z(t)}z'(t)dt ]
> >> >
> >> >I have done then used reimans sum to compute my integral but no joy.
> >> >Can anyone please tell me how to proceed or what I have done wrong or
> >> >any better easier ways.
> >> >
> >> "No joy" is a little vague. Do you mean the program crashed
> >> or that you know the right answer and didn't get it ... or ?
> >> Maybe you want to integrate along ds =sqrt(dx^2+dy^2) ?
> >> Chris

> >


Reply With Quote
  #8 (permalink)  
Old 10-20-2006, 11:08 PM
glen herrmannsfeldt
Guest
 
Posts: n/a
Default Re: integral along a hyperbola

oogunlade@hotmail.com <oogunlade@hotmail.com> wrote:
> Hi Thanks, i think i see what you mean, let me see if i get this right,
> my integral int {f(z)dz} becomes int{f(z)ds} i.e int {
> f(x+i*c/x)*sqrt{dx^2[1+c^2/x^4]}, so by simply dividing my x axis to m
> small intervals i get dx, different values of x and then summing up get
> my integral.


I thought of that, but I don't believe it is the usual way
to do complex integration. You can look at:

http://mathworld.wolfram.com/ContourIntegration.html

Depending on the actual problem, you have to decide which
one you need.

-- glen
Reply With Quote
  #9 (permalink)  
Old 10-20-2006, 11:46 PM
oogunlade@hotmail.com
Guest
 
Posts: n/a
Default Re: integral along a hyperbola

Hi, sorry to be a pain but to integrate along x seperately and then
along y differently??? is that same as f(x)dx+i*f(y)dy. Isnt that
assuming that my contour is an hypothenus of a right angled triangle?
My contour is however an hyperbola!
meek@skyway.usask.ca wrote:
> In a previous article, "oogunlade@hotmail.com" <oogunlade@hotmail.com> wrote:
> >Hi Thanks, i think i see what you mean, let me see if i get this right,
> >my integral int {f(z)dz} becomes int{f(z)ds} i.e int {
> >f(x+i*c/x)*sqrt{dx^2[1+c^2/x^4]}, so by simply dividing my x axis to m
> >small intervals i get dx, different values of x and then summing up get
> >my integral.
> >I will give it a go.

> ... ok - so you mean Z is complex ... in that case don't
> quote me, but provided x is montonic increasing
> you can use a standard integral routine for Re(F)/sqrt[1+c^2/x^4]
> and ditto for Im(F)/[ ...] ; e.g. Simpsons rule, or Gaussian
> quadrature, ...
> Of course- I'm assuming you *do* want to integrate along s.
> It will not give you the same result as integrating F(z)dx.
>
> Chris
> >meek@skyway.usask.ca wrote:

> <snip old>


Reply With Quote
  #10 (permalink)  
Old 10-21-2006, 12:21 AM
glen herrmannsfeldt
Guest
 
Posts: n/a
Default Re: integral along a hyperbola

oogunlade@hotmail.com <oogunlade@hotmail.com> wrote:
> Hi, sorry to be a pain but to integrate along x seperately and then
> along y differently??? is that same as f(x)dx+i*f(y)dy. Isnt that
> assuming that my contour is an hypothenus of a right angled triangle?
> My contour is however an hyperbola!


If you really are doing a contour integral then it only matters
where the contour is in relation to poles. If the function doesn't
have any poles, the integral is independent of the actual contour,
only on the start and end points. (You also have to watch
for branch points and branch cuts. If you integrate sqrt()
you will find two possible answers, but only two.) This would
be like the first you showed with dz=z'(t)dt

Otherwise, if you do the dz=sqrt((dx/dt)**2+(dy/dt)**2)dt then
it does depend on the actual path.

Try f(z)=1 from z1 to z2.

Integrate 1 to get z, evaluate at the start and end points, to get z2-z1.
No poles or branch cuts to worry about.

For the second form it will be the length of the path.

-- glen
Reply With Quote
  #11 (permalink)  
Old 10-21-2006, 07:52 PM
meek@skyway.usask.ca
Guest
 
Posts: n/a
Default RE: integral along a hyperbola

In a previous article, "oogunlade@hotmail.com" <oogunlade@hotmail.com> wrote:
>Hi, sorry to be a pain but to integrate along x seperately and then
>along y differently??? is that same as f(x)dx+i*f(y)dy. Isnt that
>assuming that my contour is an hypothenus of a right angled triangle?
>My contour is however an hyperbola!
>meek@skyway.usask.ca wrote:

<snip old>
I am only guessing what you are trying to do - it's not clear.
It appears that you are trying to integrate the function
F(z) where z is a complex number along a piece of
a hyperbola xy=c and z=x + i y. What is meant by
"along a piece" is that the integation is with respect
to ds = dx^2+dy^2. Maybe that's not what you want?
In this latest post the terms f(x) and f(y) are not defined.
Good luck with it.

Chris
Reply With Quote
  #12 (permalink)  
Old 10-22-2006, 08:47 PM
oogunlade@hotmail.com
Guest
 
Posts: n/a
Default Re: integral along a hyperbola

Hi Chris you hit the nail on the head on what i am trying to
do:Integrate the function
F(z) where z is a complex number along a piece of a hyperbola xy=c
and z=x + i y.
I will give the ds approach a shot!
meek@skyway.usask.ca wrote:
> In a previous article, "oogunlade@hotmail.com" <oogunlade@hotmail.com> wrote:
> >Hi, sorry to be a pain but to integrate along x seperately and then
> >along y differently??? is that same as f(x)dx+i*f(y)dy. Isnt that
> >assuming that my contour is an hypothenus of a right angled triangle?
> >My contour is however an hyperbola!
> >meek@skyway.usask.ca wrote:

> <snip old>
> I am only guessing what you are trying to do - it's not clear.
> It appears that you are trying to integrate the function
> F(z) where z is a complex number along a piece of
> a hyperbola xy=c and z=x + i y. What is meant by
> "along a piece" is that the integation is with respect
> to ds = dx^2+dy^2. Maybe that's not what you want?
> In this latest post the terms f(x) and f(y) are not defined.
> Good luck with it.
>
> Chris


Reply With Quote
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT. The time now is 10:09 PM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.