http://www.mathworks.com/matlabcentral/newsreader/view_thread/296926
MATLAB Central Newsreader  Please help Explicit integral could not be found
Feed for thread: Please help Explicit integral could not be found
enus
©19942015 by MathWorks, Inc.
webmaster@mathworks.com
MATLAB Central Newsreader
http://blogs.law.harvard.edu/tech/rss
60
MathWorks
http://www.mathworks.com/images/membrane_icon.gif

Sat, 20 Nov 2010 03:46:05 +0000
Please help Explicit integral could not be found
http://www.mathworks.com/matlabcentral/newsreader/view_thread/296926#797841
rakib hasan
I was trying to do following integration and result would be function z. But every time I ran it says <br>
Warning: Explicit integral could not be found.<br>
> In sym.int at 58<br>
<br>
syms z x<br>
fxy=exp((x^3+2*xz)/x)/x;<br>
y=int(fxy,x,0,5);<br>
<br>
Please anybody help me. Is there anyway integrate it numerically by keeping z as a symbol ? thanks in advance.

Sat, 20 Nov 2010 08:27:56 +0000
Re: Please help Explicit integral could not be found
http://www.mathworks.com/matlabcentral/newsreader/view_thread/296926#797870
Greg Heath
On Nov 19, 10:46 pm, "rakib hasan" <upo...@gmail.com> wrote:<br>
> I was trying to do following integration and result would be function z. But every time I ran it says<br>
> Warning: Explicit integral could not be found.<br>
><br>
> > In sym.int at 58<br>
><br>
> syms z x<br>
> fxy=exp((x^3+2*xz)/x)/x;<br>
> y=int(fxy,x,0,5);<br>
><br>
> Please anybody help me. Is there anyway integrate it numerically by keeping z as a symbol ? thanks in advance.<br>
<br>
The integral doesn't exist because of the singularity at x = 0.<br>
<br>
Hope this helps.<br>
<br>
Greg

Sat, 20 Nov 2010 21:02:04 +0000
Re: Please help Explicit integral could not be found
http://www.mathworks.com/matlabcentral/newsreader/view_thread/296926#797939
Roger Stafford
Greg Heath <heath@alumni.brown.edu> wrote in message <f3df0346e04b43e6bc456176288a4775@s4g2000yql.googlegroups.com>...<br>
> On Nov 19, 10:46 pm, "rakib hasan" <upo...@gmail.com> wrote:<br>
> > .......<br>
> > fxy=exp((x^3+2*xz)/x)/x;<br>
> > y=int(fxy,x,0,5);<br>
> > .......<br>
> The integral doesn't exist because of the singularity at x = 0.<br>
> .......<br>
           <br>
That depends on the value of z. If z has a positive real part, the function is always integrable over the interval [0,5]. Considered as a function of z, I believe this integral has an essential singularity at z = 0.<br>
<br>
Roger Stafford

Sun, 21 Nov 2010 00:05:05 +0000
Re: Please help Explicit integral could not be found
http://www.mathworks.com/matlabcentral/newsreader/view_thread/296926#797976
rakib hasan
"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <ic9d0c$44r$1@fred.mathworks.com>...<br>
> Greg Heath <heath@alumni.brown.edu> wrote in message <f3df0346e04b43e6bc456176288a4775@s4g2000yql.googlegroups.com>...<br>
> > On Nov 19, 10:46 pm, "rakib hasan" <upo...@gmail.com> wrote:<br>
> > > .......<br>
> > > fxy=exp((x^3+2*xz)/x)/x;<br>
> > > y=int(fxy,x,0,5);<br>
> > > .......<br>
> > The integral doesn't exist because of the singularity at x = 0.<br>
> > .......<br>
>            <br>
> That depends on the value of z. If z has a positive real part, the function is always integrable over the interval [0,5]. Considered as a function of z, I believe this integral has an essential singularity at z = 0.<br>
> <br>
> Roger Stafford<br>
<br>
<br>
The value of Z and x is positive and complex. But how could get a solid expression in terms of Z ? Is this impossible to do matlab ?

Sun, 21 Nov 2010 00:08:03 +0000
Re: Please help Explicit integral could not be found
http://www.mathworks.com/matlabcentral/newsreader/view_thread/296926#797978
rakib hasan
"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <ic9d0c$44r$1@fred.mathworks.com>...<br>
> Greg Heath <heath@alumni.brown.edu> wrote in message <f3df0346e04b43e6bc456176288a4775@s4g2000yql.googlegroups.com>...<br>
> > On Nov 19, 10:46 pm, "rakib hasan" <upo...@gmail.com> wrote:<br>
> > > .......<br>
> > > fxy=exp((x^3+2*xz)/x)/x;<br>
> > > y=int(fxy,x,0,5);<br>
> > > .......<br>
> > The integral doesn't exist because of the singularity at x = 0.<br>
> > .......<br>
>            <br>
> That depends on the value of z. If z has a positive real part, the function is always integrable over the interval [0,5]. Considered as a function of z, I believe this integral has an essential singularity at z = 0.<br>
> <br>
> Roger Stafford<br>
<br>
<br>
How could I avoid the warning ? thanks.

Sun, 21 Nov 2010 03:40:05 +0000
Re: Please help Explicit integral could not be found
http://www.mathworks.com/matlabcentral/newsreader/view_thread/296926#797999
Roger Stafford
"rakib hasan" <upol94@gmail.com> wrote in message <ic9nnh$muj$1@fred.mathworks.com>...<br>
> .......<br>
> The value of Z and x is positive and complex. But how could get a solid expression in terms of Z ? Is this impossible to do matlab ?<br>
         <br>
The warning that "Explicit integral could not be found" means that you cannot use the symbolic toolbox to evaluate this integral, so it must be done numerically, using one of the quadrature routines, 'quad', etc. You will have to write a function that uses z as input and finds this integral numerically, and z must have a positive real part to evaluate it this way.<br>
<br>
Your integrand, fxy, becomes indeterminate at x = 0. As x approaches zero fxy must also approach zero, provided the real part of z is positive, as can be proven using L'hospital's rule. That means that if you define fxy as being zero at x = 0 for such a z, it will constitute a continuous function and consequently be integrable. However to avoid sending NaNs back to the quadrature routine, it will be necessary to define fxy as a function that is equal to exp((x^3+2*xz)/x)/x for x>=e for some suitably small positive quantity e, and equal to the appropriate finite Taylor series for x<e. If you choose e sufficiently small, you would perhaps need only one or two terms of the series for sufficient accuracy.<br>
<br>
You can show by differentiation of the integrand that this integral has a welldefined derivative with respect to z if z has a positive real part, and it therefore constitutes an analytic function of z at least in the right half complex plane. I am fairly sure moreover that it can be analytically continued into the left half plane as long as you avoid the essential singularity at z = 0. However at the moment I have no idea of how it could be computed in this left half in a practical manner. Certainly for this purpose you cannot use the integral you have defined, since it is not integrable in that left half. So we'll assume you are content to be restricted to the right half where you can directly compute the integral.<br>
<br>
Roger Stafford

Sun, 21 Nov 2010 17:45:04 +0000
Re: Please help Explicit integral could not be found
http://www.mathworks.com/matlabcentral/newsreader/view_thread/296926#798082
Roger Stafford
"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <ica4al$a91$1@fred.mathworks.com>...<br>
> ...... However to avoid sending NaNs back to the quadrature routine, it will be necessary to define fxy as a function that is equal to exp((x^3+2*xz)/x)/x for x>=e for some suitably small positive quantity e, and equal to the appropriate finite Taylor series for x<e. If you choose e sufficiently small, you would perhaps need only one or two terms of the series for sufficient accuracy.<br>
> .......<br>
         <br>
I need to correct one of the assertions I made yesterday. I advised using a Taylor series expansion in powers of x for your fxy function to approximate its integral from zero to a small positive number e. Unfortunately fxy and all its derivatives with respect to x approach zero as x approaches zero, and therefore it cannot be expanded in a Taylor series in powers of x. It has an essential singularity there.<br>
<br>
My advice instead would be to make a change of variable y = x/z so that you are integrating 1/y*exp(z^2*y^2+21/y) w.r. to y from y = 0 to y = 5/z. This way it will be easier to select the appropriate e so that the integral from e to 5/z rather than 0 to 5/z will be sufficiently accurate, and still avoid NaNs in the quadrature routines. A value of e = .03 or thereabouts ought to be adequate.<br>
<br>
Roger Stafford

Sun, 21 Nov 2010 20:53:04 +0000
Re: Please help Explicit integral could not be found
http://www.mathworks.com/matlabcentral/newsreader/view_thread/296926#798121
rakib hasan
"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <icblr0$57q$1@fred.mathworks.com>...<br>
> "Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <ica4al$a91$1@fred.mathworks.com>...<br>
> > ...... However to avoid sending NaNs back to the quadrature routine, it will be necessary to define fxy as a function that is equal to exp((x^3+2*xz)/x)/x for x>=e for some suitably small positive quantity e, and equal to the appropriate finite Taylor series for x<e. If you choose e sufficiently small, you would perhaps need only one or two terms of the series for sufficient accuracy.<br>
> > .......<br>
>          <br>
> I need to correct one of the assertions I made yesterday. I advised using a Taylor series expansion in powers of x for your fxy function to approximate its integral from zero to a small positive number e. Unfortunately fxy and all its derivatives with respect to x approach zero as x approaches zero, and therefore it cannot be expanded in a Taylor series in powers of x. It has an essential singularity there.<br>
> <br>
> My advice instead would be to make a change of variable y = x/z so that you are integrating 1/y*exp(z^2*y^2+21/y) w.r. to y from y = 0 to y = 5/z. This way it will be easier to select the appropriate e so that the integral from e to 5/z rather than 0 to 5/z will be sufficiently accurate, and still avoid NaNs in the quadrature routines. A value of e = .03 or thereabouts ought to be adequate.<br>
> <br>
> Roger Stafford<br>
First of all, many many thanks for your comments. This is an expression of joint pdf. My final goal was to find a value x such that integration of fxy w.r.t z , limit from .001 to x is equal to 1.00. I guess I have to writemy code in a different way to perform integration numerically. thanks again for your time.