How to i find a range of parameters that admit positive solutions ?

Hi,
I have this non linear equation.
x+6-(beta/(1+beta))*(1-alpha)*x^(alpha)+(exp(sigma^2*(1/2 - x/((beta/(1+beta))*(1-alpha)*x^(alpha)))))*((beta/(1+beta))*alpha*x^(2*alpha-1)-(alpha)*x^(alpha))=0
my alpha's, beta's and sigma, are parameters. I am wondering how someone can find in MATLAB the range or value/values of those parameters that admit positive solution/s for my x.
Thanks

8 commentaires

Matt J
Matt J le 6 Juil 2013
Modifié(e) : Matt J le 6 Juil 2013
In order to then do what with that range? Minimize a function over it?
Thanks for the comment.
I only want to solve for x. So without assigning values to my parameters (alpha, beta) the solution is a function of those. When I assign some values, the solution is a complex number, which is not feasible. To make it more specific, this equation comes from an economic model, x must be a real non-negative number, since it represents consumption. So i need to know the admissible set/domain of my parameters where x is positive real number.
So, instead of trying all the time by guessing the values for those parameters could be possible to do it through a feature or programming in MATLAB?
if makes the things more simpler, let's say that i need to find real-positive number number for x, given that 0=<alpha=<1000, and 0<beta=<1000.
Is it possible ? I will highly appreciate any guidance
Matt J
Matt J le 6 Juil 2013
Modifié(e) : Matt J le 6 Juil 2013
I doubt it's possible. I doubt that the region of alpha,beta that ensures x>=0 is rectangular or even that it is contiguous.
Are you sure you have no ultimate criteria for the alpha, beta you're looking for other, than that it ensure the existence of a positive solution? You're truly interested in many possible different pairs alpha, beta and need to know if an x>=0 for all those pairs?
Yes, Matt. Unfortunately this is Economics and we call it "Calibration" :) Otherwise, it may well be the case that the model is wrong. But in general you say that is no such feature for instance even for a simpler equation. Do you think that symbolic toolbox could be of any help here ? Thanks anyway for the effort.
i mean that sometimes, we do not know those parameters, and we have to "fit" them for some plausible solutions.
Matt J
Matt J le 6 Juil 2013
Modifié(e) : Matt J le 6 Juil 2013
Fit them according to what criteria? If x is unknown and you are fitting alpha, beta (hence they are also unknown), what model and measured data are you fitting them to?
by "fit" I mean to get the unknown x necessary positive, by "fitting" or finding alphas and betas that can produce such solution. X is unknown but WE KNOW that MUST be positive ALL THE TIME, and this solution depends on those parameters. This is the basic point.
So, if
x=sqrt(a) and we want x>=0, then any a>=0 is fine, in a lot of cases is not that clear or obvious.
Matt J
Matt J le 6 Juil 2013
Modifié(e) : Matt J le 6 Juil 2013
by "fit" I mean to get the unknown x necessary positive, by "fitting" or finding alphas and betas that can produce such solution.
So, if I present you with one particular triple x>=0, alpha, beta, that satisfies your equation, you will be done? Mission accomplished?

Connectez-vous pour commenter.

 Réponse acceptée

Matt J
Matt J le 6 Juil 2013
Modifié(e) : Matt J le 6 Juil 2013
Here is a combination of parameters that seems to satisfy your equation, with x>=0,
alpha =
-0.0786
beta =
1.8827
x =
0.2446
sigma =
4.2678
I obtained it by minimizing abs(LHS) over all 4 parameters via the code below.
LHS=@(alpha,beta,x,sigma) x+6-(beta/(1+beta))*(1-alpha)*x^(alpha)+(exp(sigma^2*(1/2 - x/((beta/(1+beta))*(1-alpha)*x^(alpha)))))*((beta/(1+beta))*alpha*x^(2*alpha-1)-(alpha)*x^(alpha));
fun=@(p) abs(LHS(p(1),p(2),abs(p(3)),p(4)));
options=optimset('TolFun',1e-6);
[p,fval]=fminsearch(fun,[1,1,1,3],options);
alpha=p(1),
beta=p(2),
x=abs(p(3)),
sigma=abs(p(4)),
So does this complete your mission?

3 commentaires

Thanks Matt, i really appreciate your effort. I am not that familiar with Matlab,so as to have looked at it that way. Yes, this is an acceptable process.
You think that i can do the same or similar minimization? To be honest i did not really understood the code, since i am new to MATLAB, but i guess i can figure this out later.
And just for future reference, are those solutions the only ones that this code gives? Or it could have produced multiple values? I am asking this because in general, we might not wish to have, let's beta negative, or alpha above 10 etc etc.. so ruling out some solutions.
Matt J
Matt J le 6 Juil 2013
Modifié(e) : Matt J le 6 Juil 2013
And just for future reference, are those solutions the only ones that this code gives?
No, you have 1 equation in 4 unknowns, so there will inevitably be an infinite space of solutions. You can get different solutions by feeding different starting guesses to FMINSEARCH.
I am asking this because in general, we might not wish to have, let's beta negative, or alpha above 10 etc etc.. so ruling out some solutions.
If you have the Optimization Toolbox, you can use LSQNONLIN instead of FMINSEARCH. LSQNONLIN let's you impose whatever upper/lower bounds you want, and handles them more gracefully.
Thank so much Matt. You saved a lot of work for me from now on. Given that i will become more familiar with MATLAB :)
Your help much appreciated indeed

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by