Re: Solve vs. nonlinearity
- To: mathgroup at smc.vnet.net
- Subject: [mg118307] Re: Solve vs. nonlinearity
- From: DrMajorBob <btreat1 at austin.rr.com>
- Date: Thu, 21 Apr 2011 03:10:40 -0400 (EDT)
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 at 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 at yahoo.com