From: Paul on 5 Aug 2010 17:28 "Paul " <unicybsatr(a)gmail.com> wrote in message <i3f85s$8b2$1(a)fred.mathworks.com>... > Walter Roberson <roberson(a)hushmail.com> wrote in message <i3f7j2$35a$1(a)canopus.cc.umanitoba.ca>... > > Paul wrote: > > > > > I tried this code: (function x*y^2) > > > And integration from 0 to 1: > > > I=@(x,y) x.^2*y; > > > I2=@(y) I(y).^2; > > > dblquad(I2,0,1,0,1); > > > > Does that match what I said, > > > > >> Take the function handle you have now for dblquad'ing x^-2 <etc> > > >> and wrap another handle around it that takes the same parameters and calls > > >> the first handle and squares the result. > > > > Does your I2 have the *same* parameters as your I ? > > > > > > > > I = @(x,y) x.^2*y; > > I2 = @(x,y) I(x,y).^2; > > dblquad(I2,0,1,0,1) > > > > ans = > > 0.0666666666666667 > Thanks!!!!! Can I find value of this integral in analytical value i.e. before last integrating - I(x,y).^2. Maybe using some series expansion?
From: Walter Roberson on 5 Aug 2010 19:33 Paul wrote: > "Paul " <unicybsatr(a)gmail.com> wrote in message > <i3f85s$8b2$1(a)fred.mathworks.com>... >> Walter Roberson <roberson(a)hushmail.com> wrote in message >> <i3f7j2$35a$1(a)canopus.cc.umanitoba.ca>... >> > Paul wrote: >> > > > I tried this code: (function x*y^2) >> > > And integration from 0 to 1: >> > > I=@(x,y) x.^2*y; >> > > I2=@(y) I(y).^2; >> > > dblquad(I2,0,1,0,1); >> > > Does that match what I said, >> > > >> Take the function handle you have now for dblquad'ing x^-2 <etc> >> > >> and wrap another handle around it that takes the same parameters >> and calls >> > >> the first handle and squares the result. >> > > Does your I2 have the *same* parameters as your I ? >> > > > > I = @(x,y) x.^2*y; >> > I2 = @(x,y) I(x,y).^2; >> > dblquad(I2,0,1,0,1) >> > > ans = >> > 0.0666666666666667 >> Thanks!!!!! > > Can I find value of this integral in analytical value i.e. before last > integrating - I(x,y).^2. Maybe using some series expansion? For the original function with erfc, it appears that the answer is NO. You can construct a series or taylor expansion, but the expansion has to be around a particular point; some trials show that the expansion would get to very large numbers on short order, with a lot of cancellation. Experimenting, at least with positive t, it appears that an outcome of the log(x)/5 term in conjunction with the rest is that there is a natural breakpoint in the integral at x=exp(5), and that for x above that, the expression becomes very small. Towards 0, at least for t=2, there appears to be a peak around 1/10^9 but I have not yet found any transformation that would allow me to calculate where that peak really is; the peak is tall enough that even though the area is fairly narrow, it would represent quite a bit of the integral. If you could prove these tendencies then it would point to a possible change of variables u = 1/x and evaluation "close to 0" that might perhaps be amenable to computation in a relatively small number of steps while preserving decent precision. Maybe.
From: Paul on 6 Aug 2010 10:12
Walter Roberson <roberson(a)hushmail.com> wrote in message <i3fho6$iga$1(a)canopus.cc.umanitoba.ca>... > Paul wrote: > > "Paul " <unicybsatr(a)gmail.com> wrote in message > > <i3f85s$8b2$1(a)fred.mathworks.com>... > >> Walter Roberson <roberson(a)hushmail.com> wrote in message > >> <i3f7j2$35a$1(a)canopus.cc.umanitoba.ca>... > >> > Paul wrote: > >> > > > I tried this code: (function x*y^2) > >> > > And integration from 0 to 1: > >> > > I=@(x,y) x.^2*y; > >> > > I2=@(y) I(y).^2; > >> > > dblquad(I2,0,1,0,1); > >> > > Does that match what I said, > >> > > >> Take the function handle you have now for dblquad'ing x^-2 <etc> > >> > >> and wrap another handle around it that takes the same parameters > >> and calls > >> > >> the first handle and squares the result. > >> > > Does your I2 have the *same* parameters as your I ? > >> > > > > I = @(x,y) x.^2*y; > >> > I2 = @(x,y) I(x,y).^2; > >> > dblquad(I2,0,1,0,1) > >> > > ans = > >> > 0.0666666666666667 > >> Thanks!!!!! > > > > Can I find value of this integral in analytical value i.e. before last > > integrating - I(x,y).^2. Maybe using some series expansion? > > For the original function with erfc, it appears that the answer is NO. You can > construct a series or taylor expansion, but the expansion has to be around a > particular point; some trials show that the expansion would get to very large > numbers on short order, with a lot of cancellation. > > Experimenting, at least with positive t, it appears that an outcome of the > log(x)/5 term in conjunction with the rest is that there is a natural > breakpoint in the integral at x=exp(5), and that for x above that, the > expression becomes very small. Towards 0, at least for t=2, there appears to > be a peak around 1/10^9 but I have not yet found any transformation that would > allow me to calculate where that peak really is; the peak is tall enough that > even though the area is fairly narrow, it would represent quite a bit of the > integral. > > If you could prove these tendencies then it would point to a possible change > of variables u = 1/x and evaluation "close to 0" that might perhaps be > amenable to computation in a relatively small number of steps while preserving > decent precision. Maybe. Hello! Thanks for the answers. But I've found the problem. I will simplify it I need to do the following (I will denote integral through S). I need to find: S(S(x.^2*y)*S(x.^2*y)) All limits are from 0 to 1 You wrote: I = @(x,y) x.^2*y; I2 = @(x,y) I(x,y).^2; dblquad(I2,0,1,0,1) But this code makes the following: S(S(x*y^2*x*y^2)) See the difference? I must take two integrals and then take integral from their multiplication, not multiply functions and take double integral. Can you provide the appropriate code, if such exists? Thank you and please don't propose to use symbolic integration. It won't work in my case. |