Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
question on triple integral

Subject: question on triple integral

From: Yue

Date: 17 Jun, 2011 18:09:04

Message: 1 of 3

Hi! Can someone help me on a triple integral?

I have something like this:
integrand is f(x,y,z)=exp(-y-z-cos(z))*besseli(0,sqrt((z+cos(z))*y)*exp(-x-z-sin(z))*besseli(0,sqrt((z+sin(z))*x)

int over z from 0 to b
int over y from 0 to Inf
int over x from 0 to y
I've tried using triplequad and quad2d and int but always get error messages.
Thanks a lot in advance!

Subject: question on triple integral

From: Roger Stafford

Date: 18 Jun, 2011 01:52:07

Message: 2 of 3

"Yue " <violinsonata5@gmail.com> wrote in message <itg580$4qq$1@newscl01ah.mathworks.com>...
> Hi! Can someone help me on a triple integral?
>
> I have something like this:
> integrand is f(x,y,z)=exp(-y-z-cos(z))*besseli(0,sqrt((z+cos(z))*y)*exp(-x-z-sin(z))*besseli(0,sqrt((z+sin(z))*x)
>
> int over z from 0 to b
> int over y from 0 to Inf
> int over x from 0 to y
> I've tried using triplequad and quad2d and int but always get error messages.
> Thanks a lot in advance!
- - - - - - - - - - -
1. The parentheses don't balance in your expression for f(x,y,z). There are two more left parentheses than right ones.

2. The way f(x,y,z) is written doesn't support receiving x as a vector. The documentation states, "fun(x,y,z) must accept a vector x and scalars y and z, and return a vector of values of the integrand." There should therefore be a dot on the multiplication between the second 'exp' and the second 'besseli'.

3. The limits of integration should all be finite numbers.

Roger Stafford

Subject: question on triple integral

From: Yue

Date: 19 Jun, 2011 04:45:19

Message: 3 of 3

Thanks for your advice. I modified my integral as this:


syms x y z

ePp0=@(x,y,z) exp(-(y+2/3/(2*pi^2)*(1+2*pi^2-4*pi^2*z+2*pi^2*z.^2-cos(2*pi*z)+2*pi*(1-z).*sin(2*pi*z)))/2).*besseli(0,sqrt(2/3/(2*pi^2)*(1+2*pi^2-4*pi^2*z+2*pi^2*z.^2-cos(2*pi*z)+2*pi*(1-z).*sin(2*pi*z)).*y)).*exp(-(x+2/3/(2*pi^2)*(1+2*pi^2*z.^2-cos(2*pi*z)-2*pi*z.*sin(2*pi*z)))/2).*besseli(0,sqrt(2/3/(2*pi^2)*(1+2*pi^2*z.^2-cos(2*pi*z)-2*pi*z.*sin(2*pi*z)).*x));

Pp1=1/4*1/0.001*int(int(int(ePp0(x,y,z),z,0,0.001),y,0,x),x,0,100);

ans=VPA(Pp1,4);



But still I can not get the final answer. Could you please help me with this? Thanks a lot!

"Roger Stafford" wrote in message <ith0c7$gpg$1@newscl01ah.mathworks.com>...
> "Yue " <violinsonata5@gmail.com> wrote in message <itg580$4qq$1@newscl01ah.mathworks.com>...
> > Hi! Can someone help me on a triple integral?
> >
> > I have something like this:
> > integrand is f(x,y,z)=exp(-y-z-cos(z))*besseli(0,sqrt((z+cos(z))*y)*exp(-x-z-sin(z))*besseli(0,sqrt((z+sin(z))*x)
> >
> > int over z from 0 to b
> > int over y from 0 to Inf
> > int over x from 0 to y
> > I've tried using triplequad and quad2d and int but always get error messages.
> > Thanks a lot in advance!
> - - - - - - - - - - -
> 1. The parentheses don't balance in your expression for f(x,y,z). There are two more left parentheses than right ones.
>
> 2. The way f(x,y,z) is written doesn't support receiving x as a vector. The documentation states, "fun(x,y,z) must accept a vector x and scalars y and z, and return a vector of values of the integrand." There should therefore be a dot on the multiplication between the second 'exp' and the second 'besseli'.
>
> 3. The limits of integration should all be finite numbers.
>
> Roger Stafford

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us