Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #1807

Re: Solve vs. nonlinearity

From DrMajorBob <btreat1@austin.rr.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Solve vs. nonlinearity
Date 2011-04-21 07:10 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <iool98$bo3$1@smc.vnet.net> (permalink)

Show all headers | View raw


Good point! Try this, then:

myL = w1*n + w2*k + g*(q0^r - (a*n^r + (1 - a) k^r));
grad = D[myL, {{n, k, g}}];
s1 = First@Quiet@Solve[grad == 0, {n, k, g}];
grad /. % // PowerExpand // Simplify;
s2 = First@Quiet@Solve[% == 0, k];
s = Thread[{n, g, k} -> ({n /. s1 /. s2, g /. s1 /. s2, k /. s2})] //
    PowerExpand // Simplify
grad /. % // PowerExpand // Simplify

{n -> (-1)^(-1/r) a^(1/(1 - r)) q0 (w1 - a w1)^(1/(-1 + r)) w2^(1/(
    1 - r)) (-1 + a -
      a^(1/(1 - r)) (w1 - a w1)^(r/(-1 + r)) w2^(-(r/(-1 + r))))^(-1/
     r), g -> ((-1)^(-1/r) q0^(1 - r)
     w2 (-1 + a -
      a^(1/(1 - r)) (w1 - a w1)^(r/(-1 + r)) w2^(-(r/(-1 + r))))^((-1 +
      r)/r))/((-1 + a) r),
  k -> (-1)^(-1/r)
     q0 (-1 + a -
      a^(1/(1 - r)) (w1 - a w1)^(r/(-1 + r)) w2^(-(r/(-1 + r))))^(-1/r)}

{0, 0, 0}

No guarantees, of course! PowerExpand may be assuming too much for your  
application.

Bobby

On Wed, 20 Apr 2011 03:26:35 -0500, Alan G Isaac <alan.isaac@gmail.com>  
wrote:

>>> Is there a simple way to approach getting Mathematica to
>>> produce a solution in the following problem?
>>> (Without assigning to r.)
>>>
>>> myL = w1*n + w2*k + g*(q0^r - (a*n^r + (1-a) k^r));
>>> grad = D[myL, {{n, k, g}}]
>>> Solve[grad == 0, {n, k, g}]
>
>
> On 4/17/2011 8:00 PM, DrMajorBob wrote:
>> Umm... evaluate the code?
>
>> {{n -> ((((k^(1 - r))^(1/(1 - r)))^(-1 + r) (w1 - a w1))/(a w2))^(
>>     1/(-1 + r)), g -> -((k^(1 - r) w2)/((-1 + a) r))}}
>
>
>
> Note that this does not solve for k.
> (Or possibly I'm missing your point.)
>
> Thanks,
> Alan
>


-- 
DrMajorBob@yahoo.com

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: Solve vs. nonlinearity DrMajorBob <btreat1@austin.rr.com> - 2011-04-21 07:10 +0000

csiph-web