필터 지우기
필터 지우기

solving a complex equation

조회 수: 6 (최근 30일)
cm
cm 2013년 9월 20일
I want to solve this equation to find a formula that computes "p" in terms of "q". Said differently, the variable is "p" and the parameter is "q".
the equation is " p.^2 .*(1-q).*(2.*q.*(1-p.^2)).^(2.*p) -2.*(1-p).*(1-q.*(1-p)).*(p+q.*(1-p))"
and there is a constraint for "p" and "q" since they are probabilities between 0 to 1
I will be so pleased if some one kindly let me know how to do it?
Thanks in advance

채택된 답변

Matt J
Matt J 2013년 9월 20일
편집: Matt J 2013년 9월 20일
I doubt a closed form expression exists. You could solve numerically, using fzero
fun=@(p) p.^2 .*(1-q).*(2.*q.*(1-p.^2)).^(2.*p) -2.*(1-p).*(1-q.*(1-p)).*(p+q.*(1-p));
p=fzero(fun,[0,1]);
However, it is unclear to me whether multiple solutions for p might exist for a given q, even when both are constrained to [0,1]. If so, fzero will find only one of them.
  댓글 수: 5
Matt J
Matt J 2013년 9월 20일
편집: Matt J 2013년 9월 20일
No, I don't think a closed form expression is possible. If you didn't have the '^2*p' in there, it would be a 4th order polynomial in p. Closed form expressions do exist in that case for all the roots. They would be fairly ugly expressions and you would have to analyze which root(s) lay in [0,1].
With the power of 2*p, though, it looks rather unlikely you'd find something closed form. But, if you have the Symbolic Math Toolbox, you could try the SOLVE command, to see what it gives you.
cm
cm 2013년 9월 20일
Yes You are right! the power of 2*p makes it so difficult to reach the closed form. I have to look for another way to solve this equation, but it seems a bit confusing! thanks anyway

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Walter Roberson
Walter Roberson 2013년 9월 20일
If the overall expression is to equal 0 (rather than it being of the form y = .... and needing to solve for given y and p), then the expression given has two solution families:
p = 0, q = 1
p = 1, q = anything in [0 to 1]
  댓글 수: 2
Roger Stafford
Roger Stafford 2013년 9월 20일
It also has a solution at p = 0 and q = 0.
cm
cm 2013년 9월 21일
Yes that's true!
I also added another equation to the first one, so that it may seem easier to find better answers for these equations. Thank you

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Utilities for the Solver에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by