Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: solving equation for two unknowns
Date: Mon, 16 Aug 2010 12:09:07 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 71
Message-ID: <i4b9p3$ddc$1@fred.mathworks.com>
References: <i443ak$t5j$1@fred.mathworks.com> <i4457o$k8r$1@canopus.cc.umanitoba.ca> <i4a3vk$irq$1@fred.mathworks.com> <i4a730$7ev$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1281960547 13740 172.30.248.37 (16 Aug 2010 12:09:07 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 16 Aug 2010 12:09:07 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2444927
Xref: news.mathworks.com comp.soft-sys.matlab:662339

"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <i4a730$7ev$1@fred.mathworks.com>...
> "achenyo at" <achenyo2001@yahoo.com> wrote in message <i4a3vk$irq$1@fred.mathworks.com>...
> > Walter Roberson <roberson@hushmail.com> wrote in message <i4457o$k8r$1@canopus.cc.umanitoba.ca>...
> > > achenyo at wrote:
> > > > Hi,
> > > > I have the following two sets of equations:
> > > > 
> > > > integral of ((1/(lamda1+(lamda2*g0)))-(KNB/g1))*dF0(go)dF1(g1) = 
> > > > 1.................(1)
> > > > 
> > > > and
> > > > 
> > > > integral of ((g0/(lamda1+(lamda2*g0)))-(KNB*(g0/g1)))*dF0(go)dF1(g1) = 
> > > > GQ.......(2)
> > > > 
> > > > every other variable here is known except for amda1 and lamda2, how can 
> > > > I solve for lamda1 and lamda2.
> > > 
> > > Your equations are probably not valid. The indefinite integral of any equation 
> > > does not equal an exact value: it equals a value plus an arbitrary constant. 
> > > You are thus trying to solve two equations in four unknowns.
> > > 
> > > Does your dF0(go) represent the differentiation of a known function F0, with 
> > > respect to unspecified variable, and then evaluating the differential at the 
> > > point g0 ? (note go vs g0 for one thing)
> > > 
> > > Does dF0(go)dF1(g1) represent the multiplication of dF0(go) with dF1(g1) ? You 
> > > were careful to use * to indicate multiplication everywhere else, so we are 
> > > left to wonder whether you wished to denote something different.
> > > 
> > > Which variables are the equations being integrated with respect to? If the 
> > > answer is either go or g1 then the integral cannot be treated as if dF0(go) or 
> > > dF1(g1) are just constants with known values and funny names.
> > > 
> > > 
> > > *If* dF0(g0) and dF1(g1) are constants for the purpose of integration 
> > > (implying integration over lamda1, lamda2 or KNB) and if multiplication was 
> > > intended, and if the arbitrary constants are added in, and if the integration 
> > > just _happens_ to be over lamda1 in both cases, then the solution is:
> > > 
> > > lamda1 = g1 * (g0 - dF0(go) * dF1(g1) * Gq - dF0(go) * dF1(g1) * C2 + g0 * C1) 
> > > / KNB / g0 / dF0(go) / dF1(g1) / (dF0(go) * dF1(g1) - 1)
> > > 
> > > lamda2 = -
> > > (-dF0(g0)^2 * dF1(g1)^2 * KNB * g0 * exp((-Gq - C2 + g0 + g0 * C1) / g0 / 
> > > (dF0(g0) * dF1(g1) - 1)) - dF0(g0) * dF1(g1) * Gq * g1 - dF0(g0) * dF1(g1) * 
> > > C2 * g1 + KNB * g0 * dF0(g0) * dF1(g1) * exp((-Gq - C2 + g0 + g0 * C1) / g0 / 
> > > (dF0(g0) * dF1(g1) - 1)) + g0 * g1 + g0 * C1 * g1) / KNB / g0^2 / dF0(g0) / 
> > > dF1(g1) / (dF0(g0) * dF1(g1) - 1)
> > > 
> > > Notice the leading "-" on the value for lamda2 .
> > 
> > 
> > Thanks Walter, 
> > Yes dF0(go)dF1(g1) represent the multiplication of dF0(go) with dF1(g1) and dF0(g0) and dF1(g1) are not constants, they are functions (CDF of Rayleigh distribution) and the integration is w.r.t. to g0 and g1. 
> > 
> > Thanks for your help.
> > Cheers
> - - - - - - -  -
>   As a first step on your problem I believe you will need to use the pdf functions of the Rayleigh distribution to get
> 
>  dF0(g0) = g0/sigma0^2*exp(-g0^2/(2*sigma^2))*dg0
> 
> and likewise with dF1(g1).  The integrands in each double integral can be separated into the difference between two terms, each of which can be factored with only g0 in one factor and g1 in the other factor.  Therefore each double integral can be written as the difference between products of single integrals, one involving only g0 and the other g1.  Then you can attempt to find analytic expressions for each of these single integrals.
> 
> Roger Stafford

---------------
Thanks Roger,  I have the CDF functions already and I have been able to separate the integrands as you suggested but I am now having problem solving for lambda 1 and lamda2 analytically? I've tried using the function "solve" but it's not working. Please how can I do this in matlab?

Cheers.