Message Boards Message Boards

0
|
11558 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
POSTED BY: Joshua Patyten
POSTED BY: Daniel Lichtblau
POSTED BY: Joshua Patyten

The units are in need of minor conversions to like units, but the fundamental units are all the same (m^3 -> dm^3, for example), but the fundamental structure of the equation is functionally correct (it's pulled from a text book). If I remember right, I did try preconverting everything into matching units at one point, but was stymied by "W|A does not understand your input"more than likely because the input string remains half as long as my arm.

Converting everything to like units gives these: p=x (-a x/v^2 + r t/(v-b x)) a=0.2420((atm*dm^6)/(mol^2)) b=((2.6510^-2)*((dm^3)/mol) P=(1.0*atm) R=((8.20573610^-5)*((m^3atm)/(k * mol))) T=298.2*K V=(113097*dm^3)]

*edited because there was a minor error in the text. Second edit: kmol should have been K * mol

POSTED BY: Joshua Patyten
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

I apologize. I looked at your equations and units, incorrectly assumed that all the units would neatly resolve themselves and tried to show you one way to coax WolframAlpha into submission.

I have now briefly tried to translate your units into the exact form Mathematica demands, guessed a little what some of those might be, and see whether it shows any sign of being able to provide a satisfactory solution. A caution, using units in Mathematica has been problematic with many new users trying to use units reporting problems and confusion.

My impression is that it isn't looking good. I'm guessing you would put in substantially more time and aggravation than the two other options I would recommend, a bright motivated student or in extreme cases a bright motivated grad student will likely be the least aggravating path to a solution.

If you are still bent on doing it yourself and you still have, or can re-create, your SI unit version of the problem then you could look at some of the documentation for using units with Mathematica. This or this might be a place to start. That could let you explore how much time and energy it might take to put a problem into a form where Mathematica might deal with your units. If you get that far and can post a nice clean example of the (almost) Mathematica-ready code (finding out how to use ctrl-K to create a box to put code into a post so it is less mangled) then I or someone else could take a few seconds to throw that at Mathematica and show you what the result was.

POSTED BY: Bill Simpson
Posted 10 years ago

One trick to get around some limitations of WolframAlpha is to let it do part of your calculation, scrape the result and use that to build a final calculation that gives you the answer you really want.

Go to WolframAlpha and paste

a=0.2420; b=2.6510^-2; r=8.20573610^-5; v=113.097; t=298.2; x(-a x/v^2+r t/(v-b x))

Gently slide the mouse over the result until you see "Copyable plaintext" and click and scrape

(0.05633 x)/(794.823-x)-0.0000189197 x^2

Then give WolframAlpha input

p=1;solve for x: p= (0.05633 x)/(794.823-x)-0.0000189197 x^2

tle last part of which is what you scraped from above and then get

x= -52854.9

x= 0

x=794.768

Or just quit fighting this sillyness and let Excel give you the answer

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