Re: How to make the same two expressions
- To: mathgroup at smc.vnet.net
- Subject: [mg119595] Re: How to make the same two expressions
- From: "Dr. Wolfgang Hintze" <weh at snafu.de>
- Date: Sat, 11 Jun 2011 06:49:57 -0400 (EDT)
- References: <isss9i$jg1$1@smc.vnet.net>
If you solve the equation expr1==expr2 for a, then you get a function af[b_] which tells you for each value of b (within the range of definition) the value a which makes the two expressions equal. (* your expressions *) expr1 = -1.0019 - 1. Log[0.00190438 - 0.0249519 b] + (0.000040093 a Log[0.152644/(0.152644 + 2 b)])/b; expr2 = -1.00004 - 1. Log[0.0000378969 - 0.0249519 b] + (0.000040093 a Log[0.0030376/(0.0030376 + 2 b)])/b; (* the equation *) eq = expr1 == expr2; (* solving for a *) af[b_] = a /. Solve[eq, a][[1]]; // Chop (* now some values *) bmin = -0.0015188; bmax = -bmin; db = (bmax - bmin)/10; Table[{b, af[b]}, {b, bmin + db, bmax - db, db}] {{-0.00121504, 63.6567}, {-0.00091128, 86.9868}, {-0.00060752, 108.195}, {-0.00030376, 129.314}, {0., Indeterminate}, {0.00030376, 175.787}, {0.00060752, 203.935}, {0.00091128, 239.29}, {0.00121504, 292.055}} Here I have omitted some error messages connected with b=0. For b->0 we find Limit[af[b], b -> 0] 151.47 You can also depict the function graphically Plot[af[b], {b, bmin, bmax}]; to see that the whole range a>0 is covered. Hope this helps. Regards, Wolfgang "Mariano Pierantozzi" <mariano.pierantozzi at gmail.com> schrieb im Newsbeitrag news:isss9i$jg1$1 at smc.vnet.net... > Hi everyone, > i've this problem with Mathemtica: > i've got 2 expression depending on a and b: > expr1= -1.0019 - 1. Log[0.00190438 - 0.0249519 b] + (0.000040093 a > Log[0.152644/(0.152644 + 2 b)])/b > expr2=-1.00004 - 1. Log[0.0000378969 - 0.0249519 b] + (0.000040093 a > Log[0.0030376/(0.0030376 + 2 b)])/b > I want to make the same this two expressions. > The problem is that if i try to solve this is one equation in two > parameter: > a and b. > So i think to put inside some value of a and b so i make equal the > two > expression less than 10^-12 (for example) > I've to do a list of value: > b can vary beetwen -0.0015188 < b < 0.0015188 (the domain of > logarithmic > function) and a must vary for example -2000 to 2000. > I can not find a waydo it. I try with list, and put the value inside, > but > i've some problem. > if anyone can help I would be grateful... > Thank you! > > Mariano Pierantozzi > PhD student