Re: Solving inequalities.
- To: mathgroup at smc.vnet.net
- Subject: [mg45188] Re: [mg45168] Solving inequalities.
- From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
- Date: Sat, 20 Dec 2003 05:55:52 -0500 (EST)
- References: <200312191157.GAA29404@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
On 19 Dec 2003, at 20:57, George wrote: > I want to solve this equation: f'(p)=0. > With the restrictions 0<p<1 and 2<k<n and > f(p) = (p^k) * (1-p)^(n-k). > > How this can be done inside Mathematica 5.0 or 4.2? > The following procedure doesn't work. > > I define the f[p_] and then i enter: > > Needs["Algebra`InequalitySolve`"] > InequalitySolve[f'[p] == 0 && 1 > p > 0 && k > 2 && n > k, p] > > but no solution is found. > InequalitySolve and other related function deal only with algebraic (basically polynomial and rational) inequalities, and a few other cases that reduce to algebraic inequalities. There do not exist any algorithms for solving general transcendental inequalities so no computer software can do this. However, in your case this is all quite irrelevant because the problems you mention are so trivial that all you need is to use Simplify. (It won't be so easy with harder problems). In[5]:= Simplify[D[f[p], p]] Out[5]= (1 - p)^(-k + n - 1)* p^(k - 1)*(k - n*p) You do not have to be a great mathematician to see that this can only be zero if either p=1 or k=n p. Since you have excluded the first case, you must have p=k/n. Clearly 0<k/n<1, so this is the solution to your problem. So if you really want Mathemaitca to do all the work all you need to do is: In[8]:= Solve[Simplify[D[f[p], p]] == 0, p] Out[8]= {{p -> k/n}} > -------------------------------------------------------------------- > > The above problem is "the same" with the equation: > x^(a+1) * (1-x)^(b-1) = (x^a) * (1-x)^b with the restrictions > 0<x<1 and 1<b<a. > So this equation is the same with the: x = 1-x <=> x=0.5 > > But how can i solve this in Mathematica 5.0 or 4.2? > > The: > > Needs["Algebra`InequalitySolve`"] > InequalitySolve[x^(a+1) * (1-x)^(b-1) == (x^a) * (1-x)^b && 1 > x > 0 > && a > b > 1, x] > > doesn't work. Same as before. In[9]:= Solve[Simplify[ x^(a + 1)*(1 - x)^ (b - 1) == x^a*(1 - x)^b], x] Out[9]= {{x -> 1/2}} > > -------------------------------------------------------------------- > > And generally because in Mathematica 5.0, Reduce can solve > inequalities, > how can i solve the (a^b)*(b^a)>0 with a>b>0. (Which is true of > course) > > The: Reduce[(a^b)*(b^a)>0 && a>b>0,{a,b}] doesn't find it. > Simplify[a^b*b^a > 0, a > b > 0] True Andrzej Kozlowski Chiba, Japan http://www.mimuw.edu.pl/~akoz/
- References:
- Solving inequalities.
- From: gtsavdar@auth.gr (George)
- Solving inequalities.