Re: Re: solving 3 eqns and 3 unkwns
- To: mathgroup at smc.vnet.net
- Subject: [mg40978] Re: [mg40935] Re: solving 3 eqns and 3 unkwns
- From: Bobby Treat <drmajorbob+MathGroup3528 at mailblocks.com>
- Date: Sat, 26 Apr 2003 03:26:42 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
My earlier answer was too pessimistic, perhaps. Here's a solution:
eqns := {eqn1, eqn2, eqn3}
{eqn1, eqn2, eqn3} =
{a*P*A*x^(a - 1)*y^b*z^c == r,
b*P*A*x^a*y^(b - 1)*z^c == w,
c*P*A*x^a*y^b*z^(c - 1) == D/(z^2)}
/. {P -> ap/A, D -> d};
This step is optional:
eqn3 = z^2 # & /@ eqn3
massage[equation_Equal] :=
Block[{log, times, plus}, (Log /@ equation)
/. {Log -> log, Times -> times, Plus -> plus}
/. {log[times[t__]] :> plus @@ log /@ {t}}
/. {log[Power[t_, u_]] :> u*log[t]}
/. {log -> Log, times -> Times, plus -> Plus}
]
Solve[massage /@ eqns, {x, y, z}]
This may miss solutions or introduce spurious ones, since the
transformations above are not always valid and reversible. That's why
Mathematica doesn't perform them!
Bobby
-----Original Message-----
From: Alois Steindl <Alois.Steindl at jet2web.cc>
To: mathgroup at smc.vnet.net
Subject: [mg40978] [mg40935] Re: solving 3 eqns and 3 unkwns
Richard Cochinos <richard at theory.org> writes:
> Hi, I'm trying to get methematica to solve the following equations for
> x,y and z. I can't get anyoutput, what is wrong with the following
code?
>
> Solve[{a*P*A*x^(a - 1)*y^b*z^c - r == 0, b*P*A*x^a*y^(b - 1)*z^c - w
== 0,
> c*P*A*x^a*y^b*z^(c - 1) - D/(z^2) == 0}, {x, y, z}]
>
>
Hello,
not every possible equation can be solved analytically at all. And I
do not expect any software to solve all solveable problems.
In your problem it might be possible, if you multiply the last
equation by z^2 and then take logarithms, this should give you a
linear system in the new variables log(x), log(y) and log(z).
Alois
--
Alois Steindl, Tel.: +43 (1) 58801 / 32558
Inst. for Mechanics II, Fax.: +43 (1) 58801 / 32598
Vienna University of Technology,
A-1040 Wiedner Hauptstr. 8-10