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:
integration explicit solution could not be found

Subject: integration explicit solution could not be found

From: Dhritiman

Date: 17 Jan, 2009 00:55:03

Message: 1 of 3

i had an earlier post about this with a typo. My problem is that matlab cannot solve the following equation where some function of z multiplied by the pdf of gamma dist is integrated over the range [.3 .9]. I need the answer as a function of w(wage). Infact I did get a scalar answer after i used double(int(f,z,.3,.9)) but this is only working when i substitute w for a number. Is there a way out of this...i.e. I need the soultion as a function of w (to be used later inside a fzero)


syms z w
f=138.2528*84.626*z*((1-0.99*z)^1.32)*((1/w)^3.68)*((1/((2)*.06^3))*(z^(3-1))*(2.718^(-z/.06)))
intfs=int(f,z,.3,.9)

thanks for your help!!

Subject: integration explicit solution could not be found

From: Roger Stafford

Date: 17 Jan, 2009 17:45:04

Message: 2 of 3

"Dhritiman " <dhritiman-bhattacharya@uiowa.edu> wrote in message <gkra97$24k$1@fred.mathworks.com>...
> i had an earlier post about this with a typo. My problem is that matlab cannot solve the following equation where some function of z multiplied by the pdf of gamma dist is integrated over the range [.3 .9]. I need the answer as a function of w(wage). Infact I did get a scalar answer after i used double(int(f,z,.3,.9)) but this is only working when i substitute w for a number. Is there a way out of this...i.e. I need the soultion as a function of w (to be used later inside a fzero)
>
> syms z w
> f=138.2528*84.626*z*((1-0.99*z)^1.32)*((1/w)^3.68)*((1/((2)*.06^3))*(z^(3-1))*(2.718^(-z/.06)))
> intfs=int(f,z,.3,.9)

  Dhritiman, I call to your attention again the fact that the factor involving w in your expression need not be included in the integrand here but can be factored outside. What you have can be expressed as

 a/w^3.68 * int(z^3*(1-b*z)^c*exp(-z/d,z,e,f)

where a = 138.2528*84.626/(2*.06^3), b = 0.99, c = 1.32, d = .06, and where e and f are the lower and upper limits of integration. The value of the integral part depends only on constants b, c, d and the limits of integration, not on a or w. You can multiply these latter in after the integration is performed.

  As for the integral, the introduction of the power c = 1.32 apparently renders this integral incapable of an explicit solution, but this is a mathematical difficulty and not one that can be blamed on matlab. Consequently it will be necessary for you to do numerical integration to evaluate it for each different set of constants b, c, d and limits of integration.

  About the only saving I can see in this will come from cases where the integration range is taken over various (e,f) intervals that overlap. The overlap portions need be integrated only once (provided b, c, and d remain fixed.)

Roger Stafford

Subject: integration explicit solution could not be found

From: Dhritiman

Date: 18 Jan, 2009 04:27:01

Message: 3 of 3

thanks a tonne Roger.....you nailed it!!!!

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