Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: simultaneous equation
Replies: 5   Last Post: Nov 24, 2012 2:27 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Alexei Boulbitch

Posts: 479
Registered: 2/28/08
Re: simultaneous equation
Posted: Nov 24, 2012 2:27 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi:

When I solve a simultaneous equation, the output looks as follows. How do I remove those ?1.? and the annoying wiggles in the superscript position in so many places.

With regards

trichy

Here is the whole thing. It's a small program... When I ran it anew, the superscript-wiggles are gone but the "1." persists. Thanks for the help.
trichy

In[1]:
x1 = 0.5 + (1/(4 t1)) (rsm - rsk);
x2 = 0.5 + (1/(4 t2)) (rLm - rLk);
x3 = 0.5 + (1/4) (rLk - n rsk);
x4 = 0.5 + (1/4) (rLm - n rsm);
ssk = a b x1 + (1 - a) g x3;
sLk = a (1 - b) x2 + (1 - a) g (1 - x3);
ssm = a b (1 - x1) + (1 - a) (1 - g) x4;
sLm = a (1 - b) (1 - x2) + (1 - a) (1 - g) (1 - x4);
Pik = ssk rsk + sLk rLk;
Pim = ssm rsm + sLm rLm;
Pidsm = D[Pim, rsm]; PidLm = D[Pim, rLm];
Solve[Pidsm == 0 && PidLm == 0, {rsm, rLm}]

Out[1]:
{{rsm -> -((0.5 a b + 0.5 (1. - 1. a) (1. - 1. g) + (0.25 a b rsk)/
t1) (-0.5 (1. - 1. a) (1. - 1. g) - (0.5 a (1. - 1. b))/
t2) - 1. (0.25 (1. - 1. a) (1. - 1. g) +
0.25 (1. - 1. a) (1. - 1. g) n) (0.5 a (1. - 1. b) +
0.5 (1. - 1. a) (1. - 1. g) + (0.25 a (1. - 1. b) rLk)/
t2))/(-1. (0.25 (1. - 1. a) (1. - 1. g) +
0.25 (1. - 1. a) (1. - 1. g) n)^2 + (-0.5 (1. - 1. a) (1. -
1. g) n - (0.5 a b)/t1) (-0.5 (1. - 1. a) (1. - 1. g) - (
0.5 a (1. - 1. b))/t2)),
rLm -> (1. (0.25 (1. - 1. a) (1. - 1. g) +
0.25 (1. - 1. a) (1. - 1. g) n) ((0.5 a b +
0.5 (1. - 1. a) (1. - 1. g) + (0.25 a b rsk)/
t1) (-0.5 (1. - 1. a) (1. - 1. g) - (0.5 a (1. - 1. b))/
t2) - 1. (0.25 (1. - 1. a) (1. - 1. g) +
0.25 (1. - 1. a) (1. - 1. g) n) (0.5 a (1. - 1. b) +
0.5 (1. - 1. a) (1. - 1. g) + (0.25 a (1. - 1. b) rLk)/
t2)))/((-1. (0.25 (1. - 1. a) (1. - 1. g) +
0.25 (1. - 1. a) (1. - 1. g) n)^2 + (-0.5 (1. -
1. a) (1. - 1. g) n - (0.5 a b)/
t1) (-0.5 (1. - 1. a) (1. - 1. g) - (0.5 a (1. - 1. b))/
t2)) (-0.5 (1. - 1. a) (1. - 1. g) - (0.5 a (1. - 1. b))/
t2)) - (0.5 a (1. - 1. b) + 0.5 (1. - 1. a) (1. - 1. g) + (
0.25 a (1. - 1. b) rLk)/t2)/(-0.5 (1. - 1. a) (1. - 1. g) - (
0.5 a (1. - 1. b))/t2)}}

Hi, is this better?

x1 = 1/2 + (1/(4 t1)) (rsm - rsk);
x2 = 1/2 + (1/(4 t2)) (rLm - rLk);
x3 = 1/2 + (1/4) (rLk - n rsk);
x4 = 1/2 + (1/4) (rLm - n rsm);
ssk = a b x1 + (1 - a) g x3;
sLk = a (1 - b) x2 + (1 - a) g (1 - x3);
ssm = a b (1 - x1) + (1 - a) (1 - g) x4;
sLm = a (1 - b) (1 - x2) + (1 - a) (1 - g) (1 - x4);
Pik = ssk rsk + sLk rLk;
Pim = ssm rsm + sLm rLm;
Pidsm = D[Pim, rsm]; PidLm = D[Pim, rLm];
Solve[Pidsm == 0 && PidLm == 0, {rsm, rLm}]

{{rsm -> -(((a b)/2 + 1/2 (1 - a) (1 - g) + (a b rsk)/(
4 t1)) (-(1/2) (1 - a) (1 - g) - (a (1 - b))/(
2 t2)) - (1/4 (1 - a) (1 - g) +
1/4 (1 - a) (1 - g) n) (1/2 a (1 - b) +
1/2 (1 - a) (1 - g) + (a (1 - b) rLk)/(
4 t2)))/(-(1/4 (1 - a) (1 - g) +
1/4 (1 - a) (1 - g) n)^2 + (-(1/2) (1 - a) (1 - g) n - (
a b)/(2 t1)) (-(1/2) (1 - a) (1 - g) - (a (1 - b))/(2 t2))),
rLm -> ((1/4 (1 - a) (1 - g) +
1/4 (1 - a) (1 - g) n) (((a b)/2 + 1/2 (1 - a) (1 - g) + (
a b rsk)/(4 t1)) (-(1/2) (1 - a) (1 - g) - (a (1 - b))/(
2 t2)) - (1/4 (1 - a) (1 - g) +
1/4 (1 - a) (1 - g) n) (1/2 a (1 - b) +
1/2 (1 - a) (1 - g) + (a (1 - b) rLk)/(
4 t2))))/((-(1/4 (1 - a) (1 - g) +
1/4 (1 - a) (1 - g) n)^2 + (-(1/2) (1 - a) (1 - g) n - (
a b)/(2 t1)) (-(1/2) (1 - a) (1 - g) - (a (1 - b))/(
2 t2))) (-(1/2) (1 - a) (1 - g) - (a (1 - b))/(
2 t2))) + (-a rLk + a b rLk - 2 t2 + 2 a b t2 + 2 g t2 -
2 a g t2)/(2 (-a + a b - t2 + a t2 + g t2 - a g t2))}}

Have fun, Alexei




Alexei BOULBITCH, Dr., habil.
IEE S.A.
ZAE Weiergewan,
11, rue Edmond Reuter,
L-5326 Contern, LUXEMBOURG

Office phone : +352-2454-2566
Office fax: +352-2454-3566
mobile phone: +49 151 52 40 66 44

e-mail: alexei.boulbitch@iee.lu







Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.