Message Boards Message Boards

0
|
11501 Views
|
12 Replies
|
5 Total Likes
View groups...
Share
Share this post:

Attempting to input a complex equation into W|A, both of us are stumped.

Hi all,

Will someone please get this monstrosity down W|A's gob in a constructive fashion?

Solve[P = x (-((a x)/V^2) + (R T)/(V - b x)) 

where

a=0.2420*((atm*dm^6)/(mol^2)), b=((2.65*10^-2)*((dm^3)/mol), 
P=(1.0atm), 
R=((8.205736*10^-5)*((m^3*atm)/(k*mol))), 
T=298.2*K, 
V=(113.097m^3)] 

for x

I've tried everything I know how to do so far, and I even caved and payed for pro -- and it didn't help one wit. SOMEONE please get this thing through wolfram's head -- then pleeeeease tell me how you did it.

Attachments:
POSTED BY: Joshua Patyten
12 Replies
POSTED BY: Joshua Patyten

I think at this point, if you have the units consistent, you can drop them and just go for the numeric solution. Youwill know what are the correct units, for x, from the fact that it must agree with the units for V/b (so that that denominator has consistent units).

POSTED BY: Daniel Lichtblau

I attempted your initial suggestion of doing it piecewise, using the bare values for the homogonized units... but the result dosen't seem to make sense.

Input[1] a=0.2420; b=2.6510^-2; r=8.20573610^-5; v=113097; t=298.2; x(-a x/v^2+r t/(v-b x))

Output--> (0.05633/(794823.-1. x)-1.89197x10^-11 x) x

input[2] p=1 solve for x: p=(0.05633/(794823.-1. x)-1.89197x10^-11 x) x

Output-->791354.

That's a bit of an eyepopping output for me, given that my understanding is that that SHOULD come out to units of mols... I'm going to doublecheck now and see if that's... sane...

POSTED BY: Joshua Patyten

I think the problem is that you have a mix of meters and d-meters, and also moles and k-moles. If I am correct, just convert to one via k-moles-->100*moles, etc. to get consistent units. Then rinse and repeat.

POSTED BY: Daniel Lichtblau

actually that's kelven*moles, believe it or not. Also i think I managed to root out and convert all the instances of meter to dm.

apologies for that, I went back and made that a bit more clear. totally my mistake. (and that the coding of the forum seems to think that k*mol means something along the lines of italicization.)

*Edit 1 nope, you're right, there was still a m^3 unit in the R term. Thank you so much for helping me with this. I've been working on this problem for so ling i feel like i'm going crosseyed. I'm going to try it again now, with all the units PROPERLY converted this time.

POSTED BY: Joshua Patyten
POSTED BY: Joshua Patyten

Units. Units. Units. Units. and one more time units. I need the units of n to come out, and come out correctly. If excel can do that, that's news to me (although, admittedly, I'm not as well versed in excel as I should be, nonetheless if it can automatically convert decimeters to meters and the like-- I'd be mildly impressed.). This isn't just solving the equation mathematically, this is dimensional analysis nightmare too. I need a CAS that can do both - the only ones that I know of that can do that are W|A and Mathematica. Given that I don't have any training (or a software license) for Mathematica, I'm here, now with a tertiary puzzle on top of it all of how in gods name to wheedle this into a form W|A can properly swallow. Is there some form of extended interface I can use to input this kind of thing? All I need are these 3 things: "input equation" and "define variables WITH UNITS", and "solve for which variable?"

How do I do that? Please and thank you!

(clarification: originally I was using n instead of x, but made the switch to x in an attempt to make it easier on W|A -- if I've referenced solving for n or x, the meaning is meant to be interchangeable: x=n.)

POSTED BY: Joshua Patyten

You can get the numerical values as already indicated (dropping all units, that is). Presumably any part of the input that gives compatibility conditions on the units will show what they must be. For example, the denominator V-b*x shows that x must have same units as V/b.

All this requires that the input be preprocessed so that units are all expressed in the same system e.g. CGS. And that the equation be dimentionally correct to begin with. If you want to actually demonstrate that (e.g. you want to show there was no error in the input) then I suspect Alpha will not be the tool of choice. Not sure about Alpha Pro though.

POSTED BY: Daniel Lichtblau
Posted 10 years ago
POSTED BY: Bill Simpson
Posted 10 years ago
POSTED BY: Bill Simpson

http://www.wolframalpha.com/input/?i=solve++for+x%3A+p%3Dx+%28-a+x%2Fv^2+%2B+r+t%2F%28v-b+x%29%29

My input was

solve for x: p=x (-a x/v^2 + r t/(v-b x))

My suggestion when entering input to W|A: make things as simple as possible.

POSTED BY: Daniel Lichtblau

aye, I did this at one point and got probably that exact output. What i'm looking to do is have it CALCULATE that equation given the following definitions for each of the variables: a=0.2420((atmdm^6)/(mol^2)) b=((2.6510^-2)((dm^3)/mol) P=(1.0atm) R=((8.20573610^-5)((m^3atm)/(kmol))) T=298.2*K V=(113.097m^3)] specifically WITH the units going along for the ride. As you can tell from the solution above, running this by hand is a NIGHTMARE. I need a CAS to chew this out.

POSTED BY: Joshua Patyten
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract